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:
- Irregular Access Patterns: The inherent messiness of graph structures results in poor data locality and frequent random memory accesses.
- 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.
- 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.
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.
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