dd测试IO,,经常会用到,用来简单测试某个目录的读写性能。
本次测试环境:自己电脑的Ubuntu系统~其他Unix/Linux系统也可以用dd.
Tips:dd操作需要三思而行,搞清楚确认没问题再进行操作!一旦方向搞反了数据就没有了。
① /var目录写速度测试,在/var目录下写入一个约800M大小的iotest文件用时测试
# dd if=/dev/zero of=/var/iotest bs=8k count=102400102400+0 records in102400+0 records out838860800 bytes (839 MB) copied, 3.50779 s, 239 MB/s#
② /var目录读速度测试,读取/var目录下这个iotest文件用时测试
# dd if=/var/iotest of=/dev/null1638400+0 records in1638400+0 records out838860800 bytes (839 MB) copied, 4.44191 s, 189 MB/s#
③ /var目录读写速度综合测试,读取/var目录下iotest文件,写入到/var目录下的rwtest文件。
# dd if=/var/iotest of=/var/rwtest1638400+0 records in1638400+0 records out838860800 bytes (839 MB) copied, 11.0764 s, 75.7 MB/s#
本文永久更新链接地址:
理想的路总是为有信心的人预备着