GraphChi-DB: Simple Design for a Scalable Graph Database System - on Just a PC

Aapo Kyrola, Carlos GuestrinarXiv 2014

Abstract

GraphChi-DB is a single-machine graph database designed to manage billions of edges on consumer-grade hardware. By introducing the Parallel Adjacency List (PAL) data structure and leveraging a Log-Structured Merge-tree (LSM-tree) approach, the system bridges the gap between low-latency online queries and high-throughput offline analytics. This paper demonstrates that a single PC can outperform distributed clusters in both storage efficiency and processing speed for massive social graphs.

Introduction

Presented at SIGMOD 2014, GraphChi-DB challenges the assumption that "big data" graphs necessitate expensive distributed clusters. It manages billions of edges using a novel storage engine that supports lightning-fast lookups and heavy-duty analytics on a single machine.

Problem Statement

In the early 2010s, the prevailing wisdom was that massive graphs, such as those from Twitter or Facebook, required distributed clusters running frameworks like Pregel or GraphLab. However, clusters are complex and costly to manage. Existing single-machine graph databases faced two primary hurdles:

  1. Storage Redundancy: To facilitate fast lookups for both incoming and outgoing edges, many systems store every edge twice, doubling disk requirements.
  2. The Write/Query Trade-off: Systems optimized for fast queries often suffer from slow data ingestion, while write-heavy systems struggle with low-latency traversals.

GraphChi-DB addresses these by providing a compact, write-optimized storage engine capable of handling both local queries and global computations on a single laptop or PC.

Methods

The system's performance stems from two core architectural innovations: the Parallel Adjacency List (PAL) and an LSM-tree based ingestion model.

Parallel Adjacency List (PAL)

The PAL structure allows the system to locate both in-edges and out-edges using a single copy of the data. Vertex IDs are partitioned into $P$ intervals. Each "edge partition" stores all edges where the destination vertex falls within that interval. Within each partition, edges are sorted by their source ID. This arrangement enables the system to minimize indices and storage overhead.

Conceptual layout of Parallel Adjacency Lists (PAL), partitioning vertices into intervals and edges by destination.

LSM-tree for High-Speed Ingestion

To handle rapid data insertion, GraphChi-DB employs a Log-Structured Merge-tree (LSM-tree) approach. New edges are initially buffered in memory. Once these buffers are full, they are merged into the disk-based partitions through a multi-level downstream merge process. This strategy converts random writes into sequential I/O, which is significantly faster on modern SSDs.

The multi-level merge structure used to ingest new edges from in-memory buffers to on-disk partitions.

Parallel Sliding Windows (PSW) and Columnar Storage

For global analytics like PageRank, the Parallel Sliding Windows (PSW) algorithm ensures memory efficiency by loading only necessary data segments into RAM. Additionally, vertex and edge attributes are stored in separate columnar files, allowing the system to read only the specific data required for a query (e.g., just edge weights) without loading entire records.

Evaluation and Datasets

The authors evaluated GraphChi-DB using several massive real-world and synthetic datasets:

  • LiveJournal: 69 million edges.
  • Twitter-2010: 1.5 billion edges, exhibiting a steep power-law distribution.
  • LinkBench: A Facebook-developed benchmark scaled to 5 billion edges.

Key Results

  • Storage Efficiency: GraphChi-DB is significantly more compact than its peers. For the Twitter graph, it required only 17 GB of disk space, compared to 52 GB for Neo4j.
  • Ingestion Speed: On a modest Mac Mini, the system achieved an insertion rate of ~250,000 edges per second, ingesting the Twitter graph in 1.5 hours—a task that took Neo4j's batch importer 45 hours.
  • Query Performance: For "Friends-of-Friends" queries on the Twitter graph, GraphChi-DB outperformed Neo4j by 40x to 60x due to its disk layout optimization for random-access traversal patterns.
  • Scalability: The system successfully handled the 5-billion-edge LinkBench dataset on a laptop, a workload typically requiring high-end server clusters.

Conclusion and Future Work

GraphChi-DB proves that efficient disk-based layouts can make single-machine systems competitive with distributed ones for massive graph management. While it does not currently support complex ACID transactions or full in-memory optimization, it offers a powerful, cost-effective alternative for large-scale graph analytics. Future directions include exploring custom buffer managers to further enhance hardware utilization.

Summary updated

BibTeX
@misc{kyrola2014graphchi,
  author = {Aapo Kyrola and Carlos Guestrin},
  title = {{GraphChi-DB: Simple Design for a Scalable Graph Database System - on Just a PC}},
  year = {2014},
  eprint = {1403.0701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1403.0701},
}
Figure