Drive Tuning
Tuning the I/O Scheduler
If HDDs are used as data drives, the deadline policy (default) is recommended.
Run following commands to modify the scheduling policy and view the modification result:
echo deadline > /sys/block/sdx/queue/scheduler cat /sys/block/sdx/queue/scheduler
Kernel Parameter Configuration
- If there are a large number of sequential I/O reads, you are advised to adjust the prefetch size (set the size based on site requirements).
echo 16384 > /sys/block/sdx/queue/read_ahead_kb
- If there are a large number of I/O writes, you are advised to adjust dirty parameters to increase the dirty data refresh frequency and avoid triggering the I/O synchronization flush mechanism.
echo 500 > /proc/sys/vm/dirty_expire_centisecs echo 100 > /proc/sys/vm/dirty_writeback_centisecs echo 90 > /proc/sys/vm/dirty_ratio echo 5 > /proc/sys/vm/dirty_background_ratio
Parent topic: OS Tuning