###写测试####
把/vdb1盘的内容重定向到空null;bs为一次64M,一共80次,iflag为刷新缓存
dd if=/dev/vdb1 of=/dev/null bs=64M count=80 iflag=direct
####读测试#####
hdparm -t /dev/vda1
小文件4k测试
测IOPS:fio -direct=1 -iodepth=128 -rw=randrw -ioengine=libaio -bs=4k -size=10G -numjobs=1 -runtime=1000 -group_reporting -name=/path/testfile
大文件1024k测试
测吞吐:fio -direct=1 -iodepth=64 -rw=randrw -ioengine=libaio -bs=1024k -size=10G -numjobs=1 -runtime=1000 -group_reporting -name=/path/testfile
如果报错
[root@yybGame2 temp]# dd if=/dev/vdb1 of=/dev/null bs=64M count=80 iflag=direct
-bash: dd if=/dev/vdb1 of=/dev/null bs=64M count=80 iflag=direct: No such file or directory
[root@yybGame2 temp]# dd if=/dev/vdb1 of=/dev/null bs=64M count=80 iflag=direct
dd: invalid number `80\302\240iflag=direct'
请先粘贴到记事本,然后再在记事再贴粘到命令终端执行,
不然他会不识别这个bash
转载于:https://blog.51cto.com/yht1990/2165080