Collective Communication Cost
also called Allreduce Overhead, Synchronisation Cost at Scale
The synchronisation term that determines how far a distributed training or inference job can scale, made of a bandwidth component that is nearly flat in participant count and a latency component that is not.
A distributed training job looks like a compute problem and is priced like one. Its scaling limit is almost always communication.
Every step of data-parallel training performs an allreduce over the full parameter set: every participant contributes its gradients, and every participant ends with the sum. Ring allreduce moves roughly 2(N−1)/N times the model size per device, which approaches a constant as N grows — but it completes in 2(N−1) sequential steps, so its latency grows linearly with participant count.
Those two facts are the whole story. At modest scale the bandwidth term dominates and adding devices is nearly free. At large scale the latency term dominates, and the same job that ran at 90% scaling efficiency on 512 devices runs at 60% on 1,024.
Why it matters
It converts a hardware purchase into a diminishing return, and the point of diminishing return is predictable rather than mysterious. An organisation buying twice the accelerators and receiving 1.3 times the throughput has usually crossed this transition without measuring it.
It also makes placement as important as count. Intra-node links are an order of magnitude faster than the inter-node fabric, so doubling device count by doubling node count raises the fraction of traffic on the slow path even when nothing else changes.
Implementation patterns
- Overlap communication with computation. Bucket gradients so reduction of early layers starts while the backward pass is still running. This is the single highest-value change in most jobs and is built into mainstream frameworks.
- Use hierarchical collectives: reduce within a node over the fast interconnect, then across nodes, so only one reduced payload per node crosses the fabric.
- Place communicating ranks together. Topology-aware scheduling that keeps a reduction group inside a node changes the cost by an order of magnitude with no code change.
- Raise the compute-to-communication ratio with a larger per-device batch or gradient accumulation, which is the cheapest lever when memory allows.
- Compress or reduce precision for the reduction, which trades a little numerical fidelity for a direct cut in the bandwidth term.
- Change the decomposition. Past a certain scale pure data parallelism is the wrong answer, and tensor or pipeline parallelism moves the communication to a different, smaller boundary.
Industry example
NCCL and the NVLink/NVSwitch topologies it runs over are built around exactly this structure: the library selects ring or tree algorithms according to message size and topology, because the right algorithm at 8 devices is the wrong one at 1,024. The published scaling results for large training runs since 2020 consistently report communication overlap and topology-aware placement as the measures that made large clusters usable in production, which is the practical statement of the same point — the accelerators were never the constraint.
Failure scenarios
- Efficiency collapse on doubling, where the latency term crosses the bandwidth term and nobody has the breakdown to see it.
- Straggler amplification: every allreduce is a barrier, so the step costs as much as the slowest participant, and doubling participants samples twice as deeply into the tail of the per-device step-time distribution.
- One bad node — a degraded link, a throttling device — slowing an entire 1,024-device job, invisible in any average.
- Checkpointing as a hidden collective, synchronously writing hundreds of gigabytes and stalling every rank.
- Scattered placement after a scheduler change, which halves throughput with no code or configuration difference anyone can point to.
Trade-offs
Every remedy costs something. Overlap complicates the training loop and the memory profile. Hierarchical collectives add configuration and a topology dependency. Compression touches numerics and must be validated against convergence. A larger per-device batch changes the optimisation problem, not just the schedule, and may require re-tuning the learning rate. Topology-aware placement trades cluster utilisation for job efficiency, because reserving whole nodes leaves fragments idle — which is a real cost borne by a different team than the one that benefits.
When not to use it
Below the transition, none of this is worth doing. A job on 8 or 16 devices inside one node is bandwidth-bound on a fast interconnect, scaling efficiency is high, and hierarchical collectives, compression and placement policies are effort spent on a term that is not binding. The discipline starts when you measure a step-time breakdown and find communication is a substantial share — and measuring first is the rule, because "it must be the network" is the most expensive unverified assumption in this field.
Interview question
Q: A training job scales at 90% efficiency on 512 accelerators and 60% on 1,024. Where did the time go, what would you measure, and what would you try first?
What a strong answer covers: that allreduce bandwidth per device is roughly flat in N while its latency grows linearly, so the crossover is expected; the topology asymmetry between intra-node and inter-node links; straggler amplification as a barrier effect on the tail of the step-time distribution; the measurement order — step time split into compute, communication and wait, then collective time and variance, then per-rank distribution, then placement; and the remedies ranked, with communication-computation overlap first.
Quick check
Quiz: Why does ring allreduce scale well in bandwidth and badly in latency? Bytes moved per device approach a constant as participant count grows, but the algorithm takes 2(N−1) sequential steps, so its latency is linear in N.
Flashcard: A distributed training job's scaling efficiency falls when you double the device count. What is the first thing to measure? A step-time breakdown into compute, communication and wait — because the transition from a bandwidth-dominated to a latency-dominated collective is the usual cause and is invisible in utilisation.