2 ms·
Reordering I/O operations matters a lot for hard drives because seek times depend on where the head is and how far it has to travel. The effects in play for SS
by wtallis 8y ago
Reordering I/O operations matters a lot for hard drives because seek times depend on where the head is and how far it has to travel.
The effects in play for SSDs are very different. Reads are more likely to be performance-critical than writes, so it can be beneficial to limit the number of write operations that are in the drive's queue so that reads can be serviced more quickly. Writes take longer than reads, but they can usually be deferred without causing problems (though the Optane SSD in question doesn't have a write buffer). Deferring operations also sometimes gives the drive the opportunity to combine more host commands into a single media access.
The order of commands issued to a SSD matters much less than the number of currently pending commands. If you're issuing just reads or just writes, there's little benefit to reordering them unless they have different priority levels (which NVMe allows through the creation of separate queues for each priority level, but I don't think Linux currently uses this).
- gregdunn 8y ago>Reads are more likely to be performance-critical than writes Yep. I've worked with multiple environments where people were caught off guard by seeing read latency spikes that were much higher on NVMe drives than regular SSDs. This hit them pretty hard on database-style workloads. Moving to utilizing the Kyber scheduler basically eliminated the latency spikes - it allows you to set a target latency for IO operations and reorders them to keep to those targets. I recommend it for anyone using a blk-mq device that has a mixed read/write workload where latency is important.