1、測試變量
測試條件:
rw=randwread 測試隨機讀的I/O
rw=randwrite 測試隨機寫的I/O
rw=randrw 測試隨機混合寫和讀的I/O
rw=read 測試順序讀的I/O
rw=write 測試順序寫的I/O
rw=rw 測試順序混合寫和讀的I/O
bs= 32k 16k 8k
-size=50G 文件大小也會影響測試iops
rwmixread 混合讀寫時讀的比例,默認爲50
-percentage_random=100,0 :隨機和順序比率
使用如下測試:
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=randwread -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=randwrite -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=readwrite -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=randrw -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
Jobs: 4 (f=4): [r(4)][100.0%][r=309MiB/s,w=0KiB/s][r=19.8k,w=0 IOPS][eta 00m:00s]
Jobs: 4 (f=4): [w(4)][100.0%][r=0KiB/s,w=183MiB/s][r=0,w=11.7k IOPS][eta 00m:00s]
Jobs: 4 (f=4): [M(4)][100.0%][r=126MiB/s,w=130MiB/s][r=8067,w=8291 IOPS][eta 00m:00s]
Jobs: 4 (f=4): [m(4)][100.0%][r=131MiB/s,w=129MiB/s][r=8381,w=8271 IOPS][eta 00m:00s]
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=readwrite -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=readwrite -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
Jobs: 4 (f=4): [M(4)][100.0%][r=133MiB/s,w=136MiB/s][r=8494,w=8709 IOPS][eta 00m:00s]
Jobs: 4 (f=4): [M(4)][100.0%][r=132MiB/s,w=131MiB/s][r=8421,w=8411 IOPS][eta 00m:00s]
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=randwread -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
fio -ioengine=psync -bs=16k -direct=1 -fdatasync=1 -iodepth 4 -thread -rw=randwread -percentage_random=100,0 -size=50G -numjobs=4 -runtime=100 -group_reporting -filename=/data/fio_randread_write_test.txt -name=mytest
rwmixread 混合讀寫時讀的比例,默認爲50
-percentage_random=100,0 :隨機和順序比率