Native Command Queuing: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to: navigation, search
m (Reverted edits by 221.134.144.14 to last revision by Alansohn (HG))
(History)
Line 2: Line 2:
 
'''Native Command Queuing''' (NCQ) is a technology designed to increase performance of [[SATA]] [[hard disk]]s 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 (computing)|server]]-type applications.
 
'''Native Command Queuing''' (NCQ) is a technology designed to increase performance of [[SATA]] [[hard disk]]s 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 (computing)|server]]-type applications.
   
==History==
+
==History is Very BAD==
   
 
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.
 
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.

Revision as of 14:18, 28 October 2009

File:NCQ.png
This diagram illustrates the difference in seek order between a drive with NCQ and one without. In both drives, blocks are requested in the order 1, 2, 3, 4. Without NCQ, the blocks are accessed in the order in which they were requested. With NCQ, the requests are reordered by angular position, taking one less revolution of the disk to scan all four blocks.

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.

History is Very BAD

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 ATA TCQ in that in NCQ, the host bus adapter programmed its own first party DMA engine with the DMA parameters that the CPU gave when it issued the command, and that in ATA TCQ, the CPU must be interrupted by the ATA device so that the CPU can ask the ATA device which command is ready to be executed so that the CPU can program the ATA host bus adapter's third party DMA engine; and that each command is equal in importance in NCQ. 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 outstanding commands[1][2] (31 in practice[3]).

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 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.[4] Windows XP requires the installation of a vendor-specific driver even if AHCI is present on the host bus adapter. Windows Vista natively supports both AHCI and NCQ. FreeBSD fully supports AHCI and NCQ since version 8.0.

NCQ in Solid-State Drives

NCQ is also used in newer solid-state drives where the drive encounters latency on the host, rather than the other way around. For example, Intel's X25-E Extreme solid-state drive uses NCQ to ensure that the drive has commands to process while the host system is busy processing CPU tasks. [5]

See also

References

External links