Skip to main content
QUICK REVIEW

[Paper Review] CXLMemSim: A pure software simulated CXL.mem for performance characterization

Yiwei Yang, Zhao, Brian|arXiv (Cornell University)|Mar 10, 2023
Parallel Computing and Optimization TechniquesComputer Science3 citations
TL;DR

CXLMemSim is a lightweight, software-only simulator for CXL.mem that enables performance characterization of real-world applications by instrumenting unmodified programs using eBPF and performance counters. It simulates memory latency, bandwidth, and congestion in user-defined CXL.topologies with only 4.41x average slowdown, outperforming full-system simulators like Gem5 by orders of magnitude in efficiency.

ABSTRACT

CXLMemSim is a fast, lightweight simulation framework that enables performance characterization of memory systems based on Compute Express Link (CXL) .mem technology. CXL.mem allows disaggregation and pooling of memory to mitigate memory stranding (underutilized memory trapped on fully loaded servers) in cloud and datacenter environments. However, CXL-attached memory introduces additional latency and bandwidth constraints compared to local DRAM, and real CXL .mem hardware is not yet widely available for empirical evaluation. CXLMemSim addresses this gap by attaching to unmodified applications and simulating CXL-based memory pools in software. It operates by tracing memory allocations and accesses using efficient kernel probes and hardware performance counters, dividing execution into epochs, and injecting timing delays to emulate various CXL .mem latency/bandwidth characteristics. This approach incurs modest runtime overhead while preserving realistic load/store memory access patterns. We implement CXLMemSim on commodity hardware without special devices, and our evaluation shows that it runs orders of magnitude faster than cycle-accurate simulators (e.g., Gem5) for real-world workloads, while accurately modeling the performance impact of CXL .mem. We demonstrate use cases where CXLMemSim enables experimentation with memory pooling configurations, scheduling policies, data migration strategies, and caching techniques that were previously infeasible to evaluate at scale. Key findings include the viability of software-based CXL .mem emulation with low overhead, insights into latency and congestion effects in memory pools, and guidance for system designers to optimize memory disaggregation. Overall, CXLMemSim provides a practical and extensible platform for researchers and practitioners to explore CXL.mem innovations before real hardware becomes commonplace.

Motivation & Objective

  • To address the lack of accessible CXL.mem simulation tools for systems research, as commercial CXL.mem devices are not yet available.
  • To enable performance evaluation of real-world applications using CXL.mem pools without requiring hardware or full-system simulation.
  • To support flexible, user-defined CXL.mem topologies including hierarchical memory pools, switches, and varying bandwidth/latency characteristics.
  • To allow researchers to study memory scheduling, prefetching, and coherency effects in CXL.mem-enabled systems.
  • To provide a low-overhead alternative to full-system simulators like Gem5, which are too slow for practical evaluation.

Proposed method

  • CXLMemSim attaches to an unmodified user program using eBPF to trace memory allocation and performance monitoring events (e.g., LLC misses, L2 stalls).
  • It divides program execution into epochs using a timer, pausing execution periodically to analyze memory access patterns.
  • The Timing Analyzer computes three delay types: latency (relative to local DRAM), congestion (due to switch contention), and bandwidth (due to switch limits).
  • Latency delays are calculated by multiplying memory operations per pool by the difference between pool latency and local DRAM latency.
  • Congestion delays are injected when multiple memory accesses to the same switch occur within a time interval shorter than the switch’s serial transmission time (STT).
  • Bandwidth delays are added when observed bandwidth after latency and congestion exceeds the switch’s bandwidth, using a trace-based bandwidth estimation method.

Experimental results

Research questions

  • RQ1How can systems researchers evaluate the performance impact of CXL.mem topologies on real-world applications before hardware availability?
  • RQ2What is the overhead of simulating CXL.mem behavior using a lightweight, software-only approach compared to full-system simulators?
  • RQ3Can a simulator accurately model both latency and bandwidth constraints in CXL.mem topologies, including congestion at switches?
  • RQ4How does the performance of CXL.mem vary across different memory access patterns and system calls?
  • RQ5What is the impact of memory hierarchy design on application-level performance in CXL.mem-enabled systems?

Key findings

  • CXLMemSim achieves an average slowdown of 4.41x across real-world applications, significantly lower than full-system simulators like Gem5.
  • For the mcf and wrf benchmarks from SPEC2017, CXLMemSim achieves 1215.49s and 17.38s execution time, respectively, compared to 31537.61s and failure in Gem5.
  • On microbenchmarks, CXLMemSim outperforms Gem5 by a factor of 73 on average, with the lowest slowdown observed on mmap_read (7.80s vs. 523.15s in Gem5).
  • The simulator successfully models complex CXL.mem topologies, including hierarchical memory pools and switch-level congestion, using only commodity hardware and performance counters.
  • CXLMemSim enables accurate performance characterization of CXL.mem without requiring modifications to the target application or access to physical CXL.mem hardware.
  • The tool supports evaluation of memory scheduling, prefetching, and coherency mechanisms in CXL.mem environments, making it suitable for systems research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.