The same requests to the hard drive can be completed with different amounts of mechanical movement. The contents of the files will not change, nor will the number of bytes requested. The order of service will change. It is the presence of simultaneously waiting commands that gives the drive the freedom to choose the next appropriate request. Native Command Queuing, NCQ, benefits from this freedom. The number of places in the queue does not mean the appearance of so many independent mechanisms that simultaneously read arbitrary areas of the magnetic surface.
Let’s start with a calculation that is deliberately simpler than a real HDD. Let the position of the head be represented by one hypothetical coordinate from 0 to 100. Initially, it stands at 50. Four independent requests are available at the same time: A at 90, B at 10, C at 80, D at 20. All have the same small volume. Let us set the transition cost equal to the absolute difference in coordinates; reading and rotation are temporarily considered free. These are not the physical cylinders of a particular disk, nor the LBA, nor are they measured milliseconds.
When servicing in the order A, B, C, D, we get movements of 40, 80, 70 and 60 units. Total 250. If you go B, D, C, A, the transitions will be 40, 10, 60 and 10; a total of 120. Under our conditions, less total work occurs without accelerating a single movement and without increasing revolutions. The algorithm was simply allowed to choose a different route among already known independent targets. This is an arithmetic gain under assumptions whose limits we will examine.
| Order of requests | Conditional transition costs | Total cost |
|---|---|---|
| A → B → C → D | 40 + 80 + 70 + 60 | 250 |
| B → D → C → A | 40 + 10 + 60 + 10 | 120 |
If we take the same units as durations within the model and consider all requests to be received at the beginning, the completion times of the first route will be 40, 120, 190 and 250. The average wait until completion is 150. For the second route it is 40, 50, 110 and 120, the average is 80. However, request A, the first in the original order, ended later: at 120 instead of 40. Even this simple calculation shows why improving the overall result does not promise to speed up every client.
Rotation is taken back into account
In a real HDD, the target position is not limited to the radius. After the head moves, the desired sector still has to rotate underneath it. A short seek can arrive just after the desired sector has passed, requiring nearly a full rotation of waiting. A farther radial target will sometimes be accessible earlier, taking into account the angular position. Therefore, sorting numbers in ascending order is a good demonstration of freedom of choice, but not a complete model for efficient drive firmware. The shortest path along a drawn line does not guarantee the shortest access period.
The joint Intel and Seagate document on SATA NCQ is dated July 2003. We read it as a historical explanation of the mechanism, rather than a current announcement or evidence of the performance of modern models. It directly relates reordering to seek and rotational position, also discussing head switching, cache, and fairness constraints. An important idea has survived the age of the document: the internal organization of the target gives the disk information that is not in a simple list of logical addresses of the host.
The LBA sequence does not have to be the physical coordinate line of our example at all. The drive hides the internal placement and handling of defects, and different areas of the surface have different recording conditions. Therefore, neighboring LBA numbers are useful as signs of logical proximity, but do not allow one to construct an exact head route using ordinary subtraction. That is why the calculation included hypothetical positions, clearly separated from the addresses of user blocks. To call them LBA would be to give the invented model unnecessary physical plausibility.
Even the dependence of seek time on the length of movement is nonlinear. Actuator acceleration, braking, and head settling take time. Two short transitions do not have to cost as much as one transition with the same total length. We excluded this to see the net effect of the permutation. Once these mechanical effects are restored, it is necessary to optimize the estimation of time, and not just the distance traveled. Therefore, neither 250 nor 120 from our table can be converted into speedup percentages for an arbitrary HDD.

Each command retains its identity
NCQ allows multiple commands to remain pending on a device and maintains a way to know which one has completed. The historical document describes tags from 0 to 31 and allows for a lower supported depth. The tag is a short identifier for the pending command, not a mandatory completion order. The drive can serve the later request earlier, and the host will match the result with the original request. Without this bookkeeping, the permutation would turn correct data into ambiguous answers.
Thirty-two is the limit of the corresponding SATA NCQ mechanism, and not a promise of any depth for any storage system. The capabilities of the device, controller, and driver must be consistent. Linux libATA Manual describes ATA support, managing queued commands, and error handling. The queue visible to the application can be much longer than the part that has already been sent to the device. Therefore, the number of pending operations in a program cannot be mechanically considered as the number of occupied NCQ tags on a specific HDD.
Linux blk-mq describes software and hardware queues, request distribution, and tags. Several scheduling decisions intervene between the application and the internal disk scheduler. The host is capable of combining compatible operations, holding a subset of requests, and choosing which to dispatch. The drive then selects among the valid commands received. Using “disk scheduler” without specifying the layer conflates different participants. Disabling or changing one host scheduler does not turn the HDD firmware into a mandatory FIFO.
Reordering requires multiple choices to be available. If the program sends one request and waits for it to complete before the next, the drive does not see our four targets at the same time. Once only A appears, it is not yet possible to optimize the order A/B/C/D. Asynchronous organization may open up more independent work for the device, but does not in itself guarantee a win. If all requests are already nearby or the previous one is already being served efficiently, an additional choice will do little to change the necessary mechanics.
The order is allowed to be changed only if the meaning of the operations is preserved. A read that depends on the result of a previous write cannot be arbitrarily rearranged for the sake of a short seek. The file system and block layer express the necessary restrictions, and cache management commands have their own semantics. The presence of tags does not negate data integrity requirements. Correct optimization chooses between feasible orders; the incorrect one gets good time by servicing another task. Our example started with independent requests because this is an essential condition for the calculation.
Who pays in waiting time
Suppose that after each nearby target is served, another nearby request arrives. If you always choose only the most mechanically convenient request, the distant old one may wait indefinitely. This is request starvation. Fairness and limiting delays may require a route that is not the minimum in terms of immediate cost. Such a concession does not necessarily mean poor firmware optimization. The system has users waiting for individual results, and their waiting time does not disappear within a good average.
A queue that is too deep can increase the time a particular request spends in the system. This does not contradict the increase in the total number of completions per second. The device gets more options and makes better use of the mechanical resource, and each new task is met with more work ahead. For a stable regime, the relationship between the average number of requests, completion rate and average time is often expressed by Little’s law. But it must be applied to one accounting scope under suitable steady-state conditions; the arbitrary instantaneous depth does not determine the latency of one future command.
Linux stable ABI sysfs-block specifically describes nr_requests as restricting request allocation to the block layer. This is not a simple synonym for the number of commands inside a SATA drive. The value refers to Linux structures and queuing, and the depth supported by the device has its own interface. In analysis, it is more useful to name the exact field and area than to discuss an unnamed “depth of 32.” The same number read at different levels does not certify the same state.
Linux Block Statistics also counts certain events and intervals. Total request time and elapsed observation time are different values, especially when there is overlapping work. You cannot subtract two lines and automatically declare the result as pure head mechanical time. To evaluate the effect of NCQ, the same set of accesses, access patterns, sizes and caching conditions are needed. If some of the reads are in the cache, the comparison already includes changing the access to the surface, and not just choosing the order of movements.
Sequential reading of a large file and many small random accesses provide fundamentally different possibilities. In the first case, stable transmission of nearby data is important; in the second, the cost of finding each region is significant. Therefore, promising a general percentage of speedup from enabling NCQ without describing the load is meaningless. The historical whitepaper explains the possibility of improvement, but does not specify a guaranteed gain for modern devices. We do not carry over its old marketing language into today’s test table, which the editors do not have.
Finally, the queue does not override the limit of the single selected mechanical resource. Additional pending commands may overlap in transmission and processing by the controller, but arbitrary radial transitions of the same drive do not become independent just from different tags. For drives with a truly different mechanical organization, a different subject of analysis appears. It cannot be obtained by increasing the numerical queue parameter of a regular device. NCQ helps make better use of available mechanics, without increasing the number of independent actuators.
In our model, all requests were known in advance, so the total can be calculated in full. Real firmware does not know the application’s future requests. A decision that works well for the targets already available may appear suboptimal when the next query appears. It is unfair to judge it based on the finished full trace without taking into account the moment of information availability: such analysis gives the algorithm knowledge of the future. The difference between the offline optimum and the feasible online solution explains why one nice route on paper is not a specification of drive behavior.
Even the end of the compared interval must be determined in advance. If you end the experiment after the first three quick queries and forget the last distant one, optimization will seem almost free. But the required set has not yet been completed. For a batch task, the completion time of the entire set is required; for an interactive client, the distribution of delays of its own requests is required. These indicators can diverge quite naturally. The permutation changes the distribution of time between deliverables, so the estimate must retain all the customers to whom the original task promised service.
Let’s return A, B, C and D to the table. The savings of 250 → 120 came from the right to choose the route, and A paid by later completion. With a real HDD, angle, dynamics, cache and fairness rules are added to this debate. Sources verified October 26, 2026; the calculation remains hypothetical. The correct question to ask the queue is therefore concrete: what choice did it open to the drive and whose waiting time changed when the drive used that choice?



