G-Tran: Making Distributed Graph Transactions Fast

Hongzhi Chen, Changji Li, Chenguang Zheng, Chenghuan Huang, Juncheng Fang, James Cheng, Jie ZhangarXiv 2021

Abstract

Distributed graph databases are critical for modern applications like social network analysis and fraud detection, yet they often struggle with the high overhead of distributed transactions. G-Tran is a novel distributed, in-memory graph database that addresses these challenges by leveraging Remote Direct Memory Access (RDMA) and a fully decentralized architecture. By combining a graph-native data store with a highly optimized multi-version optimistic concurrency control (MV-OCC) protocol, G-Tran achieves orders-of-magnitude performance improvements over existing systems while maintaining strong serializable consistency.

Introduction

Graph databases are uniquely suited for managing highly connected data. However, they face a significant "performance wall" when scaling across multiple nodes. Unlike relational databases, graph queries frequently involve multi-hop traversals that access a vast number of vertices and edges. This leads to three primary challenges:

  1. Irregular Access Patterns: The inherent messiness of graph structures results in poor data locality and frequent random memory accesses.
  2. Large Read/Write Sets: Due to the power-law distribution of connections in real-world graphs, a single transaction can involve thousands of records, leading to high contention.
  3. Coordination Bottlenecks: Traditional distributed systems often rely on a central master node for transaction coordination, which becomes a bottleneck as the cluster size increases.

System Architecture

G-Tran addresses these bottlenecks through a decentralized architecture built on RDMA. Unlike traditional models that require a central coordinator, G-Tran adopts a Massively Parallel Processing (MPP) approach where every server in the cluster can act as a transaction coordinator.

G-Tran's decentralized cluster architecture and node-level components.

The system utilizes RDMA to allow one machine to access the memory of another without involving the remote CPU. This "zero-CPU" advantage shifts the coordination overhead to the network hardware, enabling microsecond-latency checks for transaction statuses and data retrieval.

Graph-Native Storage

To optimize for the irregular access patterns of graph data, G-Tran employs a custom storage layout rather than relying on generic key-value stores.

The graph-native storage layout, including vertex/edge tables and the multi-version key-value store (MV-KVS).

Adjacency lists are organized into fixed-size rows, and properties are stored in a specialized Multi-Version Key-Value Store (MV-KVS). This design ensures that related data remains physically close in memory, significantly accelerating traversals. The multi-version schema allows the system to maintain historical states of data, which is essential for its concurrency control protocol.

Optimized Concurrency Control

G-Tran introduces an optimized Multi-Version Optimistic Concurrency Control (MV-OCC) protocol designed to handle the large read/write sets typical of graph transactions. It incorporates two key "optimistic" mechanisms:

  • Optimistic Pre-read: When a transaction encounters a record currently being updated, it does not immediately abort. Instead, it "optimistically" assumes the update will succeed and continues its execution phase.
  • Optimistic Validation: Conflict checks are deferred until the very end of the transaction. By recording dependencies between transactions, G-Tran only aborts if a conflict is truly unavoidable, reducing the abort rate for complex, multi-hop queries.

Evaluation

The researchers evaluated G-Tran using four diverse property graph datasets: LDBC-S and LDBC-L (synthetic social networks), DBPedia (Wikipedia citation data), and Amazon (product metadata).

The results demonstrate substantial performance gains:

  • Throughput: In distributed environments, G-Tran achieved throughput several orders of magnitude higher than JanusGraph and ArangoDB.
  • Latency: For complex LDBC benchmark queries, G-Tran's latency was 2-3 times lower than Neo4j.
  • Scalability: The system exhibited near-linear scale-out performance as more machines were added, particularly for read-intensive workloads.
  • Consistency: G-Tran maintained high performance even under the strictest Serializable (SR) isolation level, which typically causes significant slowdowns in other distributed databases.

Conclusion

G-Tran demonstrates that by rethinking the storage and coordination layers of a graph database to leverage modern hardware like RDMA, it is possible to achieve high-speed distributed transactions without sacrificing consistency. While the current in-memory focus presents storage and durability challenges for future work, G-Tran sets a new performance benchmark for transactional graph processing.

Summary updated

BibTeX
@misc{chen2021g,
  author = {Hongzhi Chen and Changji Li and Chenguang Zheng and Chenghuan Huang and Juncheng Fang and James Cheng and Jie Zhang},
  title = {{G-Tran: Making Distributed Graph Transactions Fast}},
  year = {2021},
  eprint = {2105.04449},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.04449},
}
Figure