[Paper Review] Swing: Short-cutting Rings for Higher Bandwidth Allreduce
Swing is a novel allreduce algorithm for torus networks that reduces communication distance by dynamically switching between torus dimensions, minimizing link congestion and improving bandwidth utilization. It achieves up to 3x higher goodput than state-of-the-art algorithms across diverse torus and torus-like topologies, especially for small- to medium-sized vectors (32B–128MiB).
The allreduce collective operation accounts for a significant fraction of the runtime of workloads running on distributed systems. One factor determining its performance is the distance between communicating nodes, especially on networks like torus, where a higher distance implies multiple messages being forwarded on the same link, thus reducing the allreduce bandwidth. Torus networks are widely used on systems optimized for machine learning workloads (e.g., Google TPUs and Amazon Trainium devices), as well as on some of the Top500 supercomputers. To improve allreduce performance on torus networks we introduce Swing, a new algorithm that keeps a low distance between communicating nodes by swinging between torus directions. Our analysis and experimental evaluation show that Swing outperforms by up to 3x existing allreduce algorithms for vectors ranging from 32B to 128MiB, on different types of torus and torus-like topologies, regardless of their shape and size.
Motivation & Objective
- Address the performance bottleneck in allreduce operations on torus networks caused by high communication distances and link congestion.
- Overcome the limitations of existing allreduce algorithms—like recursive doubling and ring-based methods—that suffer from congestion due to long-distance communication on low-bisection-bandwidth topologies.
- Design an algorithm that maintains logarithmic steps and minimal data transmission while minimizing inter-node distance to reduce congestion.
- Evaluate Swing across diverse topologies (square/rectangular tori, 3D/6D tori, HammingMesh, HyperX) and network conditions to validate robustness and scalability.
- Demonstrate consistent performance gains across all practical allreduce sizes (32B–128MiB), particularly in machine learning and HPC workloads where allreduce dominates runtime.
Proposed method
- Introduce a dynamic communication pattern that alternates between different torus dimensions (e.g., x, y, z) to keep communicating nodes within one-hop distance.
- Use a modified recursive doubling approach where each node communicates only with its immediate neighbors in a rotating fashion across dimensions.
- Apply minimal adaptive routing to ensure packets follow shortest paths and avoid congestion from non-minimal routes.
- Decompose allreduce into reduce-scatter and allgather phases, leveraging the fact that data size halves at each step to further reduce long-distance communication.
- Optimize the order of communication steps to minimize the number of messages per link, ensuring no link carries more than two messages in the same direction at once.
- Model latency, bandwidth, and congestion deficiency to guide algorithm design and validate performance gains over existing approaches.

Experimental results
Research questions
- RQ1How does communication distance between nodes affect allreduce performance on torus networks with limited bisection bandwidth?
- RQ2Can a logarithmic-step allreduce algorithm reduce congestion by minimizing inter-node distance without increasing the number of transmitted bytes?
- RQ3To what extent does Swing outperform existing allreduce algorithms (e.g., recursive doubling, ring, bucket) across different topologies and vector sizes?
- RQ4How does network shape (square vs. rectangular torus), dimensionality (2D vs. 3D vs. 6D), and bandwidth influence Swing’s performance gains?
- RQ5Can Swing maintain high performance on non-torus, torus-like topologies such as HammingMesh and HyperX?
Key findings
- Swing achieves up to 3x higher goodput than the best existing allreduce algorithms on rectangular tori and HyperX with 4096 nodes.
- On square torus networks, Swing delivers up to 2.2x better performance on 4096–16384 node configurations, with median gains around 25%.
- Performance gains increase with network size (e.g., from 8x8 to 128x128 torus) and with the aspect ratio of rectangular tori (e.g., 64x16 to 256x4), reaching up to 3x on 128x8 torus.
- Swing maintains consistent gains across different network bandwidths, with median goodput improvement between 20% and 50%, even at higher bandwidths.
- On 256x4 torus, Swing performs ~60% worse than ring for 512MiB allreduce, but this is an outlier case and still outperforms all other algorithms at all other sizes.
- Swing achieves up to 2x higher goodput on 8x8x8x8 torus due to increased one-hop neighbor availability, and outperforms all competitors at every vector size.

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.