㈠ dd:从一个源读取数据然后以比特形式写到另一个目标地址
[root@linwaterbin ~]# dd if=/dev/zero of=/home/oracle/disktest bs=1M count=512 conv=fdatasync
[root@linwaterbin ~]# echo 3 > /proc/sys/vm/drop_caches
[root@linwaterbin ~]# dd if=/dev/zero of=/home/oracle/disktest bs=1M count=512 conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 27.4893 seconds, 19.5 MB/s
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]# echo 3 > /proc/sys/vm/drop_caches
[root@linwaterbin ~]# dd if=/dev/zero of=/home/oracle/disktest bs=1M count=512 conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 17.3697 seconds, 30.9 MB/s
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]# echo 3 > /proc/sys/vm/drop_caches
[root@linwaterbin ~]# dd if=/dev/zero of=/home/oracle/disktest bs=1M count=512 conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 14.9991 seconds, 35.8 MB/s
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]#
[root@linwaterbin ~]# echo 3 > /proc/sys/vm/drop_caches
[root@linwaterbin ~]# dd if=/dev/zero of=/home/oracle/disktest bs=1M count=512 conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 15.2154 seconds, 35.3 MB/s
㈡ hdparm 有两个参数: -t:磁盘性能检测 -T:内存缓存性能检测 同样建议多次测试取平均
[root@linwaterbin ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 226 MB in 3.02 seconds = 74.82 MB/sec
[root@linwaterbin ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 244 MB in 3.10 seconds = 78.59 MB/sec
[root@linwaterbin ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 246 MB in 3.12 seconds = 78.87 MB/sec
到下载对应版本
[root@linwaterbin Desktop]# rpm -ivh --nodeps rpmforge-release-0.5.2-2.el5.rf.i386.rpm
warning: rpmforge-release-0.5.2-2.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
[root@linwaterbin Desktop]# cd /etc/yum.repos.d
[root@linwaterbin yum.repos.d]# ls
base.repo mirrors-rpmforge-extras redhat.repo rpmforge.repo
mirrors-rpmforge mirrors-rpmforge-testing rhel-debuginfo.repo
[root@linwaterbin yum.repos.d]# yum install -y bonnie++
[root@linwaterbin ~]# bonnie++ -s 512 -r 256 -u root
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
linwaterbin 512M 217 99 32403 14 13798 7 378 99 49235 10 347.0 3
Latency 154ms 2218ms 2099ms 125ms 63304us 2672ms
Version 1.96 ------Sequential Create------ --------Random Create--------
linwaterbin -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 15508 52 +++++ +++ +++++ +++ 27215 91 +++++ +++ +++++ +++
Latency 43819us 20118us 19580us 19834us 19699us 20435us
[root@linwaterbin ~]# yum install -y iozone
[root@linwaterbin ~]# iozone -l 1 -u 1 -r 8K -s 128M
Record Size 8 KB
File size set to 131072 KB
Command line used: iozone -l 1 -u 1 -r 8K -s 128M
Output is in Kbytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 Kbytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
Min process = 1
Max process = 1
Throughput test with 1 process
Each process writes a 131072 Kbyte file in 8 Kbyte records
Children see throughput for 1 initial writers = 125057.24 KB/sec
Parent sees throughput for 1 initial writers = 30640.70 KB/sec
Min throughput per process = 125057.24 KB/sec
Max throughput per process = 125057.24 KB/sec
Avg throughput per process = 125057.24 KB/sec
Min xfer = 131072.00 KB
Children see throughput for 1 rewriters = 513780.34 KB/sec
Parent sees throughput for 1 rewriters = 31989.50 KB/sec
Min throughput per process = 513780.34 KB/sec
Max throughput per process = 513780.34 KB/sec
Avg throughput per process = 513780.34 KB/sec
Min xfer = 131072.00 KB
Children see throughput for 1 readers = 889758.12 KB/sec
Parent sees throughput for 1 readers = 849615.75 KB/sec
Min throughput per process = 889758.12 KB/sec
Max throughput per process = 889758.12 KB/sec
Avg throughput per process = 889758.12 KB/sec
Min xfer = 131072.00 KB