Skip to Content
Performance Test

Performance Testing

Hard Drive Performance Metrics

Sequential Read/Write (Throughput, commonly measured in MB/s): Files are stored consecutively on the hard disk.

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)

Data is read/written at random positions on the hard disk, with each operation being 4KB.

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

The following test compares three performance metrics of database-type UPHost (SAS disks) and SSD-type cloud hosts under Raid10 and Raid5 configurations.

Test Data

Test 1. Sequential read/write 512K

img

Test 2. Random Read/Write 4K (IOPS)

img

Test 3. Random Read/Write 4K (IO Latency)

img

Test Details

Tool: fio

Official Website:

http://freecode.com/projects/fio

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

Note: For performance testing, it is recommended to directly test by writing to the raw disk to obtain more realistic data. However, direct raw disk testing will damage the file system structure and cause data loss. Please confirm that the data on the disk has been backed up before testing.

Test Commands

512K Sequential Write and 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 and 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 and 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