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

Optimizing Cache Performance for Graph Analytics

Yunming Zhang, Vladimir Kiriansky, Charith Mendis, Matei Zaharia, Saman P. AmarasinghearXiv 2016

Introduction

Modern graph analytics, such as PageRank and social network analysis, are notoriously inefficient on high-performance hardware. Despite the availability of powerful CPUs, these applications often stall 60–80% of the time because they are waiting for memory. The primary bottleneck is the "random access" pattern: to update a vertex, the program must look up the values of its neighbors, which are scattered across a massive array in memory. When this array exceeds the CPU's Last Level Cache (LLC), the system suffers frequent cache misses, forcing slow fetches from DRAM. While previous "out-of-core" systems addressed the disk-to-memory boundary, those techniques do not translate directly to the smaller performance gap between cache and DRAM.

Methodology: Cagra and CSR Segmenting

To address this, we introduce Cagra, a framework designed to eliminate random DRAM accesses by ensuring the processor spends its time computing rather than waiting for data. The core innovation is CSR Segmenting.

CSR Segmenting: Dividing source vertices into cache-sized segments to ensure cache hits during processing.

Instead of processing the entire graph at once, Cagra divides vertex data into segments that fit perfectly into the LLC. Edges are partitioned into subgraphs based on these segments. When a subgraph is processed, all random reads are guaranteed to hit the cache. Additionally, Cagra employs Frequency Based Clustering, reordering vertices by degree to pack frequently accessed "hot" nodes together, and a Parallel Cache-Aware Merge to handle intermediate updates within the L1 cache, avoiding random DRAM writes. Unlike 2D partitioning schemes used in disk-based systems, Cagra uses a 1D-segmented CSR representation, which provides better multicore scalability and lower runtime overhead.

Evaluation and Results

Cagra was evaluated using massive real-world datasets, including the Twitter graph (1.47B edges) and synthetic RMAT graphs. The system consistently outperformed state-of-the-art frameworks like Ligra and GraphMat.

Impact of Cagra's optimizations on normalized stall cycles and running time compared to a baseline.

Key results include:

  • Speedup: Up to a 5x speedup in PageRank and Label Propagation, and a 4x speedup in Collaborative Filtering over GraphMat and Ligra.
  • Cache Efficiency: On the Twitter graph, Cagra reduced the LLC miss rate from 46% to just 10%.
  • Scalability: Cagra demonstrated superior multicore scalability, achieving a 16x speedup when using 48 hyperthreads on a dual-socket system, significantly better than GridGraph or Hilbert Ordering.

Conclusion

By transforming random DRAM accesses into sequential ones and optimizing for the cache-DRAM boundary, Cagra significantly improves the efficiency of in-memory graph processing. While it requires an initial preprocessing step to segment and cluster the graph, the performance gains across multiple iterations of graph algorithms make it a highly effective solution for large-scale graph analytics. Future work may focus on further NUMA optimizations to minimize cross-socket traffic on multi-socket systems.

Summary updated

BibTeX
@misc{zhang2016optimizing,
  author = {Yunming Zhang and Vladimir Kiriansky and Charith Mendis and Matei Zaharia and Saman P. Amarasinghe},
  title = {{Optimizing Cache Performance for Graph Analytics}},
  year = {2016},
  eprint = {1608.01362},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1608.01362},
}
Figure