Here's why you need performance tuning, but there are really two reasons: one is to get better performance (if what you already have is working fine, but tuning it can work even better). The second is to meet increasing business requirements through performance tuning.
Hard Disk Testing And Tuning
Hardware
Hard Disk Type
NVME > SSD > HDD
Different hardware manufacturers also have different performance
Disk topology
Single plate JBOD/RAID groups
The RAID group type affects the write performance
Hard disk backplane
Direct/Expander
RAID Card
- Indicates the processing performance and features of the RAID controller card, and whether the RAID controller card has a cache
- RAID firmware versions also affect performance. You are advised to upgrade the LATEST FW
The BIOS configuration
BIOS Options | Setting Value |
---|---|
Support Smmu | Disabled |
CPU Prefetching Configuration | Disabled |
Power Policy | Performance |
PCIe Max Payload | 512B (Suitable for NVMe) |
960G SSD Hard Drive Test:
fio --ioengine=libaio --randrepeat=0 --norandommap --filename=/dev/sdb --numjobs=1 --iodepth=128 --rw=write --thread --direct=1 --group_reporting --name=mytest --ramp_time=60 --runtime=3600 --time_based --bs=128k --output=128K_seqW.log --log_avg_msec=1000 --write_iops_log=128K_seqW_iops.log --write_lat_log=128K_seqW_lat.log
BIOS untuned test data (869MB/s) :
BIOS tuning test data (871MB/s) :
OS Configuration
IO algorithm, queue depth, etc
OS driver and disk FW
NVMe disk drivers and FW versions affect performance
Linux I/O scheduler
If the Linux kernel is lower than 4.12, select NOOP for SSDs (none for NVMe) and CFQ for HDDs
If the value is greater than or equal to 4.12 in the Linux kernel, enable BLK_MQ, select NOOP for SSD, and mq_deadline for HDD
Modification method:
For example echo it > / sys/block/SDB/queue/scheduler
Turn off IO merge
echo 2 > /sys/block/sdb/queue/nomerges