一般来说测试磁盘的IO功能时都是用的:dd if=/dev/zero of=/root/zerofile bs=1M count=256
这样生成出来的文件大约是268M
为什么是/dev/zero,那是因为:/dev/zero文件代表一个永远输出 0的设备文件,使用它作输入可以得到全为空的文件。因此可用来创建新文件和以覆盖的方式清除旧文件。
当然dd还有另外一个参数:oflag=dsync
但是有人和我说:
所以,仅作参考即可,不要太当一回事吧Why are you using the flag dsync? This does not test the disks correctly and often reports bad speeds on SSD systems.
dd also will not test the read/write, it only tests sequential writes. Using ioping you can test the various types of disk speeds including random (the most important) or sequential (the least important).

评论 (0)
暂无评论