Graphyti: A Semi-External Memory Graph Library for FlashGraph

Disa Mhembere, Da Zheng, Carey E. Priebe, Joshua T. Vogelstein, Randal C. BurnsarXiv 2019

Introduction

Modern graph datasets, such as large-scale social networks or biological maps, frequently exceed the RAM capacity of a single machine. Traditional solutions involve "scaling out" to distributed clusters, which often introduces significant network bottlenecks. An alternative approach is Semi-External Memory (SEM), which maintains vertex data in RAM while offloading the much larger edge data to high-speed SSDs. While cost-effective, SEM systems have historically been difficult to program, requiring manual management of I/O and memory.

Graphyti is a new SEM graph library designed to bridge this gap. By providing a high-level Python interface and a suite of pre-optimized algorithms, Graphyti allows researchers to process massive datasets on a single machine. It achieves approximately 80% of the performance of fully in-memory systems while reducing memory requirements by a factor of 20 to 100.

System Architecture and Methods

Graphyti is built upon FlashGraph and the Set-Addressable File System (SAFS). It employs a vertex-centric programming model, allowing developers to define algorithms based on individual vertex interactions.

Graphyti architecture and vertex-centric programming interface.

The library implements six core optimization principles to maximize SEM efficiency:

  1. Limit Superfluous Reads: Utilizing "push" models to send updates only when necessary, avoiding redundant disk I/O.
  2. Minimize Messaging: Dynamically switching between multicast and point-to-point messaging based on graph density.
  3. Algorithmic Pruning: Skipping unnecessary computation by predicting future states (e.g., in Coreness Decomposition).
  4. Decoupling Algorithm from Framework: Implementing techniques like "multi-source BFS" to process multiple paths concurrently, improving SSD cache hits.
  5. Asynchronous Execution: Breaking traditional synchronization barriers to enhance parallel efficiency.
  6. Optimized In-Memory Operations: Using sorted adjacency lists and hash tables to accelerate operations like triangle counting.

Key Insights: The "Push" Model and Cache Locality

A primary innovation in Graphyti is the transition from "pull" to "push" models for algorithms like PageRank. In a traditional pull model, edge data must be read for every neighbor to update a vertex value. Graphyti’s push model only activates vertices whose values have changed significantly, drastically reducing I/O overhead.

Performance improvements of the PageRank push model (PR-push) across various metrics.

As shown in the performance analysis, the push model achieves a nearly 5x reduction in read requests and a significant improvement in overall runtime. Another key insight is the use of Multi-Source BFS to improve cache locality. Running multiple BFS instances concurrently ensures that when an edge list is loaded from the SSD into the page cache, it is utilized by multiple search paths simultaneously, significantly increasing the cache hit rate and reducing I/O stalls.

Evaluation and Results

The researchers evaluated Graphyti using the Twitter graph dataset (42 million vertices, 1.5 billion edges, 14 GB) on a machine with only 4 GB of RAM. Despite the memory constraints, Graphyti demonstrated exceptional scalability and efficiency:

  • PageRank: Achieved a 2.2x faster runtime compared to standard SEM implementations.
  • Coreness Decomposition: Delivered up to a 60x speedup through hybrid messaging and pruning.
  • Triangle Counting: Performed two orders of magnitude faster than standard scan-based approaches by optimizing in-memory search.
  • Louvain Modularity: Ran 2x faster by using "lazy deletion" to avoid expensive physical modifications of the graph on disk.

Conclusion

Graphyti significantly lowers the barrier to large-scale graph analysis by providing a performant, SEM-based library with a user-friendly Python interface. While developing entirely new SEM algorithms still requires specialized knowledge of I/O management, Graphyti provides a robust foundation for researchers to handle massive datasets without the need for expensive distributed infrastructure. Future work may extend these principles to dynamic graphs and further integration with high-level data science frameworks.

Summary updated

BibTeX
@misc{mhembere2019graphyti,
  author = {Disa Mhembere and Da Zheng and Carey E. Priebe and Joshua T. Vogelstein and Randal C. Burns},
  title = {{Graphyti: A Semi-External Memory Graph Library for FlashGraph}},
  year = {2019},
  eprint = {1907.03335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.03335},
}
Figure