How to use Native Command Queuing (NCQ) to improve disk performance

The Native Command Queuing (NCQ) feature is an extension of the Serial ATA protocol that tries to optimize the order by which read/write requests are executed on the server's hard disk. You can use NCQ to reduce the unnecessary drive head movement, resulting in increased performance for media server workloads where multiple simultaneous read/write requests can occur.

To enable NCQ, try completing the following:

  1. Restart the server computer and access the system's BIOS during the boot process.
  2. Look for parameters referring to SATA.
  3. Choose AHCI (which would inherently enable NCQ) or Native accordingly.
After you've saved this setting, it should be applied the next time you restart the server computer. After you log on, you can look at the tailing lines in the dmesg log to ensure it's enabled (You should notice AHCI entries confirming that it was set up correctly):
tail -n 100 /var/log/dmesg

Originally Published: For Wowza Streaming Engine on 01-26-2016.

If you're having problems or want to discuss this article, post in our forum.