Slashdot Mirror


NCQ Improves Performance for SATA Hard Drives

EconolineCrush writes "Command queuing has long been a feature of high-end SCSI drives meant for demanding multi-user environments, but it's now starting to pop up in the latest generation of desktop Serial ATA drives. Desktop Serial ATA drives are generally subjected to far less demanding single-user loads, making command queuing's benefits a little harder to quantify. However, it turns out that Native Command Queuing can significantly improve the performance of Serial ATA hard drives with disk-intensive desktop multitasking. With dual-core processors trickling into the mainstream and multitasking poised to become more popular, Native Command Queuing could prove essential for desktop hard drives."

15 comments

  1. This may be informative by dtfinch · · Score: 0, Offtopic

    But is it actually news?

    1. Re:This may be informative by hamanu · · Score: 1

      What about this is news? Well for years I have been telling people that SCSI drives are not just overpriced IDE drives with a different connector, and that the speed difference is due to the protocol, not the raw transfer rate, and I've heard people with their egos bruised by not having the fastest computer parts tell me "no it's not, look at these crappy single-user benchmark scores, the IDE drives with 16 MB of write-back cache turned on by default outperform the scsi disk that are actually writing the data to disk by 1%". All of a sudden they will all say "command queueing is so great!" now that their computers support it. Kinda like mac people said PPC was SO much better until apple switched to intel.

      So the news is the the IDE vs SCSI flamewar will switch from "SCSI is better ... no it's not" to "now that SATA caught up 10 years later SCSI was never better ........ yes it was"

      --
      every _exit() is the same, but every clone() is different.
  2. 64 bit? by daviq · · Score: 0

    "With dual-core processors trickling into the mainstream and multitasking poised to become more popular"

    Don't they mean dual-core and 64bit processors?

    Though I do agree that IDE hard drives have needed a speed boost.

    --
    Go to the w3.org and put Slashdot.org through the validator.
  3. I'm missing something by Intron · · Score: 1

    Command queueing allows the host to disconnect while the drive completes a command. The drive isn't any faster. Queuing only speeds up operation if there are multiple drives so commands would otherwise wait for the bus to be free. This only helps in RAID, or when you have a drive and a CD connected SATA.

    --
    Intron: the portion of DNA which expresses nothing useful.
    1. Re:I'm missing something by Russ+Steffen · · Score: 1

      Command queueing allows the drive to complete requests out of order. So, say the OS issues two read requests, the first one requires a head seek, the second for a block already in the drive's cache. In a drive with command queueing the second request can complete while the head is moving to read the block for the first request.

    2. Re:I'm missing something by Intron · · Score: 1

      For your example to work, the block has to be in the drive's 1MB or so of cache, but not the much larger OS block cache. One possibility would be if the drive is doing readahead, but not the OS, and the data is sequential on disk. But it can also be bad to do readahead since it slows down non-sequential I/O, so it would not normally be turned on on the disk. Hmmm.

      Another example would be if the disk does an elevator sort on its requests and satisfies the shortest seeks first. But this can cause long delays to I/O at the disk edges, especially if the system is very busy. Hmmmm

      Not sure I see a clear-cut win.

      --
      Intron: the portion of DNA which expresses nothing useful.
    3. Re:I'm missing something by hamanu · · Score: 1

      There are better algorithms than elevator, especially since the disk knows it's rotational position and elevator doesn't even use that info.

      The specific algorithm used to makes a group of outstanding requests complete the fastest is up to the disk, some will have good algorithms others will not. The point is that without having command queueing in the protocol you can't use ANY algorithm, and are stuck with in-order seeking.

      --
      every _exit() is the same, but every clone() is different.
    4. Re:I'm missing something by Intron · · Score: 1

      Disks have fewer platters than they used to, so this optimization is less useful than it used to be. The Seagate 120 GB drive with NCQ only has two platters (4 heads). But I suppose you're right overall. A smart scheduler should be able to get some speedup even with just one disk on the bus. They also have an 8MB cache on these things, which is bigger than I expected.

      --
      Intron: the portion of DNA which expresses nothing useful.
    5. Re:I'm missing something by hamanu · · Score: 1

      The number of heads doesn't matter because they can't move independently.

      --
      every _exit() is the same, but every clone() is different.
    6. Re:I'm missing something by Eugene · · Score: 1

      hmm... did you actually read TFA? it has a good and simple explanation complete with illustration to show you what NCQ is about, and it's the very first part of the article.....

  4. NCQ? What about TCQ? by molo · · Score: 1

    How is this different from TCQ (Tagged Command Queuing)? Isn't this already present in SATA implementations?

    -molo

    --
    Using your sig line to advertise for friends is lame.
  5. Re:NCQ? What about TCQ? by BSDFreak · · Score: 1

    http://www.storagereview.com/articles/200406/20040 625TCQ_1.html
    Seems like the same thing according to this.

  6. news? by myukew · · Score: 1

    isn't ncq supported at least since nforce4 chipsets? i have a ncq capable hd in my desktop and didn't pay more than normal. so it can't be that new and shiny to be on slashdot, can it?

  7. Re:NCQ? What about TCQ? by hamanu · · Score: 1

    In a nutshell: old-style IDE TCQ is totally brain damaged and allows out of order execution, but only in-order completion, in other words the disk may have the data ready for your nth request, but can't give them to you until it gets the data for the first, second, third, .... .(n-1)th requests. So the seeking may go faster, but you still have to wait longer than with SCSI TCQ, which leads to the question of why even bother?

    NCQ allows out-of-order completion.

    --
    every _exit() is the same, but every clone() is different.
  8. Not news... by non-poster · · Score: 1
    From here:
    June 25, 2004

    ...

    From the plethora of data presented above, we can draw several conclusions:

    1. SATA TCQ and SATA RAID have the potential to deliver benefits to the server market just as great as those of SCSI TCQ and SCSI RAID.

    ...