Disk Testing Data
目录
1 Test tools
1.1 dd
1.2 fio
1.3 iometer
2 Basic Rules
访问硬盘时, LBA数值越小(靠近外圈), 块越大, 顺序特征越好, 读写性能越好.
3 SATA HDD
3.1 T440P硬盘光驱位接入HGST 7.2K/1TB硬盘的测试数据, 64K性能是512B性能的
3.1.1 Disk infomation
Model Family: HGST Travelstar 7K1000 Device Model: HGST HTS721010A9E630 Serial Number: JG40006PG9Z3RC LU WWN Device Id: 5 000cca 6acc48868 Firmware Version: JB0OA3B0 User Capacity: 1,000,204,886,016 bytes [1.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Form Factor: 2.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 6 SATA Version is: SATA 2.6, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Wed Jul 26 22:08:15 2017 CST SMART support is: Available - device has SMART capability. SMART support is: Enabled
3.1.2 dd test
简单查看结果可知, 64K性能是512B性能的15倍.
# bs=512 offset 0 ~$ sudo dd if=/dev/sdb of=/dev/null bs=512 count=100K iflag=direct 102400+0 records in 102400+0 records out 52428800 bytes (52 MB) copied, 6.28613 s, 8.3 MB/s # bs=512 offset 500GB ~$ sudo dd if=/dev/sdb of=/dev/null bs=512 count=100K skip=1G iflag=direct 102400+0 records in 102400+0 records out 52428800 bytes (52 MB) copied, 6.80958 s, 7.7 MB/s # bs=64K offset 0 ~$ sudo dd if=/dev/sdb of=/dev/null bs=64K count=10K iflag=direct 10240+0 records in 10240+0 records out 671088640 bytes (671 MB) copied, 5.20339 s, 129 MB/s # bs=64K offset 500GB ~$ sudo dd if=/dev/sdb of=/dev/null bs=64K count=10K skip=8M iflag=direct 10240+0 records in 10240+0 records out 671088640 bytes (671 MB) copied, 6.36875 s, 105 MB/s # bs=64K offset 896GB ~$ sudo dd if=/dev/sdb of=/dev/null bs=64K count=10K skip=14M iflag=direct 10240+0 records in 10240+0 records out 671088640 bytes (671 MB) copied, 9.24369 s, 72.6 MB/s