Native Command Queuing

NCQ.svg

Native Command Queuing (NCQ) is a technology designed to increase performance of SATA hard disks on computers. It can do this under certain situations by allowing the individual hard disk to internally optimize the order in which it executes the read and write requests it received. This can reduce the amount of unnecessary drive head movement and resulting in better performance (and slightly decreased wear of the drive) for workloads where multiple read/write requests are outstanding at the same time. This situation most often occurs in server-type applications. However, the current (as of 2004) technology actually slows down HD access in certain applications, like games and sequential reads and 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). ATA's attempt at integrating TCQ was constrained by the requirement that ATA host bus adapters use ISA bus device protocols to interact with the operating system. The resulting high CPU overhead and negligible performance gain contributed to a lack of market acceptance for TCQ.

NCQ differs from PATA TCQ in that the command re-ordering is performed by the drive rather than the operating system, and each command is equal in importance. This is preferable 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 enabled in the SATA host bus adapter and in the hard drive itself. The appropriate device 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.

Related pages

References

  1. "Test of Seagate Barracuda 7200.7 NCQ and other drives". Archived from the original on 2006-11-19. Retrieved 2008-09-13.
  2. "PDF white paper on NCQ from Intel and Seagate" (PDF). Archived from the original (PDF) on 2007-09-26. Retrieved 2008-09-13.
  3. "Volume 1 of the final draft of the ATA-7 standard" (PDF). Archived from the original (PDF) on 2012-04-09. Retrieved 2008-09-13.
  4. "Linux ATA FAQ about NCQ". Archived from the original on 2008-11-06. Retrieved 2008-09-13.
  5. "Linux support status of various Serial ATA host bus adapters". Archived from the original on 2007-03-12. Retrieved 2008-09-13.

Other websites