CRUM: Checkpoint-Restart Support for CUDA's Unified Memory

Rohan Garg, Apoorve Mohan, Michael B. Sullivan, Gene Cooperman

Introduction

As Graphics Processing Units (GPUs) increasingly dominate the landscape of high-performance computing (HPC), their reliability becomes a primary concern. Modern supercomputers rely heavily on GPU acceleration, but these devices are more susceptible to Detected Unrecoverable Errors (DUEs) than traditional CPUs. To ensure that long-running scientific simulations can survive hardware faults, robust checkpoint-restart mechanisms are essential.

Growth of NVIDIA-powered systems in the Top 100 and Top 500 supercomputers from 2009 to 2018.

However, the evolution of GPU memory management has introduced significant hurdles for traditional checkpointing tools. Specifically, NVIDIA's Unified Virtual Memory (UVM) creates a single, coherent memory space shared between the CPU and GPU, simplifying development but breaking existing transparent checkpointing solutions.

The Challenge of Unified Memory

Historically, checkpointing a CUDA application involved capturing the process memory and restoring it. UVM complicates this because the CUDA user-space library is non-reentrant. Simply saving and restoring an application's memory fails to restore the underlying GPU device driver state. Consequently, developers of large-memory GPU applications have lacked a transparent, efficient way to checkpoint their work without manual, application-specific modifications.

CRUM: A Novel Proxy-Based Framework

To address these limitations, researchers developed CRUM (Checkpoint-Restart for Unified Memory). CRUM enables fast, asynchronous checkpointing for UVM applications by decoupling the application from the proprietary GPU driver.

The Proxy Architecture

The core of CRUM is a proxy process that intercepts CUDA API calls. Instead of the main application communicating directly with the GPU driver, it forwards calls via shared memory to a separate "proxy process." This proxy executes the calls and maintains the actual GPU driver state, isolating the hardware-specific complexity from the application process.

Comparison between the original CUDA execution model and the CRUM proxy-based interception model.

Shadow Pages and Synchronization

Because UVM memory is shared between the proxy and the GPU, the main application cannot access it directly. CRUM solves this by allocating "shadow UVM pages" within the application process. It utilizes Linux user-space page-fault tracking (via mprotect and segmentation fault handlers) to detect when the application attempts to access UVM regions. When a fault occurs, CRUM transparently synchronizes data between the application's shadow pages and the proxy's real UVM pages.

Forked Checkpointing

By isolating the complex GPU state in the proxy, the main application process appears as a standard CPU program to the operating system. This allows CRUM to leverage the standard Linux fork() system call to create a copy-on-write snapshot. While the child process writes the memory state to disk in the background, the parent process can immediately resume computation, significantly reducing downtime.

Evaluation and Key Results

CRUM was evaluated using standard GPU suites like Rodinia 3.1 and real-world HPC benchmarks such as HPGMG-FV and HYPRE. The results demonstrate that CRUM provides a viable path for exascale reliability:

  • Low Runtime Overhead: CRUM introduces an average runtime overhead of just 6% (peaking at 12%), thanks to efficient data transfers using Linux Cross Memory Attach (CMA).
  • Significant Speedups: Forked checkpointing is up to 40x faster than traditional synchronous methods. In a 32 GB memory stress test, CRUM reduced checkpoint time from 45 seconds to just 4.1 seconds.
  • Scalability: In large-scale tests (32 MPI ranks across 4 nodes), forked checkpointing took only 2.5% of the time required by naive approaches.

Limitations and Future Directions

While CRUM offers a powerful solution, it has trade-offs. The shadow page mechanism effectively doubles the host memory requirements for UVM regions. Additionally, Linux memory permission constraints force CRUM to assume certain memory access patterns, which may not hold for all irregular workloads. Future work will need to address the emergence of Heterogeneous Memory Management (HMM), which may require a redesign of CRUM's interception layer.

Despite these challenges, CRUM demonstrates that decoupling GPU state through proxy processes and leveraging OS-level primitives can restore critical reliability features to modern GPU-accelerated computing.

Summary updated

Abstract

Unified Virtual Memory (UVM) was recently introduced with CUDA version 8 and the Pascal GPU. The older CUDA programming style is akin to older large-memory UNIX applications which used to directly load and unload memory segments. Newer CUDA programs have started taking advantage of UVM for the same reasons of superior programmability that UNIX applications long ago switched to assuming the presence of virtual memory. Therefore, checkpointing of UVM has become increasing important, especially as NVIDIA CUDA continues to gain wider popularity: 87 of the top 500 supercomputers in the latest listings use NVIDIA GPUs, with a current trend of ten additional NVIDIA-based supercomputers each year. A new scalable checkpointing mechanism, CRUM (Checkpoint-Restart for Unified Memory), is demonstrated for hybrid CUDA/MPI computations across multiple computer nodes. The support for UVM is particularly attractive for programs requiring more memory than resides on the GPU, since the alternative to UVM is for the application to directly copy memory between device and host. Furthermore, CRUM supports a fast, forked checkpointing, which mostly overlaps the CUDA computation with storage of the checkpoint image in stable storage. The runtime overhead of using CRUM is 6% on average, and the time for forked checkpointing is seen to be a factor of up to 40 times less than traditional, synchronous checkpointing.
BibTeX
@inproceedings{garg2018crum,
  author = {Rohan Garg and Apoorve Mohan and Michael B. Sullivan and Gene Cooperman},
  title = {{CRUM: Checkpoint-Restart Support for CUDA's Unified Memory}},
  booktitle = {CLUSTER},
  year = {2018},
  url = {https://openreview.net/forum?id=n3eXtslD7a},
}
Figure