基準測試、檢測磁碟 I/O 效能、磁碟 I/O 流量。
安裝 SQLIO Disk Subsystem Benchmark Tool → 修改 param.txt →
把 c:\testfile.dat 2 0x0 100 註解 → 加上 d:\testfile.dat 2 0x0 2048 (2048MB) →
cmd → sqlio.exe -kR -s600 -fsequential -o8 –b64 -LS -Fparam.txt timeout /T 600 →
sqlio.exe -kR -s600 -frandom -o8 –b64 -LS -Fparam.txt timeout /T 600 →
sqlio.exe -kW -s600 -fsequential -o8 –b64 -LS -Fparam.txt timeout /T 600 →
sqlio.exe -kW -s600 -frandom -o8 –b64 -LS -Fparam.txt timeout /T 600 → reboot

-o<#outstanding>  設定 I/O 需求的佇列量,增加佇列的深度,將會導致產生更高的輸入量。一般常用
的設定值是:8、32、64。

-L<[S|P][i|]>  捕抓磁碟延遲性的相關資訊。latencies from (S=system, P=processor) timer。

-k<R|W>  指定讀取/寫入

-s<secs>  指定要執行測試的的持續時間(秒)。

-F<paramfile>  指定所參考的外部參數檔案名稱。

-f<stripe factor> 設定 I/O 區塊的磁區模式為 random 或 sequential。

param.txt 檔案中的參數

<Path to test file>:測試檔案的完整路徑與檔案名稱。
<Number of threads (per test file)>:建議依據 CPU 的核心數量來設定。
<Mask >:設定為 0x0。
<Size of test file in MB> :測試檔案的使用空間,應該要大於儲存設備的快取大小。一般設定為「快
取」大小的兩到四倍。


每次測試完最好重開機以防快取影響數據。
資料庫以 -b8、-b64、-b1024 測試即可,其它 size 意義不大。
時間以 -s60、-s300、-s600 測試即可。

參考德瑞克的 SQL Server 學習筆記及 MS 說明。

arrow
arrow
    全站熱搜

    flyfox 發表在 痞客邦 留言(0) 人氣()