TL;DR
The Compute Express Link (CXL) standard promises to revolutionize computing by enabling memory disaggregation, but the lack of mature hardware necessitates robust simulation tools. This paper introduces CXL-DMSim, an open-source, full-system simulator that accurately models CXL memory devices with high fidelity and performance comparable to gem5. Crucially, CXL-DMSim is the first such simulator to be rigorously validated against real CXL FPGA and ASIC hardware, providing a reliable platform for future CXL research.
What Problem Does This Paper Address?
Modern computing systems are increasingly bottlenecked by memory capacity and bandwidth, a problem exacerbated by the trend of memory capacity per core decreasing while application demands (especially in AI/ML and big data) skyrocket. Memory disaggregation, enabled by technologies like CXL, offers a solution by decoupling memory from CPUs, allowing for flexible memory pooling and expansion. However, CXL is still in its early stages, with limited commercial products available. This lack of mature hardware makes it difficult for researchers and developers to explore CXL's potential, evaluate its performance, and design new systems. Existing simulation and emulation approaches have significant limitations, including lack of full-system support, inaccurate modeling of CXL's physical characteristics, and insufficient validation against real hardware. This paper addresses this gap by providing a highly accurate, validated, and flexible full-system simulator for CXL disaggregated memory systems.
Methods
CXL-DMSim is built upon the widely-used gem5 full-system simulator. Its core contributions include:
- Flexible CXL Memory Expander Model: A type-3 CXL device model is implemented, supporting various memory technologies like DRAM, NVM, and Flash. This model is designed to be technology-agnostic.
- CXL Protocol Support: The simulator implements the CXL.io and CXL.mem sub-protocols, essential for device enumeration, configuration, and memory access. CXL.io leverages gem5's existing PCI protocol, while CXL.mem involves new packet handling and internal component extensions.
- Dual Management Modes: CXL-DMSim supports two modes for managing CXL memory:
- Application-Managed (AM): Applications directly manage CXL memory using a dedicated device driver and system calls (e.g.,
mmap). This offers flexibility but requires application modification. - Kernel-Managed (KM): The operating system kernel treats CXL memory as a NUMA node, allowing applications to access it transparently via standard memory allocation interfaces. This mirrors real-world deployment.
- Hardware Validation: A key innovation is the rigorous validation of CXL-DMSim against a real-world CXL 1.1 testbed, featuring both FPGA and ASIC-based CXL memory devices. This ensures the simulator's accuracy and realism.
- CXL Switch Model: Support for CXL switches is included, enabling the simulation of larger, more complex disaggregated memory systems.
Datasets
The paper does not introduce new datasets for training. Instead, it uses standard benchmarks for evaluation:
- LMbench: Used to measure memory access latency.
- STREAM: Used to measure sustainable memory bandwidth.
- Redis (with YCSB workloads): Used to evaluate real-world application performance for memory-intensive and memory-capacity-bound scenarios.
- Deep Learning Recommendation Model (DLRM): Used to evaluate memory bandwidth expansion benefits.
Key Insights and Ideas
- The Critical Need for Hardware Validation: The paper strongly emphasizes that accurate CXL simulation is impossible without validation against real hardware. Their extensive silicon validation against both FPGA and ASIC CXL devices is a significant contribution, demonstrating the simulator's trustworthiness.
- NUMA Emulation vs. Real CXL: The study highlights that simply emulating CXL memory as a remote NUMA node (a common prior approach) fails to capture the true performance characteristics and latency differences compared to actual CXL devices.
- CXL's Performance Trade-offs: While CXL memory offers significant advantages in capacity and bandwidth, it comes with higher latency compared to local DDR memory. This trade-off is crucial for latency-sensitive applications, requiring careful deployment strategies.
- Congestion Root Cause Identification: CXL-DMSim's observability allowed researchers to pinpoint a congestion bottleneck originating in the CXL controller's response queues under high concurrency, a finding crucial for optimizing CXL system design.
- Expandability for Diverse Memory Technologies: The simulator's architecture is designed to be memory-agnostic, allowing for the integration of emerging technologies like SSDs as memory, showcasing its potential for future tiered memory systems.
Key Results
- High Accuracy: CXL-DMSim achieves an average simulation error of 3.4% across various workloads when compared to real hardware measurements, significantly outperforming prior simulators.
- Latency Differences: CXL-FPGA memory exhibits ~2.88x higher latency than local DDR, while CXL-ASIC latency is ~2.18x higher.
- Bandwidth Performance: CXL-FPGA achieves 45-69% of local DDR memory bandwidth, while CXL-ASIC reaches 82-83%.
- Application Performance Boost:
- For memory-intensive applications like the Viper key-value database, CXL memory expansion can improve performance by up to 23x when local memory is limited.
- For memory-bandwidth-sensitive scenarios like MERCI, performance improvements of approximately 60% were observed.
- Simulation Overhead: CXL-DMSim incurs minimal simulation speed degradation (around 16% higher execution time for CXL-DMSimA compared to native gem5) and a modest increase in host memory usage (average 3.5%).
Limitations and Future Work
- LLC Modeling Discrepancies: The paper acknowledges that gem5's Last-Level Cache (LLC) model has limitations, particularly for data volumes between 1x and 4x the LLC capacity, leading to some discrepancies in intermediate-range latency measurements.
- Disk Modeling: Gem5's disk modeling can introduce errors, especially for workloads involving disk I/O, as observed with the Viper benchmark.
- Future Work:
- CXL.cache Support: Implementing and presenting details of CXL.cache support and its use cases (e.g., CXL-NIC).
- Type-2 Device Support: Incremental support for type-2 devices like CXL-GPUs.
- Distributed Simulation: Developing a distributed CXL-DMSim platform for simulating large-scale disaggregated memory systems across multiple compute nodes.
- CXL-SSD Challenges: Further research into bridging the performance gap between SSD and DRAM, coordinating CXL.io and CXL.mem for SSDs, and exploring volatile vs. non-volatile usage modes for CXL-SSD.
Summary updated