TIDB磁盘FIO测试

48 阅读1分钟
  1. fio测试
1. 
下载测试包
wget http://download.pingcap.org/fio-3.8.tar.gz

解压包
tar xf fio-3.8.tar.gz
cd fio-3.8
ls
随机读测试
随机读测试 read iops 不低于 40000
[root@tikv01 ~]# ./fio -ioengine=psync -bs=32k -fdatasync=1 -thread -rw=randread -size=10G -filename=fio_randread_test.txt -name='fio randread test' -iodepth=4 -runtime=60 -numjobs=4 -group_reporting --output-format=json --output=fio_randread_result.json
[root@tikv01 ~]# rm fio_randread_test.txt
[root@tikv01 ~]# python parse_fio_output.py --target='fio_randread_result.json' --read-iops
随机读与顺序写混合测试
随机读与顺序写混合测试 read iops 不低于 10000
随机读与顺序写混合测试 write iops 不低于 10000
[root@tikv01 ~]# ./fio -ioengine=psync -bs=32k -fdatasync=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randread_write_test.txt -name='fio mixed randread and sequential write test' -iodepth=4 -runtime=60 -numjobs=4 -group_reporting --output-format=json --output=fio_randread_write_test.json
[root@tikv01 ~]# rm fio_randread_write_test.txt
[root@tikv01 ~]# python parse_fio_output.py --target='fio_randread_write_test.json' --read-iops
[root@tikv01 ~]# python parse_fio_output.py --target='fio_randread_write_test.json' --write-iops
随机读与顺序写混合测试 read latency (ns) 不高于 250000
随机读与顺序写混合测试 write latency (ns) 不高于 30000
[root@tikv01 ~]# ./fio -ioengine=psync -bs=32k -fdatasync=1 -thread -rw=randrw -percentage_random=100,0 -size=10G -filename=fio_randread_write_latency_test.txt -name='fio mixed randread and sequential write test' -iodepth=1 -runtime=60 -numjobs=1 -group_reporting --output-format=json --output=fio_randread_write_latency_test.json
[root@tikv01 ~]# rm fio_randread_write_latency_test.txt
[root@tikv01 ~]# python parse_fio_output.py --target='fio_randread_write_latency_test.json' --read-lat
[root@tikv01 ~]# python parse_fio_output.py --target='fio_randread_write_latency_test.json' --write-lat
顺序写测试  不低于8000
./fio -ioengine=psync -bs=32k -fdatasync=1 -thread -rw=write  -size=10G -filename=fio_write_writ_test.txt -name='fio sequential write test' -iodepth=4 -runtime=60 -numjobs=4 -group_reporting --output-format=json --output=fio_write_result.json
python parse_fio_output.py --target='fio_write_result.json' --summary