TL;DR
This paper introduces a novel ring-based algorithm for the all-reduce operation that achieves bandwidth optimality on tree topologies, outperforming traditional butterfly-like algorithms, especially for large data sizes. It addresses network contention issues in modern clusters by proposing a communication pattern that is both efficient and avoids bottlenecks.
What Problem Does This Paper Address?
The all-reduce operation is a fundamental collective communication primitive in parallel computing, used to combine data from all processes and distribute the result back to all. While existing algorithms like the butterfly-like approach are theoretically optimal in terms of latency and bandwidth, they suffer from network contention on contemporary clusters, particularly those with SMP/multi-core architectures and multiple switches. This contention degrades performance, especially as data sizes grow. The paper aims to provide a bandwidth-optimal all-reduce algorithm that avoids this contention and works efficiently across various cluster architectures.
Methods
The authors propose a ring-based algorithm that leverages a reduce-scatter operation followed by an all-gather operation. The key innovation lies in constructing a contention-free logical ring on a tree topology. This is achieved by:
- Logical Ring Construction: Mapping processes to a logical ring structure that ensures no communication conflicts.
- Reduce-Scatter: Implementing a logical ring-based reduce-scatter where data is partitioned and progressively reduced across the ring in $N-1$ iterations.
- All-Gather: Following with a logical ring-based all-gather to distribute the final results.
The algorithm is designed to be bandwidth optimal, meaning each node communicates the minimum amount of data required, and all communications are contention-free. They also develop a routine generator for clusters with physical tree topologies and a specific algorithm for high-end SMP clusters based on a two-level tree model.
Datasets
Not discussed in the paper. The paper focuses on theoretical analysis and experimental evaluation on real-world clusters.
Key Insights and Ideas
- Contention-Free Ring is Key: The core insight is that a carefully constructed logical ring, even on a tree topology, can avoid network contention and achieve bandwidth optimality for all-reduce.
- Decomposition into Reduce-Scatter and All-Gather: Breaking down all-reduce into these two phases and optimizing each individually is a proven strategy, but the novelty here is the contention-free ring implementation for both.
- Topology-Awareness (Implicit): While the algorithm is presented for tree topologies, the authors show it can be applied to more complex cluster structures (like two-level trees in SMPs) by finding a suitable logical ring embedding.
- Bandwidth vs. Latency Trade-off: The proposed algorithm is bandwidth optimal but not latency optimal, as the number of communication rounds is proportional to the number of processes ($O(N)$). This is a deliberate trade-off to avoid contention.
Key Results
- Theoretical Lower Bound: The paper derives a tight lower bound on the amount of data that must be communicated for an all-reduce operation.
- Bandwidth Optimality: The proposed ring-based algorithm is proven to be bandwidth optimal for tree topologies.
- Performance Gains: Experimental results show significant performance improvements over traditional butterfly-like algorithms, especially for large data sizes (e.g., > 256KB on NCSA Teragrid, > 32KB on Draco cluster).
- Comparison with Alternatives: The algorithm outperforms native MPI implementations and other specialized SMP algorithms (like SMP-binomial and SMP-butterfly) in scenarios where network contention is a bottleneck.
- Reduced Working Memory: The ring-based algorithm requires less working memory compared to the butterfly-like algorithm.
Limitations and Future Work
- Latency: The algorithm is not latency optimal, as the number of communication rounds scales linearly with the number of processes ($O(N)$). This can be a disadvantage for applications sensitive to latency.
- Bracketing: The reduction results are computed with different "bracketing," which might cause issues with floating-point rounding errors, though the paper notes this is not strictly required by MPI.
- Break-even Point: The threshold data size at which the proposed algorithm becomes more efficient than others is system-dependent and can be larger for systems with higher communication start-up overheads (like Ethernet switched clusters).
- Future Work: The paper implicitly suggests exploring ways to improve latency while maintaining bandwidth optimality and contention-freeness, and further investigating its applicability to more complex network topologies and communication patterns.
Summary updated