SlimSell: A Vectorizable Graph Representation for Breadth-First Search

Maciej Besta, Florian Marending, Edgar Solomonik, Torsten Hoefler

TL;DR

This paper introduces SlimSell, a novel graph representation that significantly improves the efficiency of Breadth-First Search (BFS) on modern parallel architectures like GPUs and manycore CPUs. By optimizing for vectorization and reducing memory footprint, SlimSell achieves substantial speedups over traditional BFS methods, making graph processing more accessible and performant.

What Problem Does This Paper Address?

Traditional graph algorithms, including BFS, are often designed with 32- or 64-bit memory accesses in mind. However, modern processors, especially GPUs and manycore CPUs (like Intel Xeon Phi), feature much wider vector instruction units (e.g., 512-bit). This architectural shift renders older algorithms inefficient due to underutilization of available parallelism. Furthermore, graph datasets are growing rapidly, demanding faster and more memory-efficient processing techniques. The paper addresses the challenge of adapting BFS, a fundamental graph algorithm, to leverage the capabilities of these new architectures, specifically focusing on vectorization and reducing memory pressure.

Methods

The core contribution is the SlimSell graph representation, which builds upon the existing Sell-C-σ format. SlimSell aims to be more storage-efficient by inferring matrix values from column indices, reducing the need for a separate "val" array. This is achieved by cleverly encoding information within the column indices themselves.

Key techniques and schemes introduced include:

  • SlimSell Representation: A vectorizable graph format that reduces storage by up to 50% compared to Sell-C-σ by inferring edge presence from column indices.
  • Algebraic BFS: The paper frames BFS as a series of sparse-matrix dense-vector (SpMV) products over various semirings (tropical, real, boolean, sel-max). This abstraction is well-suited for vectorized execution.
  • SlimWork Scheme: This scheme reduces the amount of computation by intelligently skipping chunks of work that correspond to final output values (like vertex distances) that are no longer changing.
  • SlimChunk Scheme: This technique improves load balancing, particularly on architectures with wide SIMD units, by splitting chunks of computation in two dimensions.
  • Semiring Analysis: A systematic comparison of different semirings for BFS-SpMV to identify the most performant ones.

Datasets

The paper evaluates its methods on a variety of graph datasets:

  • Synthetic Graphs:
    • Kronecker graphs (power-law degree distribution)
    • Erdős-Rényi graphs (uniform degree distribution)
  • Real-World Graphs:
    • Social networks (e.g., pok, epi)
    • Web graphs (e.g., gog, web)
    • Purchase networks (e.g., amz)
    • Road networks (e.g., rca)

The paper notes that these graphs cover various sizes (up to $2^{28}$ vertices) and degree distributions, allowing for a comprehensive evaluation.

Key Insights and Ideas

  • Vectorization is Key for Modern Architectures: The paper strongly argues that traditional BFS algorithms are ill-suited for modern CPUs and GPUs due to their reliance on irregular memory accesses and 32/64-bit operations. Vectorization, enabled by representations like SlimSell, is crucial for achieving high performance.
  • Algebraic BFS + Vectorization = Performance: By framing BFS as SpMV operations and leveraging vectorization, significant speedups can be achieved, even if the algebraic approach might have higher theoretical work complexity than some work-optimal traditional BFS algorithms.
  • Storage Matters: Reducing memory footprint (as SlimSell does) is critical for large graphs, as it alleviates memory subsystem pressure and can lead to better cache utilization and reduced data transfer.
  • Semiring Choice Impacts Performance (Slightly): While the core SpMV operation is memory-bound, the choice of semiring can have minor performance implications, particularly in the post-processing steps required to derive the final BFS output. The "sel-max" semiring showed some advantages due to avoiding the explicit DP transformation.
  • SlimWork's Impact on Iterations: The SlimWork scheme significantly accelerates later iterations of BFS by skipping computations for vertices whose distances have stabilized, leading to substantial overall speedups.

Key Results

  • Speedup: SlimSell accelerates BFS by up to 33% compared to a tuned Graph500 BFS code (Trad-BFS) on Intel Haswell CPUs. On GPUs, speedups of up to 53% were observed for denser graphs.
  • Storage Reduction: SlimSell reduces the storage complexity of Sell-C-σ by up to 50%. It is also shown to be more compact than CSR and Adjacency List (AL) representations for many graph types.
  • Performance on KNL: The paper provides some of the first BFS results on the Intel Xeon Phi Knights Landing (KNL) manycore, demonstrating SlimSell's effectiveness on this architecture.
  • Scalability: Both strong and weak scaling were considered, showing SlimSell's ability to leverage parallel architectures.
  • Work Reduction: SlimWork scheme can reduce the work amount by a large factor, for example, approximately 129% for the sel-max semiring on a Kronecker graph.

Limitations and Future Work

  • Preprocessing Overhead: While SlimSell reduces storage and improves runtime performance, the initial construction and sorting of the graph representation (especially for larger sorting scopes $\sigma$) incur a preprocessing cost. The paper argues this cost can be amortized over multiple BFS runs.
  • Semiring Post-processing: While the core SpMV is memory-bound, the post-processing steps to derive BFS results from intermediate values can introduce minor performance differences between semirings.
  • Future Work:
    • Extending SlimSell to other graph algorithms beyond BFS.
  • Porting SlimSell to other massively threaded architectures (e.g., SPARC64, Adapteva Parallel).
  • Investigating SlimSell's applicability to distributed-memory settings.
  • Exploring SlimSell's potential to substitute graph representations in existing libraries like Gunrock for higher speedups.

Summary updated

BibTeX
@inproceedings{besta2017slimsell,
  author = {Maciej Besta and Florian Marending and Edgar Solomonik and Torsten Hoefler},
  title = {{SlimSell: A Vectorizable Graph Representation for Breadth-First Search}},
  booktitle = {IPDPS},
  year = {2017},
  doi = {10.1109/ipdps.2017.93},
}
Figure