磁盘性能测试方法

测试随机写IOPS:

fio -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -bs=4k
-size=10G -numjobs=1 -runtime=1000 -group_reporting
-name=/path/testfile

测试随机读IOPS:

fio -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -bs=4k
-size=10G -numjobs=1 -runtime=1000 -group_reporting
-name=/path/testfile

测试写吞吐量:

fio -direct=1 -iodepth=64 -rw=randwrite -ioengine=libaio -bs=64k
-size=10G -numjobs=1 -runtime=1000 -group_reporting
-name=/path/testfile

测试读吞吐量:

fio -direct=1 -iodepth=64 -rw=randread -ioengine=libaio -bs=64k
-size=10G -numjobs=1 -runtime=1000 -group_reporting
-name=/path/testfile

 

案例:

写:time dd if=/dev/zero of=/mnt/mfs/test2/test500M bs=1024k count=500
读:time dd if=/mnt/mfs/test2/test500M of=/dev/null

1copy写     2copy写     1copy读     2copy读    
1M   0m0.042s 0m0.042s 0m0.017s 0m0.017s
5M 0m0.073s 0m0.079s 0m0.070s 0m0.071s
20M 0m0.250s 0m0.288s 0m0.291s 0m0.376s
50M 0m0.514s 0m0.589s 0m0.896s 0m0.886s
100M 0m0.977s 0m7.497s 0m1.677s 0m1.787s
200M   0m7.910s 0m22.270s 0m2.683s 0m3.129s
500M 0m22.465s 0m51.735s 0m6.559s 0m6.990s
1G 0m52.346s 1m48.056s 0m17.319s 0m17.154s
2G 1m46.224s 3m46.283s 0m41.608s 0m34.435s
10G 9m29.037s 19m26.237s 3m55.222s 3m24.914s

...

此条目发表在linux分类目录。将固定链接加入收藏夹。