建站服务器
1、测试磁盘的纯写入性能 dd if=/dev/zero of=/file
[oracle@11g ~]$ touch ddTest
[oracle@11g ~]$ time dd if=/dev/zero of=/home/oracle/ddTest bs=1k count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.0261858 s, 40.0 MB/s
real 0m0.029s
user 0m0.009s
sys 0m0.017s
[oracle@11g ~]$ du -h ddTest
1.0M ddTest
2、 测试磁盘的纯读取性能 dd if=/file of=/dev/null
[oracle@11g ~]$ time dd if=/dev/zero^Cf=/home/oracle/ddTest bs=1k count=1024
[oracle@11g ~]$ touch test1
[oracle@11g ~]$ time dd if=/home/oracle/test1 of=/dev/null bs=1k count=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000124694 s, 0.0 kB/s
real 0m0.001s
user 0m0.000s
sys 0m0.000s
[oracle@11g ~]$ du -h /home/oracle/test1
0 /home/oracle/test1
3、 测试磁盘的读写性能 dd if=/file1 of=/file2
[oracle@11g ~]$ time dd if=/home/oracle/test1 of=/home/oracle/test bs=1k count=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000124904 s, 0.0 kB/s
real 0m0.002s
user 0m0.001s
sys 0m0.000s