Abstract
The specific characteristics of graph workloads make it hard to design a one-size-fits-all graph storage system. Systems that support transactional updates use data structures with poor data locality, which limits the efficiency of analytical workloads or even simple edge scans. Other systems run graph analytics workloads efficiently, but cannot properly support transactions. This paper presents LiveGraph, a graph storage system that outperforms both the best graph transactional systems and the best systems for real-time graph analytics on fresh data. LiveGraph does that by ensuring that adjacency list scans, a key operation in graph workloads, are purely sequential: they never require random accesses even in presence of concurrent transactions. This is achieved by combining a novel graph-aware data structure, the Transactional Edge Log (TEL), together with a concurrency control mechanism that leverages TEL's data layout. Our evaluation shows that LiveGraph significantly outperforms state-of-the-art (graph) database solutions on both transactional and real-time analytical workloads.
Introduction
In the landscape of graph data management, a significant divide exists between transactional systems and analytical engines. Transactional systems, such as Neo4j or Titan, are designed for frequent updates but often struggle with large-scale analytics because their underlying data structures (e.g., B+ trees or linked lists) suffer from poor data locality. Conversely, analytical engines like Ligra or Gemini utilize highly optimized, sequential structures like Compressed Sparse Rows (CSR) for high-speed scans but are typically immutable and cannot handle live updates.
As real-time analytics on "fresh" data—such as instant fraud detection or recommendations—becomes increasingly critical, there is a growing need for systems that can handle both workloads simultaneously. LiveGraph addresses this by providing Snapshot Isolation without the performance penalty of random memory accesses, ensuring that adjacency list scans remain purely sequential even during concurrent writes.
System Design: The Transactional Edge Log (TEL)
The core innovation of LiveGraph is the Transactional Edge Log (TEL). Rather than using a global table, LiveGraph stores the "neighborhood" or adjacency list of every vertex as a local, append-only log.
As shown in the figure above, each edge entry in the log contains two cache-aligned 64-bit timestamps: a creation time and an invalidation time. This allows a scanner to determine if an edge is visible to their specific transaction timestamp simply by inspecting the entry itself, eliminating the need for external lookups. Because all versions of edges for a vertex are stored contiguously, the CPU can effectively utilize prefetching and pipelining, avoiding the "pointer chasing" that plagues other systems.
Concurrency and Storage Management
LiveGraph integrates multi-version concurrency control (MVCC) directly into the TEL layout. Writers append new versions to the tail of the TEL with a temporary negative transaction ID (TID), which is updated to a permanent timestamp upon commit. To manage data growth, LiveGraph uses a "buddy-system" allocator that doubles the size of a TEL block when it fills up. Additionally, a background compaction thread cleans up old, invisible edge versions to maintain performance. For "upsert" operations, an embedded Bloom filter in each TEL allows the system to quickly determine if an edge already exists with minimal overhead.
Evaluation and Results
The authors evaluated LiveGraph using industry-standard benchmarks, including Facebook's LinkBench (32M vertices, 140M edges) and the LDBC Social Network Benchmark (SNB) (30M vertices, 177M edges).
Micro-benchmarks (illustrated above) revealed that TEL-based scans are significantly more efficient than alternative structures:
- Transactional Speed: On LinkBench, LiveGraph outperformed RocksDB by up to 7.45x in throughput.
- Analytical Power: On LDBC SNB complex queries, LiveGraph outperformed Virtuoso by 31x and PostgreSQL by over 36x.
- Hardware Efficiency: Scans were 22x to 46x faster than those using LSM-trees or linked lists due to the drastic reduction in cache misses and CPU stalls.
Conclusion and Future Work
LiveGraph demonstrates that co-designing data structures with concurrency control logic can bridge the gap between transactional and analytical graph processing. By ensuring purely sequential scans, it enables high-performance analytics on live, fresh data.
While the current implementation is optimized for single-server large-memory environments, future work aims to extend these techniques to distributed clusters. Other areas for development include improving the reclamation of IDs from deleted vertices and further optimizing write-intensive edge cases where write amplification from block resizing can occur.
Summary updated