我的测试环境是(组装PC):
内核:Linux erico-workstation 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
CPU: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
内存:2根 Size: 2048 MB (kingston ddr2 2G 800M)
Form. Factor: DIMM
Set: None
Locator: A0
Bank Locator: Bank0/1
Type: Unknown
Type Detail: None
Speed: 800 MHz (1.2 ns)
硬盘:ST3250318AS
可以通过使用dd if=/dev/zero f=[/file] 来测试磁盘的纯写入性能
测试情况情况看:
[root@erico-workstation ~]# dd if=/dev/zero f=/erico-san-store/soft/linux.x64_11gR1_database_1013.zip
dd: 正在写入 “/erico-san-store/soft/linux.x64_11gR1_database_1013.zip”: 设备上没有空间
36867617+0 records in
36867616+0 records out
18876219392 bytes (19 GB) copied, 426.553 seconds, 44.3 MB/s
使用dd if=/[file] f=/dev/null 来测试磁盘的纯读取性能
[root@erico-workstation ~]# dd if=/erico-san-store/soft/linux.x64_11gR1_database_1013.zip f=/dev/null
36867616+0 records in
36867616+0 records out
18876219392 bytes (19 GB) copied, 346.902 seconds, 54.4 MB/s
使用dd if=[/file1] f=[/file2] 来测试磁盘的读写性能
[root@erico-workstation soft]# dd if=10201_database_linux_x86_64.cpio.gz_bak_test1 f=10201_database_linux_x86_64.cpio.gz_bak_test2
1481314+1 records in
1481314+1 records out
758433170 bytes (758 MB) copied, 20.069 seconds, 37.8 MB/s
令外可以参考以下命令:
[root@erico-workstation ~]# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 4684 MB in 2.00 seconds = 2341.84 MB/sec
Timing buffered disk reads: 276 MB in 3.01 seconds = 91.71 MB/sec
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8404772/viewspace-612194/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8404772/viewspace-612194/
本文介绍了在Linux环境下如何使用dd命令进行磁盘读写性能测试的方法,并提供了具体的测试案例及结果分析。
1401

被折叠的 条评论
为什么被折叠?



