TL;DR
GraphMat tackles the challenge of building high-performance graph analytics frameworks that are also easy to use. By mapping user-friendly vertex programs to efficient sparse matrix operations, GraphMat achieves performance close to hand-optimized code while maintaining developer productivity, outperforming existing frameworks like GraphLab and CombBLAS.
What Problem Does This Paper Address?
Analyzing large-scale graphs is crucial for many fields, from social networks to bioinformatics. However, existing graph analytics frameworks often force a trade-off: either they are highly performant but difficult to program (like low-level matrix operations), or they are user-friendly but slow. A recent study highlighted that most frameworks are an order of magnitude slower than native, hand-optimized code. This performance gap, even on single machines, means that maximizing efficiency on current hardware is critical. GraphMat aims to bridge this gap by offering a framework that is both productive for developers and achieves high performance, comparable to native code.
Methods
GraphMat's core innovation lies in its approach to mapping vertex programs to generalized sparse matrix-vector multiplication (SPMV). Instead of directly implementing complex graph algorithms, users write "vertex programs" that define how individual vertices and their neighbors interact. GraphMat then translates these programs into efficient SPMV operations. This allows GraphMat to leverage decades of research in high-performance computing (HPC) for optimizing sparse matrix operations.
Key aspects of their method include:
- Vertex Programming Frontend: A familiar and productive programming model for users, similar to frameworks like Giraph.
- Generalized SPMV Backend: The core engine that translates vertex programs into optimized sparse matrix operations. This includes custom
PROCESS_MESSAGEandREDUCEfunctions that can access vertex properties, offering more flexibility than some existing matrix-based frameworks. - Bulk-Synchronous Parallel (BSP) Model: Iterations are structured as supersteps, ensuring that vertex properties are read-only within an iteration and updated atomically at the end.
- Data Structures: Efficient storage of sparse matrices using the Doubly Compressed Sparse Column (DCSC) format and sparse vectors using a bitvector approach for performance.
- Optimizations: Significant performance gains are achieved through cache optimizations (bitvectors), inter-procedural optimization (
-ipo), parallelization of SPMV, and load balancing.
Datasets
The paper uses a mix of real-world and synthetic datasets for evaluation:
- Real-world: Facebook interaction graphs, Netflix challenge data, USA road network (California/Nevada), Livejournal, Wikipedia, Delaunay, Flickr, Twitter follower graph, and Friendster community network.
- Synthetic: Graph500 RMAT generator (scales 20, 23, 24) and synthetic bipartite graphs for collaborative filtering.
The datasets were chosen to match those used in previous comparative studies to ensure fair performance comparisons.
Key Insights and Ideas
- Bridging the Productivity-Performance Gap: The central idea is that by abstracting graph algorithms into sparse matrix operations, you can achieve both ease of programming and high performance, a feat not easily accomplished by other frameworks.
- Vertex Program Flexibility: Allowing
PROCESS_MESSAGEfunctions to access vertex properties (not just message and edge data) significantly simplifies the implementation of complex algorithms like triangle counting and collaborative filtering, which are notoriously difficult in some other matrix-based frameworks. - Leveraging HPC Expertise: GraphMat effectively taps into the mature field of HPC for sparse matrix operations, benefiting from existing optimizations and research.
- Scalability is Key: As core counts increase, GraphMat's ability to scale well (13-15X speedup on 24 cores) becomes a critical advantage over frameworks that don't scale as effectively.
Key Results
- Performance: GraphMat is 1.1-7X faster than other high-performance frameworks like GraphLab, CombBLAS, and Galois on various algorithms and datasets.
- Native Code Comparison: GraphMat achieves performance within 1.2X of native, hand-optimized code on average, a remarkable feat given the significantly lower programming effort.
- GPU Comparison: GraphMat matches the performance of MapGraph (a GPU-based framework) on a contemporary GPU, despite running on a CPU with less compute and bandwidth.
- Scalability: GraphMat shows excellent multicore scalability, achieving 13-15X speedup on 24 cores, significantly outperforming GraphLab (8X), CombBLAS (2-6X), and Galois (6-12X).
- Optimization Impact: Specific optimizations like inter-procedural optimization (
-ipo) and parallelization contribute significantly to performance, with parallelization and load balancing yielding speedups of up to 27.3X and 19.9X for Pagerank and SSSP respectively, from a naive scalar baseline.
Limitations and Future Work
- In-Memory Processing: GraphMat currently assumes that the entire graph fits into main memory, limiting its applicability to extremely large graphs that exceed available RAM.
- Bulk-Synchronous Execution: While simplifying programming, the BSP model can be slower for certain problems (like graph coloring) compared to fully asynchronous execution.
- Future Work: The authors suggest extending GraphMat to handle out-of-core and distributed settings, leveraging its SPMV backend for broader applicability. They also believe that the optimizations developed for GraphMat could benefit other frameworks.
Summary updated