Abstract
AllReduce is an important and popular collective communication primitive, which has been widely used in areas such as distributed machine learning and high performance computing. To design, analyze, and choose from various algorithms and implementations of AllReduce, the time cost model plays a crucial role, and the predominant one is the $(\alpha,\beta,\gamma)$ model. In this paper, we revisit this model, and reveal that it cannot well characterize the time cost of AllReduce on modern clusters; thus must be updated. We perform extensive measurements to identify two additional terms contributing to the time cost: the incast term and the memory access term. We augment the $(\alpha,\beta,\gamma)$ model with these two terms, and present GenModel as a result. Using GenModel, we discover two new optimalities for AllReduce algorithms, and prove that they cannot be achieved simultaneously. Finally, striking the balance between the two new optimalities, we design GenTree, an AllReduce plan generation algorithm specialized for tree-like topologies. Experiments on a real testbed with 64 GPUs show that GenTree can achieve 1.22$\times$ to 1.65$\times$ speed-up against NCCL. Large-scale simulations also confirm that GenTree can improve the state-of-the-art AllReduce algorithm by a factor of $1.2$ to $7.4$ in scenarios where the two new terms dominate.
Introduction: The Obsolescence of the $(\alpha, \beta, \gamma)$ Model
AllReduce is the "bread and butter" of distributed machine learning and high-performance computing (HPC). It allows multiple processors to combine their data (the "Reduce" phase) and share the result back to everyone (the "Broadcast" phase). For decades, researchers have used the $(\alpha, \beta, \gamma)$ model to predict AllReduce performance, focusing on latency ($\alpha$), bandwidth ($\beta$), and computation ($\gamma$).
However, this model is now obsolete for modern clusters using high-speed RDMA (Remote Direct Memory Access) networks. The gap lies in two areas:
- Incast: When many machines send data to one receiver simultaneously, they compete for bandwidth, causing "incast" congestion that the old model ignores.
- Memory Access: As network speeds approach memory speeds, the time it takes for a CPU/GPU to read from and write to RAM during the reduction process becomes a significant, non-negligible cost.
GenModel: A Generalized Performance Model
To address these shortcomings, the authors propose GenModel, which augments the traditional model with two new terms: $\epsilon$ (the incast term) and $\delta$ (the memory access term). This model recognizes that different AllReduce algorithms—such as Ring, Parameter Server, or Recursive Halving and Doubling (RHD)—have vastly different memory footprints and congestion patterns.
By adding just these two terms, the prediction error for AllReduce time dropped from 19.8% (using the old model) to just 2.6%.
GenTree: Optimized Communication Planning
Using GenModel, the authors developed GenTree, a recursive, bottom-up algorithm designed for tree-like network topologies common in data centers (e.g., FatTree, Leaf-Spine). GenTree evaluates different communication plans at each "switch" in the tree. It specifically employs a "Hierarchical Co-located Parameter Server" strategy to find a "sweet spot" for the fan-in degree—high enough to keep memory access efficient, but low enough to avoid triggering incast congestion.
A key theoretical insight is the Impossibility Result: an AllReduce plan cannot be both "incast-optimal" and "memory-access-optimal" simultaneously. Reducing communication steps to save memory access time inevitably increases the "fan-in" degree, which triggers incast. GenTree strikes a balance between these two competing optimalities.
Evaluation and Results
The authors evaluated GenTree across three primary environments: a 15-server CPU testbed, a 64-GPU testbed (8 DGX-A100 servers), and a custom flow-level simulator for large-scale tests.
- Real-World Speedup: On the 64-GPU testbed, GenTree outperformed NVIDIA’s industry-standard NCCL library by 1.22$\times$ to 1.65$\times$.
- CPU Performance: On the CPU testbed, GenTree achieved up to 2.4$\times$ speedup over standard algorithms like RHD.
- Scalability: In large-scale simulations (up to 512 nodes), GenTree provided a massive 7.4$\times$ speedup over state-of-the-art algorithms in bandwidth-constrained scenarios.
- Memory Access Impact: The difference in memory access overhead between algorithms can reach 200%. In 100Gbps networks, memory I/O can become the dominant factor.
Conclusion
GenModel and GenTree represent a significant step forward in understanding and optimizing collective communication for modern high-speed clusters. By accounting for incast and memory access, researchers can now generate communication plans that significantly outperform existing state-of-the-art libraries like NCCL. While currently optimized for tree-like topologies, the principles of GenModel provide a robust foundation for future optimizations in arbitrary network architectures.
Summary updated