linux 磁盘性能fio-hdd

1,hdd随机读4k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [rrrrrrrrrr] [7.5% done] [2001K/0K /s] [500 /0  iops] [eta 15m:25s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11864
  read : io=130284KB, bw=1757.6KB/s, iops=439 , runt= 74127msec
    clat (usec): min=93 , max=2704.9K, avg=22711.68, stdev=88921.76
     lat (usec): min=94 , max=2704.9K, avg=22711.98, stdev=88921.76
    clat percentiles (usec):
     |  1.00th=[  121],  5.00th=[  502], 10.00th=[  580], 20.00th=[  676],
     | 30.00th=[  796], 40.00th=[ 1048], 50.00th=[ 7200], 60.00th=[12736],
     | 70.00th=[16064], 80.00th=[18560], 90.00th=[27008], 95.00th=[79360],
     | 99.00th=[362496], 99.50th=[552960], 99.90th=[1236992], 99.95th=[1794048],
     | 99.99th=[2244608]
    bw (KB/s)  : min=    2, max=  954, per=11.23%, avg=197.27, stdev=127.80
    lat (usec) : 100=0.04%, 250=2.95%, 500=1.85%, 750=21.77%, 1000=12.35%
    lat (msec) : 2=5.81%, 4=2.02%, 10=7.63%, 20=30.74%, 50=8.16%
    lat (msec) : 100=2.63%, 250=2.47%, 500=0.97%, 750=0.31%, 1000=0.14%
    lat (msec) : 2000=0.15%, >=2000=0.02%
  cpu          : usr=0.30%, sys=2.01%, ctx=404501, majf=0, minf=3222
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=32571/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=130284KB, aggrb=1757KB/s, minb=1757KB/s, maxb=1757KB/s, mint=74127msec, maxt=74127msec

Disk stats (read/write):
  vdc: ios=32537/2, merge=0/1, ticks=737736/416, in_queue=802740, util=99.80%

2,hdd随机读512k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=512k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=randread, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=randread, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [rrrrrrrrrr] [5.4% done] [48128K/0K /s] [94 /0  iops] [eta 08m:09s] 
fio: terminating on signal 2
Jobs: 10 (f=10): [rrrrrrrrrr] [5.6% done] [49053K/0K /s] [95 /0  iops] [eta 08m:08s]
mytest: (groupid=0, jobs=10): err= 0: pid=11876
  read : io=1300.0MB, bw=47044KB/s, iops=91 , runt= 28297msec
    clat (usec): min=240 , max=3227.9K, avg=107776.77, stdev=224147.19
     lat (usec): min=240 , max=3227.9K, avg=107777.20, stdev=224147.20
    clat percentiles (usec):
     |  1.00th=[  362],  5.00th=[ 2640], 10.00th=[ 3408], 20.00th=[17792],
     | 30.00th=[43264], 40.00th=[66048], 50.00th=[82432], 60.00th=[91648],
     | 70.00th=[96768], 80.00th=[104960], 90.00th=[154624], 95.00th=[264192],
     | 99.00th=[1171456], 99.50th=[1941504], 99.90th=[2539520], 99.95th=[2637824],
     | 99.99th=[3227648]
    bw (KB/s)  : min=  158, max=43858, per=11.89%, avg=5593.24, stdev=4149.58
    lat (usec) : 250=0.04%, 500=1.35%, 750=0.12%
    lat (msec) : 2=0.31%, 4=10.50%, 10=5.50%, 20=2.73%, 50=11.19%
    lat (msec) : 100=40.23%, 250=22.62%, 500=2.77%, 750=0.88%, 1000=0.50%
    lat (msec) : 2000=0.81%, >=2000=0.46%
  cpu          : usr=0.17%, sys=1.05%, ctx=55457, majf=0, minf=11689
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=2600/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=1300.0MB, aggrb=47043KB/s, minb=47043KB/s, maxb=47043KB/s, mint=28297msec, maxt=28297msec

Disk stats (read/write):
  vdc: ios=2599/0, merge=0/0, ticks=279384/0, in_queue=279828, util=99.76%

3,hdd顺序读4k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [RRRRRRRRRR] [4.8% done] [2000K/0K /s] [500 /0  iops] [eta 15m:52s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11888
  read : io=96564KB, bw=2041.3KB/s, iops=510 , runt= 47307msec
    clat (usec): min=281 , max=513977 , avg=19588.34, stdev=21694.13
     lat (usec): min=282 , max=513977 , avg=19588.65, stdev=21694.13
    clat percentiles (usec):
     |  1.00th=[  418],  5.00th=[  532], 10.00th=[ 1112], 20.00th=[19584],
     | 30.00th=[19584], 40.00th=[19584], 50.00th=[19840], 60.00th=[19840],
     | 70.00th=[20352], 80.00th=[20608], 90.00th=[20608], 95.00th=[20864],
     | 99.00th=[54016], 99.50th=[134144], 99.90th=[362496], 99.95th=[477184],
     | 99.99th=[509952]
    bw (KB/s)  : min=   14, max=  594, per=10.14%, avg=207.05, stdev=73.31
    lat (usec) : 500=3.80%, 750=4.34%, 1000=1.53%
    lat (msec) : 2=0.76%, 4=0.24%, 10=0.54%, 20=51.10%, 50=36.56%
    lat (msec) : 100=0.56%, 250=0.33%, 500=0.22%, 750=0.03%
  cpu          : usr=0.56%, sys=1.54%, ctx=290985, majf=0, minf=2116
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=24141/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=96564KB, aggrb=2041KB/s, minb=2041KB/s, maxb=2041KB/s, mint=47307msec, maxt=47307msec

Disk stats (read/write):
  vdc: ios=24113/0, merge=0/0, ticks=471040/0, in_queue=471080, util=99.90%

4,hdd顺序读512k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=512k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=read, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=read, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [RRRRRRRRRR] [5.6% done] [50075K/0K /s] [97 /0  iops] [eta 09m:13s] 
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11900
  read : io=1615.6MB, bw=50401KB/s, iops=98 , runt= 32822msec
    clat (usec): min=254 , max=1322.3K, avg=100949.28, stdev=187548.45
     lat (usec): min=254 , max=1322.3K, avg=100949.65, stdev=187548.44
    clat percentiles (usec):
     |  1.00th=[  314],  5.00th=[ 3376], 10.00th=[10304], 20.00th=[10432],
     | 30.00th=[11200], 40.00th=[21120], 50.00th=[31360], 60.00th=[41216],
     | 70.00th=[42240], 80.00th=[85504], 90.00th=[333824], 95.00th=[522240],
     | 99.00th=[929792], 99.50th=[1028096], 99.90th=[1236992], 99.95th=[1318912],
     | 99.99th=[1318912]
    bw (KB/s)  : min=  435, max=19497, per=10.90%, avg=5494.20, stdev=3456.34
    lat (usec) : 500=1.64%, 750=0.12%, 1000=0.12%
    lat (msec) : 2=0.34%, 4=2.91%, 10=3.62%, 20=23.06%, 50=40.76%
    lat (msec) : 100=7.77%, 250=6.38%, 500=8.02%, 750=3.37%, 1000=1.21%
    lat (msec) : 2000=0.68%
  cpu          : usr=0.15%, sys=1.12%, ctx=66660, majf=0, minf=11746
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=3231/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
   READ: io=1615.6MB, aggrb=50401KB/s, minb=50401KB/s, maxb=50401KB/s, mint=32822msec, maxt=32822msec

Disk stats (read/write):
  vdc: ios=3477/0, merge=0/0, ticks=355776/0, in_queue=356148, util=99.83%

5,hdd随机写4k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=randwrite, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=randwrite, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [wwwwwwwwww] [3.3% done] [0K/1705K /s] [0 /426  iops] [eta 16m:08s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11912
  write: io=66972KB, bw=2057.9KB/s, iops=514 , runt= 32545msec
    clat (usec): min=96 , max=2090.2K, avg=19428.67, stdev=144716.62
     lat (usec): min=96 , max=2090.2K, avg=19429.02, stdev=144716.63
    clat percentiles (usec):
     |  1.00th=[  108],  5.00th=[  113], 10.00th=[  129], 20.00th=[ 1192],
     | 30.00th=[ 1240], 40.00th=[ 2192], 50.00th=[ 2192], 60.00th=[ 2224],
     | 70.00th=[ 2224], 80.00th=[ 2224], 90.00th=[ 2256], 95.00th=[ 2320],
     | 99.00th=[1056768], 99.50th=[1171456], 99.90th=[1662976], 99.95th=[1810432],
     | 99.99th=[2088960]
    bw (KB/s)  : min=    1, max= 2016, per=10.53%, avg=216.68, stdev=226.12
    lat (usec) : 100=0.23%, 250=14.52%, 500=0.41%, 750=0.04%, 1000=0.02%
    lat (msec) : 2=19.29%, 4=63.71%, 10=0.13%, 20=0.01%, 50=0.03%
    lat (msec) : 100=0.02%, 250=0.02%, 500=0.06%, 750=0.06%, 1000=0.20%
    lat (msec) : 2000=1.23%, >=2000=0.02%
  cpu          : usr=0.63%, sys=1.72%, ctx=371019, majf=0, minf=1425
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=16743/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=66972KB, aggrb=2057KB/s, minb=2057KB/s, maxb=2057KB/s, mint=32545msec, maxt=32545msec

Disk stats (read/write):
  vdc: ios=0/16721, merge=0/5, ticks=0/48904, in_queue=52896, util=99.77%

6,hdd随机写512k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=512k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=randwrite, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=randwrite, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [wwwwwwwwww] [8.8% done] [0K/49416K /s] [0 /96  iops] [eta 07m:35s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11926
  write: io=2144.0MB, bw=50284KB/s, iops=98 , runt= 43661msec
    clat (usec): min=271 , max=2854.9K, avg=101690.00, stdev=442753.50
     lat (usec): min=275 , max=2854.2K, avg=101702.24, stdev=442753.55
    clat percentiles (usec):
     |  1.00th=[  350],  5.00th=[ 9408], 10.00th=[ 9536], 20.00th=[10048],
     | 30.00th=[10432], 40.00th=[10432], 50.00th=[10432], 60.00th=[10560],
     | 70.00th=[10560], 80.00th=[10688], 90.00th=[11072], 95.00th=[11840],
     | 99.00th=[2441216], 99.50th=[2605056], 99.90th=[2768896], 99.95th=[2834432],
     | 99.99th=[2867200]
    bw (KB/s)  : min=  197, max=49192, per=10.99%, avg=5528.14, stdev=5562.64
    lat (usec) : 500=1.82%, 750=0.37%, 1000=0.09%
    lat (msec) : 2=0.07%, 4=0.02%, 10=16.30%, 20=76.73%, 50=0.26%
    lat (msec) : 100=0.05%, 250=0.05%, 500=0.05%, 1000=0.09%, 2000=0.91%
    lat (msec) : >=2000=3.19%
  cpu          : usr=0.21%, sys=1.00%, ctx=132715, majf=0, minf=7172
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=4288/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=2144.0MB, aggrb=50284KB/s, minb=50284KB/s, maxb=50284KB/s, mint=43661msec, maxt=43661msec

Disk stats (read/write):
  vdc: ios=0/4287, merge=0/8, ticks=0/50252, in_queue=50240, util=99.20%

7,hdd顺序写4k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=write, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=write, bs=4K-4K/4K-4K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [WWWWWWWWWW] [2.9% done] [0K/2001K /s] [0 /500  iops] [eta 16m:12s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11941
  write: io=58736KB, bw=2069.5KB/s, iops=517 , runt= 28388msec
    clat (usec): min=127 , max=2797.5K, avg=19322.39, stdev=148729.87
     lat (usec): min=127 , max=2797.5K, avg=19322.76, stdev=148729.88
    clat percentiles (usec):
     |  1.00th=[  165],  5.00th=[ 1192], 10.00th=[ 1240], 20.00th=[ 1304],
     | 30.00th=[ 1448], 40.00th=[ 2224], 50.00th=[ 2224], 60.00th=[ 2256],
     | 70.00th=[ 2288], 80.00th=[ 2320], 90.00th=[ 2384], 95.00th=[ 2448],
     | 99.00th=[1138688], 99.50th=[1236992], 99.90th=[1433600], 99.95th=[2244608],
     | 99.99th=[2736128]
    bw (KB/s)  : min=    1, max= 2003, per=11.51%, avg=238.06, stdev=352.63
    lat (usec) : 250=3.36%, 500=0.75%, 750=0.02%, 1000=0.01%
    lat (msec) : 2=27.67%, 4=66.55%, 10=0.08%, 20=0.03%, 50=0.02%
    lat (msec) : 100=0.01%, 250=0.05%, 500=0.01%, 750=0.05%, 1000=0.19%
    lat (msec) : 2000=1.12%, >=2000=0.06%
  cpu          : usr=0.32%, sys=2.03%, ctx=325115, majf=0, minf=1331
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=14684/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=58736KB, aggrb=2069KB/s, minb=2069KB/s, maxb=2069KB/s, mint=28388msec, maxt=28388msec

Disk stats (read/write):
  vdc: ios=0/14607, merge=0/5, ticks=0/28580, in_queue=28552, util=96.44%

8,hdd顺序写512k

root@demo-2:/mnt/hdd# fio -filename=/mnt/hdd/2G.file -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=512k -size=2G -numjobs=10 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=write, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
...
mytest: (g=0): rw=write, bs=512K-512K/512K-512K, ioengine=psync, iodepth=1
2.0.8
Starting 10 threads
^Cbs: 10 (f=10): [WWWWWWWWWW] [6.9% done] [0K/49664K /s] [0 /97  iops] [eta 07m:36s]
fio: terminating on signal 2

mytest: (groupid=0, jobs=10): err= 0: pid=11953
  write: io=1640.6MB, bw=50644KB/s, iops=98 , runt= 33170msec
    clat (usec): min=248 , max=3259.8K, avg=100932.24, stdev=486802.06
     lat (usec): min=258 , max=3259.8K, avg=100943.60, stdev=486802.26
    clat percentiles (usec):
     |  1.00th=[  274],  5.00th=[ 9408], 10.00th=[ 9792], 20.00th=[10432],
     | 30.00th=[10432], 40.00th=[10432], 50.00th=[10432], 60.00th=[10432],
     | 70.00th=[10432], 80.00th=[10560], 90.00th=[10560], 95.00th=[11328],
     | 99.00th=[2998272], 99.50th=[3129344], 99.90th=[3194880], 99.95th=[3227648],
     | 99.99th=[3260416]
    bw (KB/s)  : min=  157, max=49192, per=11.52%, avg=5836.43, stdev=6423.33
    lat (usec) : 250=0.03%, 500=2.93%, 750=0.03%, 1000=0.03%
    lat (msec) : 10=7.62%, 20=85.71%, 50=0.03%, 100=0.03%, 250=0.03%
    lat (msec) : 500=0.06%, 750=0.03%, 1000=0.06%, 2000=0.34%, >=2000=3.08%
  cpu          : usr=0.28%, sys=0.90%, ctx=101213, majf=0, minf=6879
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 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=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=3281/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
  WRITE: io=1640.6MB, aggrb=50644KB/s, minb=50644KB/s, maxb=50644KB/s, mint=33170msec, maxt=33170msec

Disk stats (read/write):
  vdc: ios=0/3277, merge=0/6, ticks=0/37332, in_queue=37332, util=99.12%

你可能感兴趣的:(linux 磁盘性能fio-hdd)