2014年5月13日 星期二

我的 VirtualSAN 讀寫測試

VMware 已於今年 3 月 12日正式推出 VSAN (VirtualSAN)。我相信這產品吸引不少人的注意。首先我的公司在虛擬化方面,現在是使用 VSphere 5.0 + 3 x HP P4300。這架構也用了好幾年,亦到了需要擴展的階段。所以對於 VSAN 這個產品,我們也抱著相當大的興趣,所以在較早前下載了 VSphere 5.5 回來測試一番,並與現在的架構於速度上,比較一下。

測試 VSAN 主機環境:
VSphere ESXi 5.5 主機共三台,該三台主機是安裝於 Dell M1000e Chassis,而每台配置如下:
DELL PowerEdge M620
    - Xeon X5650@2.67GHz 6 Cores x 2pcs
    - 64Gb RAM
    - Intel DC S3700 Series 100GB SSDSC2BA100G301 2.5" SATA 3 6Gb/s SSD
    - Dell  2.5" SAS 146G 6Gb/s 15krpm HDD
    - 4pcs x 1Gb Adaptor (on B & C slots)

網路環境:
Dell PowerConnect M6348 x 4pcs (B1, B2, C1, C2)


測試虛擬機的設定:
    OS: Windows XP
    VCPU: ( number of virtual sockets: 1; number of cores per socket: 8)
    Memory: 1Gb


為了要有一個清晰的比較,我除了找來現在Production的架構外,另外找來 HP BladeSystem + FC Storage,以及單台 PC 作比較。

現有 Production 的 P4300 環境:
VSphere ESXi 5.0 主機共三台,該三台主機是安裝於 Dell M1000e Chassis,而每台配置如下:
DELL PowerEdge M620
    - Xeon X5650@2.67GHz 6 Cores x 2pcs
    - 64Gb RAM
    - 4pcs x 1Gb Adaptor (on B & C slots)

網路環境:
Dell PowerConnect M6348 x 4pcs (B1, B2, C1, C2)

儲存裝置:
三台HP Lefthand P4300 G2 8T 組成的 HP Storage Cluster
HDD: 1Tb 7200rpm

測試虛擬機的設定:
    OS: Windows XP
    VCPU: ( number of virtual sockets: 1; number of cores per socket: 8)
    Memory: 1Gb

HP BladeSystem + FC Storage 環境:
硬件:
     HP BladeSystem
        - c7000 Enclosure G2
        - ProLiant BL460c Gen8
          (    Xeon E5-2680 x 2 processors, 16G RAM    )

        - HP B-series 8/12c SAN Switch BladeSystem c-Class
        - HP VC Flex-10 Enet Module

    HP Storage P2000 G3 FC MSA

OS: Windows 2008R2 64bit Enterprise Edition





測試軟件:iometer 板本:2006.07.27

測試項目:
    Disk Target:
        - 16000000 sectors (8G size)
        - 16 per target (no. of Outstanding I/Os)

    No. of workers: 8

    Access Specification:
        4K; 100% Read; 0% random
        4K; 100% Read; 80% random
        4K; 70% Read; 80% random
        4K; 50% Read; 80% random
        4K; 50% Read; 0% random


測試結果:

Target Type 說明:
P4300 - 是指 Production中的環境,即 ESXi 5.0 + HP Lefthand P4300 G2,其執行測試的虛擬機的 SCSI Controller 為 BusLogic Parallel.

VSAN SSD BL - 是指使用上述 VSAN 測試環境,其執行測試的虛擬機的 SCSI Controller 為 BusLogic Parallel.

VSAN SSD PVSCSI - 是指使用上述 VSAN 測試環境,其執行測試的虛擬機的 SCSI Controller 為 VMware Paravirtual.

VSAN SSD LSI SAS - 是指使用上述 VSAN 測試環境,其執行測試的虛擬機的 SCSI Controller 為 LSI Logic SAS.

HP MSA2000 - 是指使用上述的 HP BladeSystem + FC Storage 測試環境,其執行的操作系統為 Windows 2008R2 64bit Enterprise Edition.,由於此環境是沒有虛擬化,所以是使用 HPLpe1205A FC HBA.

Target Type Access Specification Name
IOps
Read IOps Write IOps MBps Read MBps Write MBps Transactions per Second
P4300 4K; 100% Read; 0% random 12,212.127 12,212.127 0.000 47.704 47.704 0.000 12,212.127
VSAN SSD BL 4K; 100% Read; 0% random 4,740.406 4,740.406 0.000 18.517 18.517 0.000 4,740.406
VSAN SSD PVSCSI 4K; 100% Read; 0% random 16,056.946 16,056.946 0.000 62.722 62.722 0.000 16,056.946
VSAN SSD LSI SAS 4K; 100% Read; 0% random 9,600.117 9,600.117 0.000 37.500 37.500 0.000 9,600.117
HP MSA2000 4K; 100% Read; 0% random 8,299.105 8,299.105 0.000 32.418 32.418 0.000 8,299.105
                 
Target Type Access Specification Name
IOps
Read IOps Write IOps MBps Read MBps Write MBps Transactions per Second
P4300 4K; 100% Read; 80% random 1,111.533 1,111.533 0.000 4.342 4.342 0.000 1,111.533
VSAN SSD BL 4K; 100% Read; 80% random 1,857.710 1,857.710 0.000 7.257 7.257 0.000 1,857.710
VSAN SSD PVSCSI 4K; 100% Read; 80% random 5,423.012 5,423.012 0.000 21.184 21.184 0.000 5,423.012
VSAN SSD LSI SAS 4K; 100% Read; 80% random 6,717.932 6,717.932 0.000 26.242 26.242 0.000 6,717.932
HP MSA2000 4K; 100% Read; 80% random 1,560.186 1,560.186 0.000 6.094 6.094 0.000 1,560.186
                 
Target Type Access Specification Name
IOps
Read IOps Write IOps MBps Read MBps Write MBps Transactions per Second
P4300 4K; 70% Read; 80% random 988.997 692.521 296.476 3.863 2.705 1.158 988.997
VSAN SSD BL 4K; 70% Read; 80% random 1,319.366 921.783 397.583 5.154 3.601 1.553 1,319.366
VSAN SSD PVSCSI 4K; 70% Read; 80% random 6,376.888 4,462.153 1,914.736 24.910 17.430 7.479 6,376.888
VSAN SSD LSI SAS 4K; 70% Read; 80% random 5,266.276 3,686.681 1,579.595 20.571 14.401 6.170 5,266.276
HP MSA2000 4K; 70% Read; 80% random 1,081.348 757.498 323.850 4.224 2.959 1.265 1,081.348
                 
Target Type Access Specification Name
IOps
Read IOps Write IOps MBps Read MBps Write MBps Transactions per Second
P4300 4K; 50% Read; 80% random 857.384 427.228 430.156 3.349 1.669 1.680 857.384
VSAN SSD BL 4K; 50% Read; 80% random 1,065.819 534.168 531.651 4.163 2.087 2.077 1,065.819
VSAN SSD PVSCSI 4K; 50% Read; 80% random 4,251.774 2,119.182 2,132.592 16.608 8.278 8.330 4,251.774
VSAN SSD LSI SAS 4K; 50% Read; 80% random 3,185.194 1,595.781 1,589.414 12.442 6.234 6.209 3,185.194
HP MSA2000 4K; 50% Read; 80% random 1,021.078 511.948 509.130 3.989 2.000 1.989 1,021.078
                 
Target Type Access Specification Name
IOps
Read IOps Write IOps MBps Read MBps Write MBps Transactions per Second
P4300 4K; 50% Read; 0% random 1,121.322 559.546 561.776 4.380 2.186 2.194 1,121.322
VSAN SSD BL 4K; 50% Read; 0% random 1,295.807 645.841 649.966 5.062 2.523 2.539 1,295.807
VSAN SSD PVSCSI 4K; 50% Read; 0% random 4,625.646 2,313.626 2,312.020 18.069 9.038 9.031 4,625.646
VSAN SSD LSI SAS 4K; 50% Read; 0% random 7,770.314 3,887.471 3,882.842 30.353 15.185 15.167 7,770.314
HP MSA2000 4K; 50% Read; 0% random 3,537.858 1,765.679 1,772.179 13.820 6.897 6.923 3,537.858


總結:
據以上測試結果來看,VSAN 架構在隨機讀寫的情況下有明顯優勢。P4300 表現其實也算中等。唯獨是  HP BladeSystem + FC Storage 測試環境,不知是我的設定有問題,還是其他原因,以上 5 種不同的 situations 都沒有特別明顯的優勢。

2014年2月28日 星期五

Arduino LCD 功能表使用範例

上一篇發表了我的 LCD_MENU 物件的源始碼,以下就是這個 LCD_MENU 使用範例:

//------------------------------------------------------------------------------
//檔案: examples.ino
//
//作者:Anthony Lee (Dephi.Ktop: skcc)
//
//日期:二零一四年二月一日
//
//備註: 關於 LCD 連接,請參照相關LCD廠商連接方法。本例子是選用 I2C 的 LCD 和 UNO
// 版子,所以需要使用 A4 (SDA)和 A5(SDL)。
// 有關 I2C 可參閱:http://arduino.cc/en/reference/wire
// 如需轉載請列明出處,請尊重知識產權。
//
//按鈕設定:
// A0 - 上 (上一個選項)
// A1 - 下 (下一個選項)
// A2 - 左 (返回鍵)
// A3 - 右 (選擇鍵)
//------------------------------------------------------------------------------
#include  
#include

#include "LCD_MENU.h"

#define HIGH_VALUE 700
#define DELAY_TIME 250

LiquidCrystal_I2C lcd(0x27, MAX_SCREEN_CHAR, MAX_ROW);

CONTENT *MainContent = new CONTENT();

  
LCD_MENU a_lcd_menu = LCD_MENU("Main Menu");
#define Main_Item_Num  7
char * MenuItemArray[]= {   "Item 1", //0
                            "Sub Menu 1", //1
                            "Item 3", //2
                            "Item 4", //3
                            "Item 5", //4
                            "Item 6", //5
                            "Item 7" //6                            
};


LCD_MENU a_sub_menu_1 = LCD_MENU("Sub Menu 1"); 
#define Sub_Menu_1_Num 5                   
char * SubMenuItemArray_1[]={ "Sub Item 1-1", //100
       "Sub Item 1-2", //101
       "Sub Menu 2", //102
       "Sub Item 1-4", //103
       "Analog 0-3"}; //104
    

LCD_MENU a_sub_menu_2 = LCD_MENU("Sub Menu 2");                            
#define Sub_Menu_2_Num 5
char * SubMenuItemArray_2[]={ "Sub Item 2-1",   //200
         "Sub Item 2-2", //201
         "Sub Item 2-3", //202
         "Sub Item 2-4", //203
         "Sub Item 2-5"}; //204

               
LCD_MENU *CurrentMenu;
LCD_MENU *EnterMenu;

char buff_temp[ MAX_SCREEN_CHAR + 1 ];

int btn_Up;
int btn_Down;
int btn_Left;
int btn_Right;

int LiveUpdateItem;


void setup()

  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  
  Build_MainMenu();
  

  LiveUpdateItem = -1;
  CurrentMenu = &a_lcd_menu; 
  LCD_Show( &lcd, CurrentMenu );
  
}
  
void loop()
{
  //Key Capture...
  btn_Up = analogRead(A0);
  btn_Down = analogRead(A1);
  btn_Left = analogRead(A2);
  btn_Right = analogRead(A3);
    
  memset(buff_temp, 0, MAX_SCREEN_CHAR + 1 );
  
  if( btn_Up > HIGH_VALUE || btn_Down > HIGH_VALUE || btn_Left > HIGH_VALUE || btn_Right > HIGH_VALUE )
  {
    if( btn_Up > HIGH_VALUE && btn_Down < HIGH_VALUE && btn_Left < HIGH_VALUE && btn_Right < HIGH_VALUE )
    {  
      Button_UP();
    }
    else
    if( btn_Down > HIGH_VALUE && btn_Up < HIGH_VALUE && btn_Left < HIGH_VALUE && btn_Right < HIGH_VALUE )
    {
      Button_DOWN();
    }
    else
    if( btn_Down < HIGH_VALUE && btn_Up < HIGH_VALUE && btn_Left > HIGH_VALUE && btn_Right < HIGH_VALUE )
    {
      Button_LEFT();
    }
    else
    if( btn_Down < HIGH_VALUE && btn_Up < HIGH_VALUE && btn_Left < HIGH_VALUE && btn_Right > HIGH_VALUE )
    {
  Button_RIGHT();
    } 
    
    LCD_Show( &lcd, CurrentMenu );      
  }
  else
  {  
 switch( LiveUpdateItem )
 {
  case 104:
   memset(buff_temp, 0, MAX_SCREEN_CHAR + 1 );
  sprintf(buff_temp, "%d %d %d %d", btn_Up, btn_Down, btn_Left, btn_Right);
   MainContent->Update_Line( 1, buff_temp );
   LCD_Show( &lcd, CurrentMenu );
   delay( 1000 - DELAY_TIME );
  break;
 }
  }    
  delay( DELAY_TIME );
}

void Build_MainMenu()
{
  MENU_ITEM* a_Item;
  for(int i=0; i
  {
  if( i == 1 )
    {
  Build_Sub_Menu_1();   
    a_Item = new MENU_ITEM( i, MenuItemArray[i], &a_lcd_menu, NULL, &a_sub_menu_1, NULL );
    }
    else
  a_Item = new MENU_ITEM( i, MenuItemArray[i], &a_lcd_menu, NULL, NULL, NULL );
  a_lcd_menu.Add_Item( a_Item );
 
  }
  a_lcd_menu.init();
}

void Build_Sub_Menu_1()
{
  MENU_ITEM* a_Item;
  for(int j=0; j
  {    
  if( j == 2 )
    {
  Build_Sub_Menu_2();   
    a_Item = new MENU_ITEM( j + 100, SubMenuItemArray_1[j], &a_sub_menu_1, &a_lcd_menu, &a_sub_menu_2, NULL );
    }
    else    
  a_Item = new MENU_ITEM( j + 100, SubMenuItemArray_1[j], &a_sub_menu_1, &a_lcd_menu, NULL, NULL );
  a_sub_menu_1.Add_Item( a_Item );
 
  }
  a_sub_menu_1.init();
}

void Build_Sub_Menu_2()
{
  MENU_ITEM* a_Item;
  for(int k=0; k
  {
  a_Item = new MENU_ITEM( k + 200, SubMenuItemArray_2[k], &a_sub_menu_2, &a_sub_menu_1, NULL, NULL );
  a_sub_menu_2.Add_Item( a_Item );
 
  }
  a_sub_menu_2.init();
}


void Button_UP()
{
  CurrentMenu->Action_Up();
  Serial.println( "UP" );
}

void Button_DOWN()
{
  CurrentMenu->Action_Down();
  Serial.println( "DOWN" );
}

void Button_LEFT()
{
CurrentMenu = (LCD_MENU *) CurrentMenu->Action_Back();
LiveUpdateItem = -1;
Serial.println( "LEFT" ); 
}

void Button_RIGHT()
{
  EnterMenu = (LCD_MENU *) CurrentMenu->Action_Enter();
  if( EnterMenu == NULL )
  {
sprintf(buff_temp, "Item ID: %d", CurrentMenu->Selected->Item_ID );   
 Serial.println( buff_temp );
   
    switch( CurrentMenu->Selected->Item_ID )
    {
   
    case 104:    
    MainContent->Clear_All();
    MainContent->Add_Line("Analog Read");
   memset(buff_temp, 0, MAX_SCREEN_CHAR + 1 );
  sprintf(buff_temp, "%d %d %d %d", btn_Up, btn_Down, btn_Left, btn_Right);    
    MainContent->Add_Line( buff_temp );
    MainContent->init();
sprintf(buff_temp, "LineCount: %d", MainContent->LineCount );   
  Serial.println( buff_temp );    
    CurrentMenu->Content_Page = MainContent;
    break;
   
    default:
     MainContent->Clear_All();      
MainContent->Add_Line( CurrentMenu->Selected->Item_Name );
MainContent->Add_Line("This is a default");
MainContent->Add_Line("page.");
MainContent->Add_Line("Hello 1");
MainContent->Add_Line("Hello 2");
MainContent->Add_Line("Hello 3");
MainContent->Add_Line("Hello 4");
MainContent->Add_Line("Hello 5");
MainContent->init();
sprintf(buff_temp, "LineCount: %d", MainContent->LineCount );   
  Serial.println( buff_temp );    
     CurrentMenu->Content_Page = MainContent;      
    break;
    }
LiveUpdateItem = CurrentMenu->Selected->Item_ID;
  }
  else
  {
  CurrentMenu = EnterMenu;
  LiveUpdateItem = -1;
  }
  Serial.println( "RIGHT" );

}