硬盘

顺序读

  1. fio -name iops -rw=read -bs=4k -runtime=60 -iodepth 32 -filename /dev/sdb1 -ioengine libaio -direct=1
  2. Starting 1 process
  3. Jobs: 1 (f=1): [R(1)][100.0%][r=132MiB/s][r=33.7k IOPS][eta 00m:00s]
  4. iops: (groupid=0, jobs=1): err= 0: pid=6821: Tue Aug 10 14:33:51 2021
  5. read: IOPS=27.9k, BW=109MiB/s (114MB/s)(6529MiB/60003msec)
  6. slat (usec): min=4, max=141, avg= 8.39, stdev= 2.78
  7. clat (usec): min=352, max=1847.1k, avg=1138.47, stdev=6755.94
  8. lat (usec): min=373, max=1847.1k, avg=1147.09, stdev=6756.22
  9. clat percentiles (usec):
  10. | 1.00th=[ 791], 5.00th=[ 816], 10.00th=[ 832], 20.00th=[ 832],
  11. | 30.00th=[ 832], 40.00th=[ 832], 50.00th=[ 865], 60.00th=[ 865],
  12. | 70.00th=[ 865], 80.00th=[ 865], 90.00th=[ 1795], 95.00th=[ 2507],
  13. | 99.00th=[ 5145], 99.50th=[ 5276], 99.90th=[ 5735], 99.95th=[ 5866],
  14. | 99.99th=[16909]
  15. bw ( KiB/s): min= 6688, max=140704, per=99.99%, avg=111414.15, stdev=45159.79, samples=120
  16. iops : min= 1672, max=35176, avg=27853.56, stdev=11289.92, samples=120
  17. lat (usec) : 500=0.01%, 750=0.02%, 1000=87.18%
  18. lat (msec) : 2=7.47%, 4=0.87%, 10=4.44%, 20=0.02%, 50=0.01%
  19. lat (msec) : 250=0.01%, 500=0.01%
  20. cpu : usr=11.79%, sys=30.48%, ctx=1375386, majf=0, minf=51
  21. IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
  22. submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  23. complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
  24. issued rwts: total=1671400,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  25. latency : target=0, window=0, percentile=100.00%, depth=32
  26. Run status group 0 (all jobs):
  27. READ: bw=109MiB/s (114MB/s), 109MiB/s-109MiB/s (114MB/s-114MB/s), io=6529MiB (6846MB), run=60003-60003msec
  28. Disk stats (read/write):
  29. sdb: ios=1670922/1, merge=0/0, ticks=1895656/1, in_queue=1886124, util=99.66%

read: IOPS=27.9k, BW=109MiB/s (114MB/s)(6529MiB/60003msec)

随机读

  1. fio -name iops -rw=randread -bs=4k -runtime=60 -iodepth 32 -filename /dev/sdb1 -ioengine libaio -direct=1
  2. iops: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
  3. fio-3.12
  4. Starting 1 process
  5. Jobs: 1 (f=1): [r(1)][100.0%][r=2398KiB/s][r=599 IOPS][eta 00m:00s]
  6. iops: (groupid=0, jobs=1): err= 0: pid=6862: Tue Aug 10 14:37:58 2021
  7. read: IOPS=591, BW=2365KiB/s (2421kB/s)(140MiB/60442msec)
  8. slat (usec): min=7, max=384, avg=21.79, stdev= 3.10
  9. clat (usec): min=129, max=1324.3k, avg=54082.59, stdev=144089.78
  10. lat (usec): min=148, max=1324.4k, avg=54105.08, stdev=144089.74
  11. clat percentiles (usec):
  12. | 1.00th=[ 178], 5.00th=[ 192], 10.00th=[ 200],
  13. | 20.00th=[ 225], 30.00th=[ 233], 40.00th=[ 239],
  14. | 50.00th=[ 260], 60.00th=[ 297], 70.00th=[ 1090],
  15. | 80.00th=[ 13435], 90.00th=[ 223347], 95.00th=[ 387974],
  16. | 99.00th=[ 700449], 99.50th=[ 817890], 99.90th=[ 968885],
  17. | 99.95th=[1010828], 99.99th=[1132463]
  18. bw ( KiB/s): min= 1536, max= 3224, per=100.00%, avg=2379.46, stdev=332.65, samples=120
  19. iops : min= 384, max= 806, avg=594.82, stdev=83.15, samples=120
  20. lat (usec) : 250=45.95%, 500=15.71%, 750=0.13%, 1000=3.81%
  21. lat (msec) : 2=13.26%, 4=0.19%, 10=0.44%, 20=1.37%, 50=2.25%
  22. lat (msec) : 100=2.21%, 250=5.58%, 500=6.27%, 750=2.05%, 1000=0.72%
  23. cpu : usr=0.80%, sys=2.18%, ctx=35081, majf=0, minf=931
  24. IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=99.9%, >=64=0.0%
  25. submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  26. complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
  27. issued rwts: total=35731,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  28. latency : target=0, window=0, percentile=100.00%, depth=32
  29. Run status group 0 (all jobs):
  30. READ: bw=2365KiB/s (2421kB/s), 2365KiB/s-2365KiB/s (2421kB/s-2421kB/s), io=140MiB (146MB), run=60442-60442msec
  31. Disk stats (read/write):
  32. sdb: ios=35727/1, merge=0/0, ticks=1924287/2, in_queue=1894344, util=98.27%

read: IOPS=591, BW=2365KiB/s (2421kB/s)(140MiB/60442msec)

顺序写

  1. fio -name iops -rw=write -bs=4k -runtime=60 -iodepth 32 -filename /dev/sdb1 -allow_mounted_write 1 -ioengine libaio -direct=1
  2. iops: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
  3. fio-3.12
  4. Starting 1 process
  5. Jobs: 1 (f=1): [W(1)][100.0%][w=10.6MiB/s][w=2716 IOPS][eta 00m:00s]
  6. iops: (groupid=0, jobs=1): err= 0: pid=7038: Tue Aug 10 15:03:35 2021
  7. write: IOPS=2341, BW=9366KiB/s (9591kB/s)(549MiB/60003msec); 0 zone resets
  8. slat (usec): min=8, max=324837, avg=28.17, stdev=889.60
  9. clat (usec): min=398, max=452630, avg=13586.86, stdev=9888.32
  10. lat (usec): min=581, max=455612, avg=13615.69, stdev=9960.20
  11. clat percentiles (msec):
  12. | 1.00th=[ 4], 5.00th=[ 11], 10.00th=[ 12], 20.00th=[ 12],
  13. | 30.00th=[ 13], 40.00th=[ 13], 50.00th=[ 14], 60.00th=[ 14],
  14. | 70.00th=[ 14], 80.00th=[ 15], 90.00th=[ 15], 95.00th=[ 15],
  15. | 99.00th=[ 16], 99.50th=[ 83], 99.90th=[ 126], 99.95th=[ 130],
  16. | 99.99th=[ 426]
  17. bw ( KiB/s): min= 1024, max=18848, per=99.98%, avg=9362.95, stdev=2258.43, samples=120
  18. iops : min= 256, max= 4712, avg=2340.72, stdev=564.61, samples=120
  19. lat (usec) : 500=0.01%, 750=0.01%, 1000=0.01%
  20. lat (msec) : 2=0.01%, 4=2.37%, 10=0.53%, 20=96.17%, 50=0.08%
  21. lat (msec) : 100=0.44%, 250=0.36%, 500=0.03%
  22. cpu : usr=4.44%, sys=13.71%, ctx=139575, majf=0, minf=21
  23. IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
  24. submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  25. complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
  26. issued rwts: total=0,140497,0,0 short=0,0,0,0 dropped=0,0,0,0
  27. latency : target=0, window=0, percentile=100.00%, depth=32
  28. Run status group 0 (all jobs):
  29. WRITE: bw=9366KiB/s (9591kB/s), 9366KiB/s-9366KiB/s (9591kB/s-9591kB/s), io=549MiB (575MB), run=60003-60003msec
  30. Disk stats (read/write):
  31. sdb: ios=0/139931, merge=0/0, ticks=0/1893439, in_queue=1888528, util=99.38%

write: IOPS=2341, BW=9366KiB/s (9591kB/s)(549MiB/60003msec); 0 zone resets

随机写

  1. fio -name iops -rw=randwrite -bs=4k -runtime=60 -iodepth 32 -filename /home/rails/a -size=1G -ioengine libaio -direct=1
  2. iops: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
  3. fio-3.12
  4. Starting 1 process
  5. Jobs: 1 (f=1): [w(1)][100.0%][w=468KiB/s][w=117 IOPS][eta 00m:00s]
  6. iops: (groupid=0, jobs=1): err= 0: pid=7011: Tue Aug 10 14:59:16 2021
  7. write: IOPS=111, BW=448KiB/s (458kB/s)(26.3MiB/60221msec); 0 zone resets
  8. slat (nsec): min=5074, max=48292, avg=24435.86, stdev=3003.83
  9. clat (usec): min=401, max=474484, avg=284725.05, stdev=63390.53
  10. lat (usec): min=426, max=474503, avg=284750.12, stdev=63391.36
  11. clat percentiles (usec):
  12. | 1.00th=[ 1647], 5.00th=[267387], 10.00th=[287310], 20.00th=[287310],
  13. | 30.00th=[287310], 40.00th=[291505], 50.00th=[291505], 60.00th=[295699],
  14. | 70.00th=[295699], 80.00th=[299893], 90.00th=[320865], 95.00th=[333448],
  15. | 99.00th=[367002], 99.50th=[387974], 99.90th=[425722], 99.95th=[425722],
  16. | 99.99th=[476054]
  17. bw ( KiB/s): min= 272, max= 1144, per=99.99%, avg=446.98, stdev=90.02, samples=120
  18. iops : min= 68, max= 286, avg=111.68, stdev=22.51, samples=120
  19. lat (usec) : 500=0.22%, 750=0.16%, 1000=0.15%
  20. lat (msec) : 2=0.62%, 4=0.73%, 10=1.40%, 20=0.68%, 50=0.22%
  21. lat (msec) : 100=0.61%, 250=0.03%, 500=95.18%
  22. cpu : usr=0.17%, sys=0.50%, ctx=6748, majf=0, minf=10
  23. IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=99.5%, >=64=0.0%
  24. submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
  25. complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
  26. issued rwts: total=0,6738,0,0 short=0,0,0,0 dropped=0,0,0,0
  27. latency : target=0, window=0, percentile=100.00%, depth=32
  28. Run status group 0 (all jobs):
  29. WRITE: bw=448KiB/s (458kB/s), 448KiB/s-448KiB/s (458kB/s-458kB/s), io=26.3MiB (27.6MB), run=60221-60221msec
  30. Disk stats (read/write):
  31. sdb: ios=11/6738, merge=0/0, ticks=1537/1915350, in_queue=1640908, util=85.40%

write: IOPS=111, BW=448KiB/s (458kB/s)(26.3MiB/60221msec); 0 zone resets