fio测试磁盘速度

注意

测试 读速度 不加 --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=mytest


time 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=mytest

node02 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=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] [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 2021
  read : io=1600.0MB, bw=289931KB/s, iops=72482, runt=  5651msec
    clat (usec): min=37, max=4127, avg=219.13, stdev=91.42
     lat (usec): min=37, max=4127, avg=219.20, stdev=91.42
    clat 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.40
    lat (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=16
  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=409600/w=0/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):
   READ: io=1600.0MB, aggrb=289930KB/s, minb=289930KB/s, maxb=289930KB/s, mint=5651msec, maxt=5651msec

Disk 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.663s



64 集群 存储 性能 排查

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]


你可能感兴趣的:(fio,监控,性能测试,磁盘)