6

So basically in class (during a database course) we had to install and run CrystalDiskMark and analyse the numbers.

The only thing I couldn't quite grasp is the fact that my computer (using an SSD) had a higher mb/s number at queue depth 32 then it had with queue depth 1.

If I'm not mistaken queue depth is the amount of tasks waiting to be processed where 1 is typically for a normal user while 32 is more towards a server.

At 4Kb queue depth 1 it had 31,74 mb/s read and 24,13 mb/s write. At 4Kb queue depth 32 it had 163,6 mb/s read and 60,68 mb/s write.

For reading that's more then 5x and more then double the writing. Why does it have that much more mb/s at 32 queue depth? I thought it would be higher at 1 queue depth

2 Answers 2

6

I don't think that this question actually got answered, so here goes a simple attempt.

SSDs are faster at higher queue depths for a couple of reasons:

  1. They are built out of multiple Flash chips. It is simplistic to say that they are RAID 0 inside, but it is somewhat similar. A queue of requests can be serviced from multiple Flash chips at the same time.

  2. Flash is so fast that the latency between responding to a request and getting a new request is a significant part of the process. With a hard disk that reponse/request latency is insignificant compared to rotational delay and head seek time. But with an SSD that waiting is a much larger percentage. Having a queue of requests gives the SSD more work to do after it responds to earlier work.

2
  • So the part that writes and reads Flash is fast but the speed that requests are received/ responses are sent is slow? Aren't those controlled by external factors (ie CPU, Mobo, etc)? If so, how can SSDs improve Q1?
    – SILENT
    Nov 30, 2020 at 21:07
  • 1
    @SILENT: Q1 is difficult to improve. NVMe protocol improved it by making the request/response cycle much faster than SATA / AHCI. Then technology like Optane improved it by having a lower latency than Flash. Optane does not need the complicated wear leveling and FTL lookup tables of Flash so it can go directly to read the data.
    – Zan Lynx
    Nov 30, 2020 at 22:56
3

The most common queue depths to test are a Queue Depth of 1, which is typical of light consumer workloads, and a Queue Depth of 32, which is representative of a heavy workload as might be seen on a on a server (e.g. web server, database server, etc.). Where in that spectrum an SSD will perform best varies based on the drive’s firmware algorithm. Being optimized for high or low queue depths or vice versus is not necessarily a bad thing, but rather a design decision.

Source

So, if the drive you're testing has been optimized for server usage it may/will/should perform better with longer/deeper queues than a drive with a shallow queue (like a low-end desktop drive).

Also keep in mind that the drive controller itself also plays a role in how QD is handled, and how deep of a queue can be accessed at once.

More info regarding queue depth and drive controllers

A decent drive controller can determine which requests are dependant on which, and which type of request it is. It could then use this information to decide which order the commands get passed down to the drive(s), therefore optimizing the throughput.

So in general, queuing allows the drive subsystem (OS, controller, drives, etc.) to determine the optimal order to run the commands in. If the Queue Depth is only 1, then it only deals with 1 command at a time and those optimizations can't be done.

1
  • 1
    I think your source link has died, unfortunately. Here's a different mirror: samsung.com/global/business/semiconductor/minisite/SSD/M2M/html/… I think another relevant counterpoint to Samsung's source is that the "preference" is only one-way, from all the SSDs I've seen. You get either strong QD32 / weak QD1 or strong QD32 / strong QD1. I've never seen weak QD32 / strong QD1. And I mean "strong" relative to other drives, not within the same drive (where QD32 will always be faster than QD1).
    – ikjadoon
    Jul 5, 2016 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .