Buddy Compression: Enabling Larger Memory for Deep Learning and HPC Workloads on GPUs

Esha Choukse, Michael B. Sullivan, Mike O'Connor, Mattan Erez, Jeff Pool, David W. Nellans, Stephen W. KecklerISCA 2019

Abstract

GPUs offer orders-of-magnitude higher memory bandwidth than traditional CPU-only systems. However, GPU device memory tends to be relatively small and the memory capacity can not be increased by the user. This paper describes Buddy Compression, a scheme to increase both the effective GPU memory capacity and bandwidth while avoiding the downsides of conventional memory-expanding strategies. Buddy Compression compresses GPU memory, splitting each compressed memory entry between high-speed device memory and a slower-but-larger disaggregated memory pool (or system memory). Highly-compressible memory entries can thus be accessed completely from device memory, while incompressible entries source their data using both on and off-device accesses. Increasing the effective GPU memory capacity enables us to run larger-memory-footprint HPC workloads and larger batch-sizes or models for DL workloads than current memory capacities would allow. We show that our solution achieves an average compression ratio of 2.2x on HPC workloads and 1.5x on DL workloads, with a slowdown of just 1~2%.

Introduction

Modern High-Performance Computing (HPC) and Deep Learning (DL) workloads are increasingly hitting a "memory-capacity wall." While GPUs are the accelerators of choice due to their immense memory bandwidth, their physical memory capacity is relatively small and fixed. When a model outgrows GPU memory, developers are forced into inefficient workarounds: scaling out to multiple expensive GPUs, manually orchestrating complex data movement, or relying on Unified Memory (UM) which often leads to severe performance degradation due to page faulting and thrashing.

Buddy Compression addresses this bottleneck with a hardware-based memory compression scheme that increases effective GPU memory capacity by up to 1.9x. By seamlessly offloading incompressible data overflow to a larger, slower "buddy" memory pool via high-speed interconnects, it achieves this capacity boost with less than a 2% performance penalty.

System Architecture

Buddy Compression is the first general-purpose hardware compression design tailored specifically for GPUs. It utilizes a "buddy memory"—a larger memory pool such as host CPU RAM or a disaggregated memory appliance—connected via high-bandwidth interconnects like NVLink2 (150 GB/s) or CXL. This architecture is viable today because modern interconnects are fast enough that the occasional penalty of fetching overflow data does not starve the GPU's compute cores.

The Buddy Compression architecture connects the GPU to various buddy storage alternatives (CPU memory, disaggregated memory, or peer GPU memory) via a high-speed NVSwitch.

Fine-Grained Compression Mechanism

Unlike traditional CPU compression that relies on re-allocating pages, Buddy Compression operates at a fine-grained 128-byte memory-entry level using Bit-Plane Compression (BPC). When memory is allocated, it is assigned a target compression ratio (e.g., 2x).

  • Sufficiently Compressed: If a 128B chunk compresses to the target ratio or better, it is stored entirely in the ultra-fast GPU device memory.
  • Insufficiently Compressed: If the data is incompressible and exceeds the target size, the overflow sectors are stored in the pre-allocated buddy memory.

This mechanism allows the system to handle changing data sizes without triggering expensive page faults or driver-based re-allocations, as the physical allocation footprint on the GPU remains constant.

Distribution of memory sectors between GPU device memory and buddy memory based on the achieved compression ratio relative to a 2x target.

Performance and Capacity Results

The system was evaluated using representative HPC benchmarks (SpecAccel, DOE FastForward) and standard DL training models (ResNet50, VGG16, BigLSTM).

  • Capacity Boost: Buddy Compression achieves an average effective capacity increase of 1.9x for HPC workloads and 1.5x for DL workloads.
  • Near-Ideal Performance: The system performs within 2% of an "ideal" baseline GPU with unlimited high-speed memory. It significantly outperforms Unified Memory in oversubscription scenarios, where UM typically suffers from massive slowdowns.
  • DL Training Speedups: By enabling larger mini-batch sizes, Buddy Compression allows DL models to better utilize GPU compute resources, resulting in an average training throughput speedup of 14% (and up to 30% for memory-hungry models like VGG16).

Conclusion

Buddy Compression provides a practical hardware solution to the GPU memory capacity wall. By leveraging high-speed interconnects and a novel sector-splitting mechanism, it enables GPUs to handle much larger workloads with negligible performance overhead. Future work may include dynamic updating of target compression ratios to further optimize long-running applications.

Summary updated

BibTeX
@inproceedings{choukse2019buddy,
  author = {Esha Choukse and Michael B. Sullivan and Mike O'Connor and Mattan Erez and Jeff Pool and David W. Nellans and Stephen W. Keckler},
  title = {{Buddy Compression: Enabling Larger Memory for Deep Learning and HPC Workloads on GPUs}},
  booktitle = {ISCA},
  year = {2019},
  url = {https://openreview.net/forum?id=22hLSXVuCat},
}
Figure