Modifying I/O Parameters
Purpose
Modify some I/O parameter settings at the operating system layer to improve server performance.
Procedure
Linux Parameter |
Description |
Recommended Value |
|---|---|---|
/sys/block/${device}/queue/scheduler |
I/O scheduling. deadline or noop is more suitable for MySQL databases. ${device} in the command indicates the drive name. Run the ls -l /sys/block/ command to view the drive names in the directory and use the actual drive name as required. NOTICE:
NVMe drives do not support this operation. |
Set the I/O scheduler of the specified block device to deadline. |
/sys/block/${device}/queue/nr_requests |
Drive throughput. Increase the value to add the drive throughput. ${device} in the command indicates the drive name. Run the ls -l /sys/block/ command to view the drive names in the directory and use the actual drive name as required. |
Set the I/O request queue length of the specified device to 2048. |
Commands
echo deadline > /sys/block/${device}/queue/scheduler
echo 2048 > /sys/block/${device}/queue/nr_requests