Improve SATA Performance by disabling command queuing.

Just a short and simple way to improve reading performance for SATA Drives.

When you disable the command queueing on the drive, you will allow the kernel to do this solely on its own, which results in overall better performance.

This example on my Server shows an 30mb/s increase, which is for real.

# Default queue_depth is 30
# echo 30 > /sys/block/sda/device/queue_depth /dev/sda:
# hdparm -tTĀ 
/dev/sda:
Timing cached reads: 1730 MB in 2.00 seconds = 865.37 MB/sec
Timing buffered disk reads: 104 MB in 3.04 seconds = 34.20 MB/sec

# queue_depth 1 = disabled
/dev/sda:
Timing cached reads: 2366 MB in 2.00 seconds = 1184.20 MB/sec
Timing buffered disk reads: 192 MB in 3.06 seconds = 62.70 MB/sec

It’s also not a bad idea to increase the readahead Cache:

# Increase readahead cache to 65MB
$ blockdev --setra 65536 /dev/sda

You will want to set this each boot.

Bookmark and Share

Leave a Reply