NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GraphCage: Cache Aware Graph Processing on GPUs

Xuhao ChenarXiv 2019

Abstract

Graph processing on GPUs is often hampered by irregular memory access patterns that lead to poor data locality and cache thrashing. We present GraphCage, a framework that leverages the GPU's Last Level Cache (L2) through a novel Throughput-Oriented Cache Blocking (TOCAB) scheme. By partitioning graphs into subgraphs that fit within the L2 cache and utilizing local ID transformations for coalesced memory access, GraphCage achieves significant speedups over existing frameworks while maintaining a low memory footprint.

Introduction

The irregular nature of graph structures poses a significant challenge for GPU architectures, which are optimized for dense, regular computations. In graph algorithms, sparse connectivity leads to random memory accesses to vertex data. As graph sizes exceed the capacity of the GPU's small caches, these accesses result in frequent "cache thrashing," forcing the system to rely on high-latency DRAM fetches.

Foundational graph processing structures including CSR and traversal orders.

Previous attempts to improve locality, such as the CuSha framework, targeted the GPU's shared memory. However, the extremely limited capacity of shared memory (tens of KBs) necessitates fine-grained partitioning, leading to high preprocessing overhead and increased memory consumption. GraphCage addresses these limitations by targeting the larger L2 cache found in modern GPUs, which has been largely underutilized for locality-based optimizations.

Throughput-Oriented Cache Blocking (TOCAB)

The core contribution of GraphCage is the TOCAB scheme. Unlike complex 2D partitioning, TOCAB utilizes 1D static blocking to divide the graph into subgraphs sized specifically to fit the associated vertex data within the L2 cache. This is implemented using a specialized Blocked CSR format.

The Blocked CSR format used in GraphCage to improve L2 cache locality.

TOCAB's 1D blocking strategy is particularly effective because it minimizes the number of subgraphs compared to 2D methods. For instance, on the Twitter dataset, GraphCage generates only 82 subgraphs, whereas the shared-memory-based CuSha requires 3,467 shards. This reduction in partitioning significantly lowers the overhead associated with merging partial results.

To overcome the overhead of non-coalesced memory writes—a common pitfall of cache blocking—GraphCage introduces a Local ID Transformation. Within each subgraph, destination vertices are mapped to contiguous local IDs. This allows partial results to be stored in a dense partial_sums array, ensuring that memory accesses remain coalesced and efficient.

Coordinated Optimization and Traversal

GraphCage integrates TOCAB with sophisticated load-balancing techniques to maintain high compute utilization across varying subgraph degree distributions. It employs Thread+Warp+CTA (TWC) balancing for push-style kernels and coarse-grained balancing for pull-style kernels.

For traversal-heavy algorithms like Breadth-First Search (BFS), the framework employs a hybrid approach. It utilizes standard data-driven mapping when the active vertex frontier is small and switches to TOCAB only when the frontier grows large enough to benefit from cache blocking. This avoids the overhead of partitioning when the working set already fits naturally within the cache.

Results and Conclusion

Evaluations on diverse real-world datasets, including social networks (LiveJournal, Orkut, Twitter) and web graphs (Wiki2007) with up to 530 million edges, demonstrate the effectiveness of GraphCage. The framework achieves an average speedup of 2× over hand-optimized baselines and 4× over the Gunrock framework for PageRank.

Beyond raw speedup, GraphCage demonstrates superior memory efficiency. By building on the standard CSR format rather than space-intensive COO-like formats, it maintains a lower memory footprint. The framework also shows significantly higher DRAM access efficiency, reducing L2 cache miss rates from 80% to below 20% in many cases. GraphCage establishes L2 cache blocking as a superior strategy for high-performance graph processing on modern GPUs.

Summary updated

BibTeX
@misc{chen2019graphcage,
  author = {Xuhao Chen},
  title = {{GraphCage: Cache Aware Graph Processing on GPUs}},
  year = {2019},
  eprint = {1904.02241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.02241},
}
Figure