使用FIO测试磁盘的iops

FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio 等等。

1. FIO下载安装:

wget http://brick.kernel.dk/snaps/fio-2.1.10.tar.gz
tar zxvf fio-2.1.10.tar.gz 
yum install libaio-devel
cd fio-2.1.10/
make && make install

2. FIO用法:

随机读:

fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=200G -numjobs=10 -runtime=1000 -group_reporting -name=mytest

说明:
filename=/dev/sdb1 测试文件名称,通常选择需要测试的盘的data目录。
direct=1 测试过程绕过机器自带的buffer。使测试结果更真实。
rw=randwrite 测试随机写的I/O
rw=randrw 测试随机写和读的I/O
bs=16k 单次io的块文件大小为16k
bsrange=512-2048 同上,提定数据块的大小范围
size=5g 本次的测试文件大小为5g,以每次4k的io进行测试。
numjobs=30 本次的测试线程为30.
runtime=1000 测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止。
ioengine=psync io引擎使用pync方式
rwmixwrite=30 在混合读写的模式下,写占30%
group_reporting 关于显示结果的,汇总每个进程的信息。

3. 实际测试范例:

以下为随即写测试脚本:RandomWriteServer.sh

#!/bin/bash
#Server /dev/nvme0n1p2上:
#随机写(bs=512B):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=512B):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=512B -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=512B -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=1k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=1k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=1k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=1k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=2k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=2k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=2k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=2k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=4k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=4k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=8k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=8k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=16k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=16k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=32k):
echo  "
-------------------------------------------------------------
随机写(bs=32k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=32k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
" 
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=32k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#随机写(bs=64k):
echo "
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=64k):
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=64k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest
"
fio -filename=/dev/nvme0n1p2 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=64k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

#说明:
#filename=/dev/sdb1测试文件名称,通常选择需要测试的盘的data目录。
#direct=1测试过程绕过机器自带的buffer。使测试结果更真实。
#rw=randwrite测试随机写的I/O
#rw=randrw测试随机写和读的I/O
#bs=16k单次io的块文件大小为16k
#bsrange=512 -2048同上,提定数据块的大小范围
#size=5g本次的测试文件大小为5g,以每次4k的io进行测试。
#numjobs=30本次的测试线程为30.
#runtime=1000测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止。
#ioengine=psyncio引擎使用pync方式
#rwmixwrite=30在混合读写的模式下,写占30%
#group_reporting关于显示结果的,汇总每个进程的信息。

#此外
#lockmem=1g只使用1g内存进行测试。
#zero_buffers用0初始化系统buffer。
#nrfiles=8每个进程生成文件的数量。

4. 结果汇总

(a) 脚本输出结果:rw_client_result.txt


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=512B):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=512B -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=512-512/512-512/512-512, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=2790: Tue Nov 20 12:33:37 2018
  write: io=2592.8MB, bw=44248KB/s, iops=88495, runt= 60001msec
    clat (usec): min=38, max=638, avg=110.95, stdev=18.51
     lat (usec): min=38, max=638, avg=111.15, stdev=18.52
    clat percentiles (usec):
     |  1.00th=[   75],  5.00th=[   81], 10.00th=[   84], 20.00th=[   91],
     | 30.00th=[  101], 40.00th=[  109], 50.00th=[  114], 60.00th=[  118],
     | 70.00th=[  121], 80.00th=[  125], 90.00th=[  131], 95.00th=[  139],
     | 99.00th=[  159], 99.50th=[  165], 99.90th=[  183], 99.95th=[  191],
     | 99.99th=[  213]
    bw (KB  /s): min= 4041, max= 5382, per=10.00%, avg=4425.25, stdev=147.51
    lat (usec) : 50=0.01%, 100=28.68%, 250=71.32%, 500=0.01%, 750=0.01%
  cpu          : usr=2.85%, sys=16.15%, ctx=5309960, majf=0, minf=416
  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=5309844/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=2592.8MB, aggrb=44247KB/s, minb=44247KB/s, maxb=44247KB/s, mint=60001msec, maxt=60001msec

Disk stats (read/write):
  sdb: ios=0/5303358, merge=0/3, ticks=0/537801, in_queue=543429, util=100.00%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=1k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=1k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=1K-1K/1K-1K/1K-1K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=2824: Tue Nov 20 12:34:37 2018
  write: io=5169.4MB, bw=88222KB/s, iops=88221, runt= 60001msec
    clat (usec): min=38, max=779, avg=111.45, stdev=19.48
     lat (usec): min=38, max=779, avg=111.64, stdev=19.50
    clat percentiles (usec):
     |  1.00th=[   75],  5.00th=[   81], 10.00th=[   85], 20.00th=[   91],
     | 30.00th=[   98], 40.00th=[  109], 50.00th=[  115], 60.00th=[  119],
     | 70.00th=[  123], 80.00th=[  127], 90.00th=[  133], 95.00th=[  141],
     | 99.00th=[  161], 99.50th=[  167], 99.90th=[  185], 99.95th=[  193],
     | 99.99th=[  219]
    bw (KB  /s): min= 7594, max=10742, per=10.00%, avg=8823.51, stdev=471.71
    lat (usec) : 50=0.01%, 100=31.71%, 250=68.29%, 500=0.01%, 750=0.01%
    lat (usec) : 1000=0.01%
  cpu          : usr=2.68%, sys=17.54%, ctx=5293520, majf=0, minf=424
  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=5293401/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=5169.4MB, aggrb=88221KB/s, minb=88221KB/s, maxb=88221KB/s, mint=60001msec, maxt=60001msec

Disk stats (read/write):
  sdb: ios=0/5286822, merge=0/0, ticks=0/525813, in_queue=527609, util=100.00%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=2k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=2k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=2K-2K/2K-2K/2K-2K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=2874: Tue Nov 20 12:35:37 2018
  write: io=10629MB, bw=181405KB/s, iops=90702, runt= 60001msec
    clat (usec): min=42, max=669, avg=108.09, stdev=20.89
     lat (usec): min=42, max=669, avg=108.32, stdev=20.90
    clat percentiles (usec):
     |  1.00th=[   74],  5.00th=[   80], 10.00th=[   83], 20.00th=[   88],
     | 30.00th=[   92], 40.00th=[   98], 50.00th=[  105], 60.00th=[  116],
     | 70.00th=[  123], 80.00th=[  129], 90.00th=[  135], 95.00th=[  141],
     | 99.00th=[  161], 99.50th=[  169], 99.90th=[  185], 99.95th=[  193],
     | 99.99th=[  215]
    bw (KB  /s): min=15888, max=22008, per=9.99%, avg=18126.52, stdev=1344.83
    lat (usec) : 50=0.01%, 100=42.91%, 250=57.09%, 500=0.01%, 750=0.01%
  cpu          : usr=2.90%, sys=19.48%, ctx=5442434, majf=0, minf=422
  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=5442245/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=10629MB, aggrb=181405KB/s, minb=181405KB/s, maxb=181405KB/s, mint=60001msec, maxt=60001msec

Disk stats (read/write):
  sdb: ios=0/5434898, merge=0/1, ticks=0/522051, in_queue=527182, util=100.00%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=4k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=2957: Tue Nov 20 12:36:38 2018
  write: io=18936MB, bw=323168KB/s, iops=80792, runt= 60001msec
    clat (usec): min=39, max=585, avg=121.89, stdev=56.71
     lat (usec): min=39, max=586, avg=122.10, stdev=56.72
    clat percentiles (usec):
     |  1.00th=[   64],  5.00th=[   81], 10.00th=[   85], 20.00th=[   89],
     | 30.00th=[   92], 40.00th=[   95], 50.00th=[   99], 60.00th=[  106],
     | 70.00th=[  121], 80.00th=[  143], 90.00th=[  183], 95.00th=[  278],
     | 99.00th=[  338], 99.50th=[  354], 99.90th=[  386], 99.95th=[  398],
     | 99.99th=[  422]
    bw (KB  /s): min=11848, max=43456, per=9.98%, avg=32240.22, stdev=10671.29
    lat (usec) : 50=0.02%, 100=51.63%, 250=41.94%, 500=6.41%, 750=0.01%
  cpu          : usr=2.36%, sys=14.32%, ctx=4847171, majf=0, minf=422
  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=4847602/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=18936MB, aggrb=323168KB/s, minb=323168KB/s, maxb=323168KB/s, mint=60001msec, maxt=60001msec

Disk stats (read/write):
  sdb: ios=0/4839958, merge=0/0, ticks=0/536647, in_queue=537354, util=100.00%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=8k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=8K-8K/8K-8K/8K-8K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=3067: Tue Nov 20 12:37:05 2018
  write: io=20480MB, bw=783045KB/s, iops=97880, runt= 26782msec
    clat (usec): min=42, max=494, avg=99.46, stdev=13.95
     lat (usec): min=42, max=494, avg=99.69, stdev=13.96
    clat percentiles (usec):
     |  1.00th=[   62],  5.00th=[   75], 10.00th=[   84], 20.00th=[   92],
     | 30.00th=[   95], 40.00th=[   98], 50.00th=[  100], 60.00th=[  102],
     | 70.00th=[  104], 80.00th=[  107], 90.00th=[  112], 95.00th=[  117],
     | 99.00th=[  145], 99.50th=[  163], 99.90th=[  193], 99.95th=[  203],
     | 99.99th=[  231]
    bw (KB  /s): min=68160, max=85056, per=10.06%, avg=78789.77, stdev=2084.72
    lat (usec) : 50=0.06%, 100=47.45%, 250=52.49%, 500=0.01%
  cpu          : usr=2.81%, sys=24.09%, ctx=2620690, majf=0, minf=430
  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=2621440/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=20480MB, aggrb=783045KB/s, minb=783045KB/s, maxb=783045KB/s, mint=26782msec, maxt=26782msec

Disk stats (read/write):
  sdb: ios=23/2616759, merge=0/0, ticks=2/224035, in_queue=224125, util=99.91%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=16k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=16K-16K/16K-16K/16K-16K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=3104: Tue Nov 20 12:37:24 2018
  write: io=20480MB, bw=1119.3MB/s, iops=71631, runt= 18298msec
    clat (usec): min=58, max=462, avg=132.85, stdev=21.55
     lat (usec): min=59, max=463, avg=133.25, stdev=21.59
    clat percentiles (usec):
     |  1.00th=[   94],  5.00th=[  111], 10.00th=[  116], 20.00th=[  120],
     | 30.00th=[  123], 40.00th=[  126], 50.00th=[  129], 60.00th=[  131],
     | 70.00th=[  135], 80.00th=[  141], 90.00th=[  155], 95.00th=[  185],
     | 99.00th=[  213], 99.50th=[  221], 99.90th=[  247], 99.95th=[  262],
     | 99.99th=[  310]
    bw (KB  /s): min=101888, max=190752, per=10.28%, avg=117856.91, stdev=5884.59
    lat (usec) : 100=1.28%, 250=98.64%, 500=0.08%
  cpu          : usr=3.00%, sys=17.94%, ctx=1310832, majf=0, minf=274
  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=1310720/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=20480MB, aggrb=1119.3MB/s, minb=1119.3MB/s, maxb=1119.3MB/s, mint=18298msec, maxt=18298msec

Disk stats (read/write):
  sdb: ios=22/1308507, merge=0/1, ticks=2/158415, in_queue=159346, util=99.33%

-------------------------------------------------------------
随机写(bs=32k):
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=32k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=32K-32K/32K-32K/32K-32K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=3122: Tue Nov 20 12:37:36 2018
  write: io=20480MB, bw=1778.3MB/s, iops=56903, runt= 11517msec
    clat (usec): min=69, max=528, avg=164.68, stdev=40.23
     lat (usec): min=70, max=529, avg=165.36, stdev=40.26
    clat percentiles (usec):
     |  1.00th=[   81],  5.00th=[  122], 10.00th=[  127], 20.00th=[  133],
     | 30.00th=[  139], 40.00th=[  143], 50.00th=[  151], 60.00th=[  159],
     | 70.00th=[  177], 80.00th=[  213], 90.00th=[  227], 95.00th=[  237],
     | 99.00th=[  258], 99.50th=[  270], 99.90th=[  302], 99.95th=[  322],
     | 99.99th=[  398]
    bw (KB  /s): min=165440, max=421120, per=10.46%, avg=190440.07, stdev=19394.50
    lat (usec) : 100=1.38%, 250=96.81%, 500=1.81%, 750=0.01%
  cpu          : usr=2.32%, sys=18.26%, ctx=655475, majf=0, minf=271
  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=655360/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=20480MB, aggrb=1778.3MB/s, minb=1778.3MB/s, maxb=1778.3MB/s, mint=11517msec, maxt=11517msec

Disk stats (read/write):
  sdb: ios=23/653761, merge=0/0, ticks=3/99581, in_queue=100240, util=98.92%

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
随机写(bs=64k):
fio -filename=/dev/sdb1 -direct=1 -iodepth=1 -thread -rw=randwrite -ioengine=psync -bs=64k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=mytest

mytest: (g=0): rw=randwrite, bs=64K-64K/64K-64K/64K-64K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 10 threads

mytest: (groupid=0, jobs=10): err= 0: pid=3137: Tue Nov 20 12:37:45 2018
  write: io=20480MB, bw=2300.1MB/s, iops=36801, runt=  8904msec
    clat (usec): min=102, max=559, avg=268.02, stdev=29.95
     lat (usec): min=103, max=561, avg=269.01, stdev=29.94
    clat percentiles (usec):
     |  1.00th=[  211],  5.00th=[  229], 10.00th=[  237], 20.00th=[  245],
     | 30.00th=[  251], 40.00th=[  258], 50.00th=[  262], 60.00th=[  270],
     | 70.00th=[  282], 80.00th=[  290], 90.00th=[  306], 95.00th=[  322],
     | 99.00th=[  354], 99.50th=[  366], 99.90th=[  434], 99.95th=[  462],
     | 99.99th=[  506]
    bw (KB  /s): min=226048, max=239360, per=10.02%, avg=235894.21, stdev=2182.74
    lat (usec) : 250=27.50%, 500=72.49%, 750=0.01%
  cpu          : usr=1.41%, sys=8.65%, ctx=327753, majf=0, minf=13
  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=327680/d=0, short=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=20480MB, aggrb=2300.1MB/s, minb=2300.1MB/s, maxb=2300.1MB/s, mint=8904msec, maxt=8904msec

Disk stats (read/write):
  sdb: ios=30/327546, merge=0/1, ticks=5/83542, in_queue=83654, util=99.05%

(b) 相关表格

result_1.png
result_2.png
IO.png
Bandwidth.png
iops.png
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 213,992评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,212评论 3 388
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 159,535评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,197评论 1 287
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,310评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,383评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,409评论 3 412
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,191评论 0 269
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,621评论 1 306
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,910评论 2 328
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,084评论 1 342
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,763评论 4 337
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,403评论 3 322
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,083评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,318评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,946评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,967评论 2 351

推荐阅读更多精彩内容