FEMU
NVMe and CXL SSD emulation for storage systems research
FEMU is an SSD emulator built on QEMU/KVM. A guest operating system sees the emulated SSD as a real PCIe device and drives it with its own NVMe or CXL drivers, while FEMU charges NAND, channel and garbage-collection time from a timing model you configure. What you can do with it:
- Run storage software against a device you can change. A real guest kernel drives the emulated SSD, so file systems, databases and SPDK run unmodified. (Get started, tutorials).
- Study the FTL and the flash timing. Mapping schemes, garbage collection policies, write buffering and NAND timing are configurable and traced through the source. (architecture, design notes).
- Prototype new interfaces before the hardware exists. Zoned namespaces, Flexible Data Placement, key-value, computational storage and CXL-attached flash. (choosing a mode).
- Reproduce and extend published work. Pin a commit and a configuration, measure with the device counters, and cite the paper behind each mode. (reproducibility, cite FEMU).
Devices
One binary emulates several kinds of SSD. Several namespaces of different modes can share one controller.
| NoSSD | femu_mode=2 | DRAM device with no media timing; the control condition |
| BlackBox SSD | femu_mode=1 | Device-side FTL, garbage collection and NAND timing |
| FDP | fdp=on | Flexible Data Placement on a BlackBox SSD |
| ZNS | femu_mode=3 | Zoned namespaces with host-managed placement |
| Open-Channel | femu_mode=0 | The host runs the FTL |
| Key-value | femu_mode=5 | The NVMe key-value command set |
| Computational | femu_mode=4 | Programs that run on the device |
| CXL SSD | femu-cxl-ssd | Flash behind a CXL Type-3 memory device |
What it does not model
FEMU models timing, placement and wear. It does not model cells, voltages or raw bit errors, and its backing store is host memory, so data is gone when the emulator exits. The limits are written down rather than left to be discovered: model fidelity.