SATA硬碟和SSD硬碟效能測試對比
測試工具: fio
測試物件: SATA硬碟, SSD硬碟
測試專案:順序讀、隨機讀、順序寫、隨機寫
1. 順序讀
測試命令:fio -name iops -rw=read -bs=4k -runtime=60 -iodepth 32 -filename /dev/sda -ioengine libaio -direct=1
測試結果:
SATA硬碟 bw(io頻寬)=205MB/s, iops=51455, util=99.87%(磁碟使用率)
SSD硬碟 bw=311MB/s, iops=77911, util=99.87%
2. 隨機讀
測試命令:fio -name iops -rw=randread -bs=4k -runtime=60 -iodepth 32 -filename /dev/sda -ioengine libaio -direct=1
測試結果:
SATA硬碟 bw=547KB/s, iops=133, util=99.92%
SSD硬碟 bw=246MB, iops=61746, util=99.87%
3. 順序寫
測試命令:fio -name iops -rw=write -bs=4k -runtime=60 -iodepth 32 -filename /dev/sda -ioengine libaio -direct=1
測試結果:
SATA硬碟 bw=197MB/s, iops=49408, util=100.00%
SSD硬碟 bw=333MB/s, iops=83333, util=99.88%
4. 隨機寫
測試命令:fio -name iops -rw=randwrite -bs=4k -runtime=60 -iodepth 32 -filename /dev/sda -ioengine libaio -direct=1
測試結果:
SATA硬碟 bw=558KB/s, iops=136, util=99.91%
SSD硬碟 bw=120MB/s, iops=30168, util=99.89%
結論: 從結果來看,SSD硬碟在順序讀寫上面是SATA硬碟的1.5~1.7 倍左右,高的並不算明顯;
而在隨機讀寫方面,SSD硬碟是SATA硬碟的200~400倍。