Pcornel
Storage · Physical Storage Media › NVMe

NVMe Protocol

Cheat sheet · https://pcornel.dk/topic.php?topic=3894

Back to the Topic

Answer

The NVMe protocol is a lean command set for non-volatile memory over PCIe or fabrics. It uses up to 64K queues with 64K commands each and few register accesses, so it scales with CPU cores and flash speed.

Remember

  • Up to 64K queues with 64K commands each.
  • Few register accesses per command.
  • Scales with CPU cores.

First checks

  • nvme id-ctrl /dev/nvme0 — controller capabilities
  • nvme get-feature /dev/nvme0 -f 7 — number of queues
  • cat /sys/block/nvme0n1/queue/scheduler — I/O scheduler (none)

Verify in this order

application → blk-mq → NVMe SQ → controller → CQ

Where it usually breaks

First mismatch in media/firmware → device controller → interface/link → host driver → block device → upper storage layer; preserve identity/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3894

Confirmation

Confirm action

Continue?