Windows 磁盤部分性能數據獲取

Windows 磁盤部分性能數據獲取


摘要

每次晚上加班總有收穫
這次發現了一個fio for windows版本的壓測程序, 準備學習和使用一下. 
https://github.com/axboe/fio/releases

安裝

exe 的正常安裝不用都說直接使用就可以了. 

注意我這變使用的是 x64版本的. 

測試腳本

fio -name=128k -filename=c:\io.speedtest -runtime=30 -direct=1 -bs=128k -rw=write -size=4g --iodepth=16 --thread
fio -name=8k -filename=c:\io.speedtest -runtime=30 -direct=1 -bs=8k -rw=randwrite -size=4g --iodepth=16 --thread
fio -name=8krw -filename=c:\io.speedtest -runtime=30 -direct=1 -bs=8k -rw=randrw -rwmixread=70 -size=4g --iodepth=16 --thread
fio -name=8kread -filename=c:\io.speedtest -runtime=30 -direct=1 -bs=8k -rw=read -size=4g --iodepth=16 --thread

注意不同的測試腳本分別對應測試:
128KB順序寫
8K 隨機寫
8K 隨機讀寫,並且70%的讀操作, 這個是數據庫常用的個處理
8K 順序讀 一般這個會到協議的頂峯. 如果這個到不了就可以改成128KB 的區塊大小

需要注意. windows 平臺不支持 多線程測試, 這裏是需要注意的. 

IOPS和帶寬數值越大越好. 太低的數值, 會帶來一些問題. 
注意實際測試中最好加大runtime時間和文件大小最好能夠擊穿raid卡的緩存或者是磁盤緩存 這樣測試結果纔是正確的. 

自己筆記本的測試結果

C:\Users\zhaobsh>fio -name=128k -filename=c:\io.speedtest -runtime=30 -direct=1 -bs=128k -rw=write -size=4g --iodepth=16
fio: this platform does not support process shared mutexes, forcing use of threads. Use the 'thread' option to get rid of this warning.
128k: (g=0): rw=write, bs=(R) 128KiB-128KiB, (W) 128KiB-128KiB, (T) 128KiB-128KiB, ioengine=windowsaio, iodepth=16
fio-3.34
Starting 1 thread
128k: Laying out IO files (2 files / total 4096MiB)
Jobs: 1 (f=2): [W(1)][100.0%][w=110MiB/s][w=882 IOPS][eta 00m:00s]
128k: (groupid=0, jobs=1): err= 0: pid=27928: Mon Mar 20 23:37:12 2023
  write: IOPS=1036, BW=130MiB/s (136MB/s)(3886MiB/30001msec); 0 zone resets
    slat (usec): min=155, max=27079, avg=963.76, stdev=1015.93
    clat (nsec): min=608, max=63591k, avg=7544673.60, stdev=5145554.51
     lat (usec): min=174, max=63819, avg=8508.44, stdev=5273.46
    clat percentiles (nsec):
     |  1.00th=[    1224],  5.00th=[  522240], 10.00th=[ 1253376],
     | 20.00th=[ 2834432], 30.00th=[ 4358144], 40.00th=[ 5603328],
     | 50.00th=[ 7045120], 60.00th=[ 8454144], 70.00th=[10027008],
     | 80.00th=[11730944], 90.00th=[13697024], 95.00th=[15663104],
     | 99.00th=[23461888], 99.50th=[26869760], 99.90th=[34865152],
     | 99.95th=[39059456], 99.99th=[54263808]
   bw (  KiB/s): min=67840, max=204288, per=100.00%, avg=132981.93, stdev=22042.15, samples=59
   iops        : min=  530, max= 1596, avg=1038.58, stdev=172.19, samples=59
  lat (nsec)   : 750=0.10%, 1000=0.51%
  lat (usec)   : 2=0.95%, 4=0.16%, 10=0.04%, 20=0.02%, 50=0.01%
  lat (usec)   : 250=0.62%, 500=2.45%, 750=1.79%, 1000=1.63%
  lat (msec)   : 2=6.30%, 4=13.05%, 10=41.98%, 20=28.56%, 50=1.81%
  lat (msec)   : 100=0.02%
  cpu          : usr=0.00%, sys=3.33%, ctx=0, majf=0, minf=0
  IO depths    : 1=1.8%, 2=13.1%, 4=26.2%, 8=52.4%, 16=6.5%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=93.9%, 8=0.0%, 16=6.1%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,31084,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=16

Run status group 0 (all jobs):
  WRITE: bw=130MiB/s (136MB/s), 130MiB/s-130MiB/s (136MB/s-136MB/s), io=3886MiB (4074MB), run=30001-30001msec

C:\Users\zhaobsh>fio -name=128k -filename=d:\io.speedtest -runtime=30 -direct=1 -bs=128k -rw=write -size=4g --iodepth=16 --thread
128k: (g=0): rw=write, bs=(R) 128KiB-128KiB, (W) 128KiB-128KiB, (T) 128KiB-128KiB, ioengine=windowsaio, iodepth=16
fio-3.34
Starting 1 thread
128k: Laying out IO files (2 files / total 4096MiB)
Jobs: 1 (f=2): [W(1)][100.0%][w=96.0MiB/s][w=767 IOPS][eta 00m:00s]
128k: (groupid=0, jobs=1): err= 0: pid=28128: Mon Mar 20 23:38:30 2023
  write: IOPS=982, BW=123MiB/s (129MB/s)(3684MiB/30001msec); 0 zone resets
    slat (usec): min=159, max=20981, avg=1016.39, stdev=1085.95
    clat (nsec): min=529, max=40496k, avg=7963163.20, stdev=5295680.79
     lat (usec): min=181, max=42443, avg=8979.55, stdev=5397.27
    clat percentiles (nsec):
     |  1.00th=[    1064],  5.00th=[  489472], 10.00th=[ 1269760],
     | 20.00th=[ 2932736], 30.00th=[ 4620288], 40.00th=[ 6062080],
     | 50.00th=[ 7438336], 60.00th=[ 8847360], 70.00th=[10420224],
     | 80.00th=[12255232], 90.00th=[15138816], 95.00th=[17170432],
     | 99.00th=[21626880], 99.50th=[25296896], 99.90th=[31588352],
     | 99.95th=[34340864], 99.99th=[37486592]
   bw (  KiB/s): min=96830, max=167011, per=100.00%, avg=126208.25, stdev=24663.83, samples=59
   iops        : min=  756, max= 1304, avg=985.68, stdev=192.63, samples=59
  lat (nsec)   : 750=0.34%, 1000=0.56%
  lat (usec)   : 2=0.74%, 4=0.16%, 10=0.03%, 20=0.01%, 50=0.01%
  lat (usec)   : 250=0.54%, 500=2.68%, 750=1.75%, 1000=1.57%
  lat (msec)   : 2=5.64%, 4=11.85%, 10=41.36%, 20=30.82%, 50=1.95%
  cpu          : usr=0.00%, sys=3.33%, ctx=0, majf=0, minf=0
  IO depths    : 1=1.8%, 2=13.1%, 4=26.2%, 8=52.3%, 16=6.5%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=93.9%, 8=0.0%, 16=6.1%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,29475,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=16

Run status group 0 (all jobs):
  WRITE: bw=123MiB/s (129MB/s), 123MiB/s-123MiB/s (129MB/s-129MB/s), io=3684MiB (3863MB), run=30001-30001msec
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章