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%
网友评论