Why does a SSD have (a lot) higher mb/s with queue depth 32 then queue depth 1

performancessd

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

Best Answer

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.

Related Question