CPU GPU memory sharing improved with portable efficient library

Characterizing CPU-GPU Memory Sharing over Unified Memory Architecture

Operating SystemsHardware Architecture

Summary

Sharing memory between a computer’s processor (CPU) and its graphics card (GPU) can be tricky and slow. The authors studied how this memory sharing works on several different computer platforms and found common problems that hurt performance or cause errors. They created a library called libumsh that makes memory sharing faster and more reliable across different systems. When tested on real-world applications, libumsh cut the time spent moving data by up to 75% and reduced coordination overhead by up to 90%.

What this means in practice

  • For gpu software developers: Use libumsh to make CPU GPU shared memory faster and more reliable in software running on diverse hardware platforms.
  • For high performance computing teams: Cut data transfer times and overhead by integrating libumsh in workflows on unified memory equipped multi GPU systems like NVIDIA DGX Spark.

Authors

Jinrong Yang, Zimeng Wang, Rong Chen, Haibo Chen

Abstract

Unified Memory Architecture (UMA) enables the CPU and GPU to share a single physical memory. However, its complexity and opacity often drive applications back to inefficient copying or to incorrect direct access that sacrifices performance or even correctness. This paper presents a comprehensive study of CPU-GPU memory sharing on UMA, covering correctness and performance across data-plane transmission and control-plane coordination on four platforms. It yields four findings that guide libumsh, a portable library that delivers correct and efficient memory sharing across platforms and extends to emerging ones (e.g., NVIDIA DGX Spark). Applied to nine real-world systems, libumsh reduces data-plane time by 16-75% and control-plane overhead by 7-90%.