Repository navigation
[FEA] Expand RMM benchmarking #2385
Copy link
Copy link
Open
Labels
feature requestNew feature or requestNew feature or request
Description
RMM has some C++ benchmarks in cpp/benchmarks/, but they are mostly standalone microbenchmarks. CI builds them, but does not execute them to verify they are runnable. Here are some areas we might be able to improve the benchmark suite:
Add benchmark smoke tests
Register very small benchmark invocations as CTest tests or CI smoke jobs to ensure executables actually run, parse arguments, and don’t crash. Keep these separate from performance-regression checks.
Refactor from GBenchmark to NVBench to standardize benchmark methodology
- Establish common benchmark patterns for memory-resource factory selection (currently repeated in a few places), CUDA event timing, warmup, output counters, environment reporting, common CLI options.
- Use CUDA event timing for async CUDA work, and make sync costs explicit when intentionally measured.
Broaden memory-resource coverage
- Current benchmarks cover resources like
cuda,cuda_async,pool,arena,binning, andmanagedin some places, but coverage is inconsistent. Add focused benchmarks for:- Comparisons between RMM resources and their closest CCCL resource equivalents (which may help us find differences in default options)
cuda_async_managed_memory_resource(we want to replace this with the CCCL equivalent)statistics_resource_adaptor,tracking_resource_adaptor-- want to track overhead costsprefetch_resource_adaptor-- measure performance with/without prefetchingpinnedandsystemhost resources where supported- Especially
cudaHostAllocvs. a pinnedcudaMemPool_t
- Especially
Improve replay benchmarking
- The replay benchmark currently rejects non-default streams. Supporting real stream IDs and stream ordering would make it much more representative.
- Add a small set of checked-in synthetic trace fixtures plus optional larger RAPIDS workload traces, possibly a TPC-H derived workload from Velox-cuDF.
- Report richer metrics: ops/sec, peak live bytes, allocation failures, upstream allocations, fragmentation-like indicators.
Add realistic workload suites
Beyond random allocations, add stable workload shapes that model actual users:
- small allocation churn
- mixed small/large allocations
- long-lived plus short-lived allocations
- cross-stream allocate/free
- multithreaded allocation pressure
- OOM/failure-callback paths
device_buffer/device_uvectorlifecycle-heavy workflows
As noted above, these could be modeled with TPC-H derived workloads.
Add Python-level benchmarks
This is probably low priority, as most intensive RMM work happens in C++. There does not appear to be a Python benchmark suite. We could add benchmarks for:
rmm.DeviceBuffer- Python memory-resource creation/switching
- pylibrmm wrapper overhead
- Numba/CuPy allocator integration paths
- Measuring integration overhead is probably one of the more useful things to do as we are rethinking the Python API for integration with other libraries
- logging/statistics overhead from Python
Improve documentation
Add a dedicated benchmark doc with:
- build command:
build-all -DBUILD_BENCHMARKS=ONfor devcontainers, something else forbuild.sh(?) - executable locations under
cpp/build/latest/gbenchmarks/ - example invocations
- JSON output examples
- recommended flags for reproducible local runs
- guidance on interpreting results
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsTo-do
Activity
vyasr commentedon May 15, 2026
I wonder how much of this effort will effectively wind up being to justify improvements in CCCL as we work to migrate so many core types into CCCL. IOW will these actually be long-lived benchmarks?
bdice commentedon Jun 30, 2026
I think it is valuable enough to justify a small scale effort here. As we move RAPIDS towards CCCL resource implementations (like cuda::shared_device_memory_pool instead of rmm::mr::cuda_async_memory_resource), we should have some comparative benchmarks to ensure the performance is stable for user applications. Having concrete performance numbers (for both simulated and real workloads) will also help inform how we educate users about how to choose a resource.