SlugLab's CXLMemSim Lets You Test GPU Memory Disaggregation Without the Hardware
SlugLab open-sourced a software framework that emulates CXL 3.0 memory pools, Type 2 GPU coherence, and disaggregated memory without real hardware.
Takeaways
- CXLMemSim is an open source simulator for CXL 3.0 memory systems requiring no CXL hardware.
- Combines a CXL.mem latency and coherency simulator with a QEMU-integrated Type 2 and Type 3 device stack.
- Type 2 GPU path emulates a coherent CXL accelerator and can call real NVIDIA CUDA drivers on the host.
- Ships llama.cpp integration to offload only the KV cache to a CXL Type 2 device with prefetch hints.
- Coherency engine implements MOESI-style directory tracking across distributed nodes using SHM, TCP, or RDMA.
- Supports Dynamic Capacity Devices, GFAM fabric-attached memory, and persistent SSD-backed memory pools with io_uring.
Running large models is increasingly a memory problem rather than a compute problem, and Compute Express Link (CXL) is the interconnect the industry is betting on to fix it. The catch is that real CXL 3.0 hardware with switching, dynamic capacity, and fabric-attached memory is scarce and expensive. CXLMemSim from SlugLab is a pure-software framework that lets you study CXL memory systems, including coherent GPU accelerators and disaggregated pools, without any of that silicon.
The project pairs a CXL.mem latency, bandwidth, topology, and coherency simulator with a QEMU-integrated emulation stack. The implementation targets full-system experiments where guest software talks to a realistic CXL device interface while the host side records and controls protocol-level behavior such as latency, routing, coherency state, directory pressure, and memory placement. An accompanying arXiv paper describes the original CPU-side simulator.
How the four layers stack
The runtime is organized as guest applications talking to a driver or CUDA shim, which talks to a modified QEMU device model, which forwards operations to cxlmemsim_server, which owns the simulated memory pool and coherency state. Two distinct experiments run on this stack:
- Type 3 memory experiments. QEMU forwards memory operations to cxlmemsim_server. The server owns the simulated pool, applies latency and topology policies, and tracks coherency metadata.
- Type 2 accelerator experiments.