hard drives
Tags: hardware
NVMe
- NVMe drives will lie about write speeds under low traffic
- NVMe drives are good for append-operations (aka structured logs)
- linux has
nvme
to deal with this - in theory, the drives and the controllers are different, but in practice, these are sold as one whole thing
- https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4c-2021.06.28-Ratified.pdf
- Leverages PCIe bus
- NVMe driver replaces the old block layer requester
Writes and Reads
- NVMe writes and reads are done through two circular buffers, a submission queue and a completion queue.
- When the host system has a command to send to the SSD, it places the command in the submission queue and then rings the doorbell. This updates the tailpointer of the queue
- Similar thing happens for completion queues, the drive updates the head doorbell when something is done
VS SATA and SCSI
- NVMe supports 64k queues with 64k commands per queue, so you have extra parallelism
- https://www.architecting.it/blog/performance-analysis-sas-sata-nvme/