Native Command Queuing

From Wikipedia, the free encyclopedia

Native Command Queuing (NCQ) is a technology designed to increase performance of SATA hard disks under certain situations by allowing the individual hard disk to internally optimize the order in which received read and write commands are executed. This can reduce the amount of unnecessary drive head movement, resulting in increased performance (and slightly decreased wear of the drive) for workloads where multiple simultaneous read/write requests are outstanding, most often occurring in server-type applications. However, the current (as of 2004) technology actually slows down HD access in certain applications, like games and sequential reads & writes, because of the added latency induced by NCQ logic.[1][obsolete fact]

Native Command Queuing was preceded by Parallel ATA's version of Tagged Command Queuing (TCQ). Because ATA's attempt at integrating TCQ had to put up with the constraint that ATA host bus adapters had to look like ISA bus devices to the operating system, this forced an awkward implementation that failed to gain much acceptance in the market due to extremely high CPU overhead and negligible performance gain. NCQ differs from PATA TCQ in that the command re-ordering is completely done on the drive itself, and each command is equal in importance. This is touted as an optimal solution, since the drive has the most knowledge of its performance characteristics, and is able to take rotational position into account. NCQ and PATA TCQ have a maximum queue length of 32 in-flight commands[2][3] (31 in practice[4]), while SCSI TCQ has a maximum queue length of 264 in-flight commands.

For NCQ to be enabled, it must be supported and turned on in the SATA host bus adapter and in the hard drive itself. The appropriate driver must be loaded into the operating system to enable NCQ on the host bus adapter. Many newer chipsets support the Advanced Host Controller Interface (AHCI), which should allow a generic driver supplied by the operating system to control them and enable NCQ. In fact, newer mainstream Linux kernels support AHCI natively.[5] Unfortunately, Windows XP requires the installation of a vendor-specific driver even if AHCI is present on the host bus adapter. Windows Vista corrects this situation by including a generic AHCI driver.[citation needed]

[edit] See also

[edit] References

  1. ^ Test of Seagate Barracuda 7200.7 NCQ and other drives
  2. ^ PDF white paper on NCQ from Intel and Seagate
  3. ^ Volume 1 of the final draft of the ATA-7 standard
  4. ^ Linux ATA FAQ about NCQ
  5. ^ Linux support status of various Serial ATA host bus adapters

[edit] External links