NVMe Emulation Performance Optimization
summary
QEMU NVMe emulation moves from ~30 KIOPS to ~330 KIOPS by implementing shadow doorbell buffers, using ioeventfd to avoid full VM exits, adding a dedicated IO thread with eventfd/irqfd-based interrupt delivery, and optional submission-queue polling; about 700 lines change yield an 11x improvement. Admin commands remain on the main loop for safety, shadow-doorbell quirks require a MMIO fallback, polling cuts latency but can reduce IOPS at high queue depth, and some patches are already in QEMU 7.1 while others are under review.
AI-written summary · about
chapters (12)
- 0:00Intro
- 1:12QEMU NVMe - Current Status
- 3:03NVMe Primer
- 6:02Shadow Doorbell Buffer
- 6:56Performance After Shadow DB
- 10:09Thread-safe IRQ Delivery
- 11:32Performance After irqfd
- 13:18Polling
- 15:04Lessons Learned
- 17:12A Wild NVMe Spec Violation Appeared
- 18:28The "fix" (Keith Busch)
- 20:36Patches
related talks
50mOptimizing for NVMe Drives: The 10 Microsecond Challenge
40mAchieving the Ultimate Performance with KVM
26mAnalysis of AMD HW-assisted vIOMMU Implementation and Performance
43mComparing Performance of NVMe Hard Drives in KVM, Baremetal, and Docker
12mWhat's new in QEMU land?
39mQEMU: Emulating Your Way to Success
25m"Enlightening" KVM: Hyper-V emulation
27mVFIO User - Using VFIO as the IPC Protocol in Multi-process QEMU
