2014年12月2日星期二

MAC_023:使用dd命令测试硬盘读写速度

运行环境:MAC OS X 10.10.1

1. 测试硬盘纯写速度
time dd if=/dev/zero of=/Users/maping/Share/test bs=8k count=1000000

1000000+0 records in
1000000+0 records out
8192000000 bytes transferred in 10.653967 secs (768915456 bytes/sec)

real 0m10.666s
user 0m0.309s
sys 0m7.085s

2. 测试硬盘纯读速度
time dd if=/Users/maping/Share/test of=/dev/null bs=8k count=1000000

1000000+0 records in
1000000+0 records out
8192000000 bytes transferred in 10.045410 secs (815496836 bytes/sec)

real 0m10.047s
user 0m0.251s
sys 0m3.663s

3. 测试硬盘读写速度
time dd if=/Users/maping/Share/test of=/tmp/test bs=8k count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes transferred in 18.354176 secs (446328943 bytes/sec)

real 0m18.364s
user 0m0.338s
sys 0m10.878s

参考文献:
1. http://blog.csdn.net/feng4656/article/details/11054595