Skip to Content
Performance Test

Performance Testing

Hard Drive Performance Metrics

Sequential Read/Write (Throughput, commonly measured in MB/s): The file storage location on the hard drive is contiguous.

Applicable scenarios: Large file copying (e.g., video, music). Even if the speed is very high, it has no reference value for database performance.

4K Random Read/Write IOPS (Commonly measured in operations)

4K Random Read/Write Latency (Commonly measured in μs)

Reading or writing data from random locations on a hard drive, 4KB at a time.

Applicable scenarios: Operating system functioning, software operation, databases.

The following tests compare the three performance metrics of database-type bare-metal cloud servers (SAS disk) with SSD-type cloud servers under Raid10 and Raid5.

Test Details

Tool: fio

Official Website:

http://freecode.com/projects/fio

http://brick.kernel.dk/snaps/

Note: Performance testing is recommended to be conducted directly by writing to the bare disk for more accurate data. However, directly testing on a bare disk will destroy the file system structure and lead to data loss. Please ensure that the data on disk is backed up before testing.

Test Commands

512K Sequential Write, Read

/usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=write -ioengine=libaio -bs=512K -numjobs=8 -runtime=1200 -group_reporting -name=test /usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=read -ioengine=libaio -bs=512K -numjobs=1 -runtime=120 -group_reporting -name=test

4K Random Write, Read

/usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=randwrite -ioengine=libaio -bs=4K -numjobs=8 -runtime=120 -group_reporting -name=test /usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 64 -thread -rw=randread -ioengine=libaio -bs=4K -numjobs=8 -runtime=120 -group_reporting -name=test

4K Random Write, Read Latency

/usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=libaio -bs=4K -numjobs=1 -runtime=120 -group_reporting -name=test /usr/bin/fio -filename=/dev/sdb -direct=1 -iodepth 1 -thread -rw=randread -ioengine=libaio -bs=4K -numjobs=1 -runtime=120 -group_reporting -name=test