Native Command Queuing
The English used in this article may not be easy for everybody to understand. (May 2012)
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.[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 (31 in practice), 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. 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.