Serial ATA Native Command Queuing
Summary
Native Command Queuing (NCQ) is among the advanced and most anticipated features
introduced in the Serial ATA II: Extensions to Serial ATA 1.0 Specification, download available at
www.serialata.org. NCQ is a powerful interface/disc technology designed to increase
performance and endurance by allowing the drive to internally optimize the execution order of
workloads. Intelligent reordering of commands within the drive’s internal command queue helps
improve performance of queued workloads by minimizing mechanical positioning latencies on the
drive. This paper will provide a basis for understanding how the features of NCQ apply to
complete storage solutions and how software developers can enhance their applications to take
advantage of Serial ATA NCQ thereby creating higher performance applications.
Introduction
Accessing media on mass storage devices, such as hard disc drives (HDD), can have a negative
impact on overall system performance. Unlike other purely electrical components in a modern
system, HDDs are still largely mechanical devices. Drives are hampered by the inertia of their
mechanical components which effectively limits the speed of media access and retrieval of data.
Mechanical performance can be physically improved only up to a certain point and these
performance improvements usually come at an increased cost of the mechanical components.
However, intelligent, internal management of the sequence of mechanical processes can greatly
improve the efficiency of the entire workflow. The operative words are intelligent and internal,
meaning that the drive itself has to assess the location of the target logical block addresses
(LBAs) and then make the appropriate decisions on the order that commands should be executed
in to achieve the highest performance.
Native Command Queuing is a command protocol in Serial ATA that allows multiple commands
to be outstanding within a drive at the same time. Drives that support NCQ have an internal
queue where outstanding commands can be dynamically rescheduled or re-ordered, along with
the necessary tracking mechanisms for outstanding and completed portions of the workload.
NCQ also has a mechanism that allows the host to issue additional commands to the drive while
the drive is seeking for data for another command.
Operating systems such as Microsoft Windows* and Linux* are increasingly taking advantage of
multi-threaded software or processor-based Hyper-Threading Technology. These features have
a high potential to create workloads where multiple commands are outstanding to the drive at the
same time. By utilizing NCQ, the potential disk performance is increased significantly for these
workloads.
Drive Basics
Hard drives are electromechanical devices, and therefore hybrids of electronics and mechanical
components. The mechanical portions of drives are subject to wear and tear and are also the
critical limiting factor for performance. To understand the mechanical limitations, a short
discussion of how data on is laid out on a drive may be helpful.
Data is written to the drive in concentric circles, called tracks, starting from the outer diameter of
the bottom platter, disc 0, and the first read/write head, head 0. When one complete circle on one
side of the disc, track 0 on head 0, is complete the drive starts writing to the next head on the
other side of the disc, track 0 and head 1. When the track is complete on head 1 the drive starts
writing to the next head, track 0 and head 2, on the second disc. This process continues until the
last head on the last side of the final disc has completed the first track. The drive then will start
writing the second track, track 1, with head 0 and continues with the same process as it did when
writing track 0. This process results in a concentric circles where as writing continues the data
moves closer and closer to the inner diameter of the discs. A particular track on all heads, or
2
*Other names and brands may be claimed as the property of others.
Содержание ST3250620AS - Barracuda 250GB 7200 RPM 16MB Cache SATA 3.0Gb/s Perpendicular Recording Hard Drive
Страница 12: ...Serial ATA Native Command Queuing 12...