注意
测试 读速度 不加 --readonly
fio 会 先写 文件 再 读取
直接 --readonly 参数 防止 fio 写入 文件
time fio -filename=./test1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=1m -size=1G -numjobs=1 -runtime=1000 -group_reporting -name=mytesttime fio -filename=./test1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=1G -numjobs=16 -runtime=1000 -group_reporting -name=mytest# 坏块 检查
badblocks -v /dev/sdg3 >  badsectors.txt# 只测试 读性能并
time fio -filename=./test1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=1G -numjobs=16 -runtime=1000 -group_reporting -name=mytest# 只测试 系统盘 性能time fio -filename=/dev/sdg -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=100M  --readonly -numjobs=16 -runtime=1000 -group_reporting -name=mytestnode02 node03 差异 对比
time fio -filename=/dev/sdc -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=100M  --readonly -numjobs=16 -runtime=1000 -group_reporting -name=mytestmytest: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 16 threads
Jobs: 16 (f=16): [rrrrrrrrrrrrrrrr] [100.0% done] [281.6MB/0KB/0KB /s] [72.8K/0/0 iops] [eta 00m:00s]
mytest: (groupid=0, jobs=16): err= 0: pid=2643050: Fri Aug 20 13:10:16 2021read : io=1600.0MB, bw=289931KB/s, iops=72482, runt=  5651msecclat (usec): min=37, max=4127, avg=219.13, stdev=91.42lat (usec): min=37, max=4127, avg=219.20, stdev=91.42clat percentiles (usec):|  1.00th=[  143],  5.00th=[  161], 10.00th=[  171], 20.00th=[  185],| 30.00th=[  193], 40.00th=[  203], 50.00th=[  211], 60.00th=[  219],| 70.00th=[  229], 80.00th=[  243], 90.00th=[  266], 95.00th=[  290],| 99.00th=[  354], 99.50th=[  398], 99.90th=[ 1864], 99.95th=[ 2224],| 99.99th=[ 3120]bw (KB  /s): min=17640, max=18552, per=6.27%, avg=18191.95, stdev=205.40lat (usec) : 50=0.01%, 250=83.46%, 500=16.21%, 750=0.06%, 1000=0.05%lat (msec) : 2=0.13%, 4=0.08%, 10=0.01%cpu          : usr=0.92%, sys=1.80%, ctx=409618, majf=0, minf=16IO 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=409600/w=0/d=0, short=r=0/w=0/d=0latency   : target=0, window=0, percentile=100.00%, depth=1Run status group 0 (all jobs):READ: io=1600.0MB, aggrb=289930KB/s, minb=289930KB/s, maxb=289930KB/s, mint=5651msec, maxt=5651msecDisk stats (read/write):sdb: ios=409594/0, merge=3/0, ticks=88170/0, in_queue=1265, util=98.28%real    0m6.107s
user    0m0.919s
sys     0m1.663s64 集群 存储 性能 排查
node3
time fio -filename=/dev/sda -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=1M  --readonly -numjobs=16 -runtime=1000 -group_reporting -name=mytest
mytest: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=psync, iodepth=1
...
fio-2.1.10
Starting 16 threads
Jobs: 16 (f=16): [rrrrrrrrrrrrrrrr] [0.8% done] [308KB/0KB/0KB /s] [77/0/0 iops] [eta 16m:33s]