[Paper Review] Distributed-Memory Breadth-First Search on Massive Graphs
This paper presents a high-performance, scalable distributed-memory BFS algorithm for massive graphs using a generalized 2D processor grid decomposition and direction-optimizing techniques. It achieves superior performance by combining hypersparse DCSC storage, multithreading, and adaptive top-down/bottom-up traversal, reducing communication costs and memory usage on large-scale systems like Cray architectures.
This chapter studies the problem of traversing large graphs using the breadth-first search order on distributed-memory supercomputers. We consider both the traditional level-synchronous top-down algorithm as well as the recently discovered direction optimizing algorithm. We analyze the performance and scalability trade-offs in using different local data structures such as CSR and DCSC, enabling in-node multithreading, and graph decompositions such as 1D and 2D decomposition.
Motivation & Objective
- Address the challenge of efficiently performing BFS on massive, irregular graphs in distributed-memory systems with low computational intensity and irregular memory access.
- Improve scalability and performance of parallel BFS by generalizing 2D processor grid decomposition beyond square grids to arbitrary rectangular configurations.
- Evaluate the impact of in-node multithreading and sparse matrix storage formats (DCSC vs. CSR) on communication, computation, and memory usage.
- Demonstrate the effectiveness of direction-optimizing BFS that switches between top-down and bottom-up traversal based on frontier size to minimize edge examinations.
- Validate the implementation on real-world graphs and large-scale HPC platforms, including Cray systems and the Twitter graph.
Proposed method
- Use a generalized $p_r \times p_c$ rectangular 2D processor grid for distributing the graph's adjacency matrix, enabling flexible load balancing and communication optimization.
- Implement a direction-optimizing BFS that dynamically switches between top-down and bottom-up traversal: top-down for early/late stages, bottom-up for large frontiers to reduce redundant edge checks.
- Employ the Doubly Compressed Sparse Column (DCSC) format for local subgraphs to reduce memory footprint and improve memory bandwidth efficiency compared to CSR.
- Use Alltoallv and Allgatherv operations for global communication: Alltoallv along columns for frontier exchange, Allgatherv along rows for global synchronization.
- Integrate in-node multithreading to improve compute utilization and hide communication latency, especially on large-core systems.
- Apply a hybrid approach that combines the strengths of both top-down and bottom-up BFS to minimize total edge examinations and improve load balance.
Experimental results
Research questions
- RQ1How does processor grid skewness (e.g., square vs. rectangular vs. flat) affect communication, computation, and overall performance in distributed BFS?
- RQ2What is the performance impact of using DCSC versus CSR sparse matrix formats in large-scale distributed BFS on memory-constrained systems?
- RQ3How effective is in-node multithreading in improving scalability and hiding communication latency in distributed BFS?
- RQ4To what extent does direction-optimizing BFS (switching between top-down and bottom-up) reduce redundant edge examinations and improve runtime?
- RQ5How does the algorithm scale on real-world graphs like Twitter, and what core counts are needed to achieve sub-second traversal times?
Key findings
- The 2D processor grid decomposition with rectangular configurations (especially square or slightly tall/skinny grids) outperforms flat, short-fat grids due to better load balancing and reduced Allgatherv communication costs.
- The DCSC storage format significantly reduces memory usage compared to CSR, enabling larger-scale graph traversal—e.g., the 1×110×440 grid ran out of memory with CSR at scale 33, but DCSC avoided this.
- Multithreading improves performance and scalability, particularly on large-core systems, by hiding communication latency and improving compute utilization.
- The direction-optimizing BFS algorithm reduces redundant edge examinations by up to 90% in the middle phases of traversal, where frontiers are largest, leading to substantial runtime gains.
- On the Twitter graph (1440 cores), direction-optimizing BFS completes in 0.08 seconds, requiring an order of magnitude fewer cores than baseline methods to achieve sub-0.2 second performance.
- Despite a 2.5× increase in communication cost when doubling input size (scale 32 to 33), the performance degradation was dominated by increased local computation, highlighting CSR’s scalability limitations on 2D grids.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.