Interconnects and scaling: PCIe, NVLink, InfiniBand and RoCE, why the network picks your parallelism

How chips talk: the two numbers of every link, PCIe, NVLink and NVSwitch, RDMA over InfiniBand and RoCE, fat trees, rails, dragonflies and TPU tori with optical switches, the collective algorithms on the wire with their costs, and why each kind of parallelism belongs on a particular rung of the network. Real collectives measured on this laptop; NVIDIA, AWS and paper figures kept apart. A child of Topic: hardware. Data as of October 2026. Reading: 34 min, plus 14 in closed details.

The idea in one screen

Every message costs a fixed latency plus its bytes over the link's bandwidth, and the links form a ladder in which each rung reaches more chips and is roughly ten times slower than the one above, so each kind of parallelism belongs on the slowest rung whose bandwidth its traffic per FLOP can afford.

One cluster, five rungs: each reaches more GPUs and is slower than the one above. Fig. 1 climbs them on two servers of 8 GPUs, from a GPU's own memory to the spine of the network. Every pipe's cross-section is drawn in proportion to its bandwidth per GPU, each direction, so a pipe with a tenth of the area carries a tenth of the bytes; dots stream where the data moves.

  1. HBM, inside each GPU: 3,350 GB/s on an H100. The GPU's own memory, stacked on the same package a few millimetres from the die: the fattest pipe and the top of the ladder, 5 stacks · 670 GB/s each derived: 3,350 / 5.
  2. NVLink 4 through NVSwitch: 450 GB/s each way between any two of the server's 8 GPUs (72 in an NVL72 rack). Every GPU's links run to the switch chips, so any pair gets the whole port. Tensor and expert parallelism live here.
  3. PCIe 5.0 x16: 63 GB/s each way, joining each GPU to its network card (NIC) and the CPU. Each GPU has its own NIC beside it, so gradients leave the server without passing through CPU memory.
  4. NIC to a rail leaf switch: 400 Gb/s, 50 GB/s each way. GPU k of every server meets on leaf k, one hop apart: rail 3 joins the two servers' GPU 3. Data and pipeline parallelism cross here.
  5. Leaf to spine: everything else, including most of an all-to-all; often oversubscribed (1:7 between Meta's pods), which leaves about 7 GB/s per GPU for traffic crossing it when every GPU sends at once derived: 50 / 7.

Two servers of a cluster are drawn, with their 8 rail leaves; the four spine switches stand for however many a cluster has (illustrative).

Running example. As on the parent Topic: hardware: one training step of Llama 3.1 8B, whose bf16 gradients are 16.06 GB derived: 8.03 B parameters × 2 bytes. The parent's section 6 gives the intuition and its Performance calculator the bandwidth-only arithmetic; this page owns the links, the topologies and the collective algorithms.

You need the parent's roofline (the ridge point returns in section 9 as link intensity) and the parallelism forms from Distributed Training (what DP, FSDP, TP, PP and EP hold and send).

α, β
a link's latency per message and its bandwidth, one direction
n½
half-bandwidth size, α × β: below it latency dominates
NVLink domain
the GPUs joined by NVLink switches, which can load and store each other's memory
RDMA
the network card writes straight into remote (GPU) memory, no kernel, no copy
Rail, spine
leaf switch joining GPU k of every server; the layer above the leaves
Oversubscription
fewer uplinks than downlinks, written 1:7 or 7:1
Torus
a grid of chips whose rows and columns wrap around, each chip wired to its neighbours (TPU ICI)
busbw
nccl-tests' bandwidth rescaled to compare with a wire's rate
Link intensity
sustained FLOP/s over a link's bandwidth: FLOPs that must accompany each byte sent
Four labels used on this page
vendor spec published by NVIDIA, AMD, AWS, Google or a standards body; independent measured by others on real hardware; measured here on this laptop (Apple M1 Pro; no GPU cluster was available); derived computed, formula shown.

The same ladder as bars: every link a GPU's traffic can take, log scale

Bandwidth per GPU, each direction, H100 generation unless named. HBM: 3.35 TB/s (H100 page). NVLink 4: "900 GB/sec total" per H100 over 18 links (Hopper in depth), 450 each way; NVLink 5 on Blackwell 1.8 TB/s total (NVLink page). PCIe 5.0 x16: 63 GB/s each way (32 GT/s per lane, 128b/130b encoding). One 400 Gb/s NIC per GPU: an AWS p5 server has 3,200 Gb/s for its 8 H100s (AWS P5). vendor spec

1. The two numbers of every link: latency and bandwidth

Predict first. Per direction, NVLink 4 is 9 times a 400 Gb/s NIC (450 against 50 GB/s). For a 64 KB message, how much faster is NVLink?
NVLink: 3.33 µs + 65,536 / 450 GB/s = 3.48 µs. NIC: 2.8 µs + 65,536 / 50 GB/s = 4.11 µs. Ratio 1.18 derived. At this size both are almost pure latency; the 9 times only appears for messages far above n½.

Before any byte moves, software posts the request, the hardware sets up the transfer, the first bits travel and the receiver notices they arrived. That fixed cost is paid per message, whatever its size. The standard model, used by MPI and NCCL designers alike (the alpha-beta or Hockney model), charges a message of m bytes

t(m) = α + m / β
α
latency: start-up time per message (microseconds)
β
bandwidth: bytes per second once the data flows, in one direction

The half-bandwidth size n½ = α × β is where a message spends as long starting as flowing, so it reaches half the link's bandwidth (the dots on the curves). NVLink's n½ is about 1.5 MB. This is why PyTorch's DistributedDataParallel groups gradients into buckets (25 MiB by default), why NCCL switches algorithms by message size (section 7), and why a tensor-parallel all-reduce of one decoded token (8 KB for a 4,096-wide model) is latency-bound on any link.

A fast link is only fast for big messages: effective bandwidth climbs to β only past n½

α for NVLink, InfiniBand and RoCE: 64-byte end-to-end latencies DeepSeek measured on its H800 cluster (Zhao et al. 2025, Table 5) independent. The laptop row is measured here: two processes exchanging messages through PyTorch's Gloo library over the loopback network (section 7). Rows marked "assumed" have no published latency I could find.

Per direction, always. Vendors usually print both directions added: "900 GB/s" for NVLink 4 is 450 each way, "1.8 TB/s" for NVLink 5 is 900, the "128 GB/s" AMD prints for PCIe 5.0 x16 (MI300X data sheet) is 64 before encoding. Network speeds are bits per second per direction: 400 Gb/s is 50 GB/s each way. This page uses per direction throughout, because an all-reduce sends and receives at once.

Correction to a common comparison
NVIDIA's own pages compare NVLink's two-direction total with PCIe's: "7x the bandwidth of PCIe Gen 5" (Hopper in depth), "over 14x" for NVLink 5 (GB200 NVL72 blog). Per direction the H100 ratio is 450 against 64, also 7 times. The old version of this page called a PCIe 5.0 pair "two orders below NVLink"; it is under one order (7 times per direction, 14 times against NVLink's two-direction total), as GPU architecture also notes.

2. PCIe: the bus every device sits on

A GPU is a card in a computer: the CPU sends it work, the NIC reaches its memory, and GPUs without NVLink reach each other, all over PCI Express. A link is a bundle of lanes, each two pairs of wires, one per direction; a GPU slot has 16 ("x16"). Each generation doubled the rate per lane (rung 3 in the hero figure).

VersionYearGT/s per laneEncodingx16, GB/s each wayWhere you meet it
3.020108128b/130b15.8older servers
4.0201716128b/130b31.5A100 ("PCIe Gen4 64 GB/s" both ways, A100 page); RTX 3090 and 4090
5.0201932128b/130b63.0H100, MI300X, RTX 5090, ConnectX-7 NICs
6.0202264PAM4, 242B/256B FLIT121Blackwell Ultra ("PCIe Gen6 256 GB/s", NVIDIA); ConnectX-8
7.02025128PAM4, FLIT242specification released; no products yet

Per direction after encoding derived: GT/s × 16 × 128/130 / 8; 242/256 for FLIT. Provenance in the closed block below. vendor spec

What sits on it in a GPU server. In an 8-GPU HGX server the GPUs, their NICs and NVMe drives hang off PCIe switches that connect to the two CPUs. Peer-to-peer lets one GPU read another's memory over PCIe without staging through CPU memory. GPUDirect RDMA lets a NIC read and write GPU memory directly, so gradients leave the server without a copy into CPU memory; it works best when the NIC and GPU share a PCIe switch, which is why HGX boards pair each GPU with its own NIC. PCIe can still be the limit: ConnectX-8 NICs and Blackwell GPUs speak PCIe 6.0, enough for 800 Gb/s, "However, Grace CPUs currently only support PCIe Gen5, which limits throughput to 400 Gb/s" when traffic goes through the CPU (NCCL 2.27 blog).

Consumer cards. GeForce cards from the RTX 4090 on have no NVLink, so two RTX 5090s talk over PCIe 5.0: 63 GB/s each way, about a seventh of an H100's NVLink. The 8B's gradient all-reduce between two such cards takes about 255 ms derived: 16.06 GB / 63 GB/s, ring with n = 2.

Encodings and provenance of the PCIe table (1 min)

Data on the wire is wrapped in an encoding that costs a little: 8b/10b (20% overhead) until 2.0, 128b/130b (1.5%) from 3.0, and from 6.0 a new scheme with four voltage levels per symbol (PAM4) and fixed-size packets (FLITs) with error correction, carrying 242 useful bytes in every 256.

Rates, encodings and the PCI-SIG totals ("up to 256.0 GB/s via a x16 configuration" for 6.0, "bidirectional"; 7.0 "officially released to PCI-SIG members ... on June 11, 2025"; 3.0 released November 17, 2010) from PCI-SIG's FAQ, 6.0 and 7.0 pages, read through Wayback Machine copies because pcisig.com refuses automated fetching. PCI-SIG's figures are both directions before encoding (64, 128, 256 GB/s for x16 Gen 4, 5, 6). Years other than 3.0 and 7.0 from Wikipedia (secondary). PCIe 8.0 targets 256 GT/s "by 2028".

3. NVLink and NVSwitch: the scale-up domain

Tensor parallelism exchanges activations several times per layer, so GPUs splitting one model need bandwidth near their memory's, far beyond PCIe. NVLink is NVIDIA's GPU-to-GPU link: many lanes of fast serial wires, grouped into links. Since the A100 the links go not to other GPUs but to NVSwitch chips, so any GPU can send to any other at its full NVLink bandwidth, all at once. The GPUs joined this way are the NVLink domain (or scale-up domain); inside it GPUs can load and store each other's memory, like one bigger GPU with slower remote memory.

A switch gives every pair the whole port; a mesh gives each pair one link. Fig. 2 opens one 8-GPU server and compares the two ways to join its GPUs, then shows what a switch can do that a mesh cannot.

  1. One HGX H100 server. Eight GPUs on one board and four NVSwitch chips between them; each GPU's 18 NVLink links run to the switches, 450 GB/s each way. At the front each GPU's own NIC sits under a PCIe switch (63 GB/s each way, section 2), which also leads to the two CPUs at the back.
  2. GPU 0 sends to GPU 3 at the full 450 GB/s, through all four switches, while the other GPUs send to theirs at the same time. NVIDIA: without NVSwitch each of 8 GPUs "must split the same 900 GB/s connectivity into seven dedicated 128 GB/s point-to-point connections", while through NVSwitch any pair gets the full 900 (NVIDIA, Aug 2024; both figures are two-direction totals).
  3. A direct mesh instead (MI300X): one link per pair. 7 Infinity Fabric links of 128 GB/s (both directions) join each GPU directly to the other 7 (MI300X data sheet), so GPU 0 reaches GPU 3 over one link: 64 GB/s each way, a seventh of the switch's port.
  4. The mesh is fast only when all 7 links work at once. A mesh is cheaper and has no switch hop, but collectives must use all 7 links at once to see the 448 GB/s total: GPU 0 sending a different slice to each of the other 7, as a ring all-reduce split seven ways does.
  5. Back to the switch: in-switch reduction (NVLS). Each GPU sends its buffer up once; the switch chips add the eight copies as they arrive and multicast the sum back down, so a GPU sends S bytes instead of the ring's 2(n−1)/n · S (section 7).

Values each way unless marked. The NICs, PCIe switches and CPUs are placed as in section 2's description; their number of PCIe switches is illustrative. vendor spec

SemiAnalysis attributes NVIDIA's lead in their single-node collective tests to exactly this, "450GByte/s NVLink switched topology with in-network reduction (NVLS), compared to MI300X's 7x64GByte/s xGMI point-to-point topology" (SemiAnalysis, Dec 2024) independent.

In-switch reduction (NVLink SHARP). Third-generation NVSwitch (Hopper) and later can add numbers inside the switch: GPUs send their data in, the switch sums it and multicasts the result back. NVIDIA: "In-fabric multicast and reductions provide up to 2x throughput gain while significantly reducing latency for small block size collectives" (Hopper in depth). NCCL calls the algorithm NVLS (since version 2.17, NCCL environment variables). Section 7 shows why the gain is close to 2 in bytes and why measurements give less.

GenerationGPULinksPer GPU, totalEach wayDomain
NVLink 2V1006300 GB/s150not covered here
NVLink 3A10012600 GB/s3008 per HGX board
NVLink 4H100, H20018900 GB/s4508 per HGX board (4 NVSwitch chips); up to 256 with the NVLink Switch System
NVLink 5B200, B300, GB200181,800 GB/s9008 (HGX) or 72 (NVL72 rack)
NVLink 6Rubin363,000 or 3,600 GB/s1,500 or 1,80072 (Vera Rubin NVL72)
Sources for the NVLink table, and the two NVLink 6 figures (1 min)

Ampere in depth (12 links, 600 GB/s; V100 6 links, 300 GB/s); Hopper in depth (18 links, "25 GB/sec effective bandwidth in each direction" per link, NVLink Switch System "up to 256 GPUs"); NVLink and NVSwitch for inference, Aug 2024 ("four third-generation NVSwitch chips" per HGX H100/H200); NVLink page. NVLink 6: NVIDIA's NVLink and Vera Rubin NVL72 pages say 3,000 GB/s over 36 links and 216 TB/s per rack; the Rubin platform blog (Jan 2026) and the HGX page say 3.6 TB/s and 260 TB/s. Both shown; the Chip atlas on the parent page uses 3.6. vendor spec

The NVL72 rack. GB200 NVL72 puts 72 Blackwell GPUs (and 36 Grace CPUs) in one NVLink domain. Nine switch trays, each with two NVLink switch chips of 72 ports, connect all 18 links of every GPU: "Each NVLink switch tray delivers 144 NVLink ports at 100 GB so the nine switches fully connect each of the 18 NVLink ports on every one of the 72 Blackwell GPUs", through "a copper cable cartridge" rather than optics; 72 × 1.8 TB/s gives the 130 TB/s headline (GB200 NVL72 blog, DGX GB200 user guide). Tensor or expert parallelism of up to 72 instead of 8 now runs at NVLink speed.

Other scale-up fabrics: NVLink-C2C, UALink (under 1 min)

Google's TPUs join chips directly in a torus over ICI, without switches (section 6). NVLink-C2C joins a Grace CPU to its GPUs at 900 GB/s (GB200 NVL72 blog). UALink is an open scale-up standard: its 1.0 specification defines 200 Gb/s lanes, 800 Gb/s per four-lane station and "up to 1024 endpoints" with load/store semantics (UALink Consortium, May 2025); AMD's Helios rack carries it over Ethernet (parent page, Chip atlas).

Copper or optics for scale-up: a bet, as of 16 November 2026 (dated)

On 2 November 2026 Marvell agreed to buy Lumentum (lasers, optical transceivers, optical circuit switches) for $115B in stock, on the companies' stated rationale that AI racks are outgrowing copper and scale-up links will move to integrated optics; the deal had not closed by this date (Light Reading).

Front of an NVIDIA GB200 NVL72 rack: ten compute trays at the top, nine plainer NVLink switch trays in the middle, eight compute trays at the bottom
Count the trays: 10 compute, 9 NVLink switch, 8 compute. The switch trays sit in the middle of the rack, so the copper cable cartridge behind the trays, which joins every GPU to every switch, stays short: 72 GPUs share one NVLink domain without optics. Each compute tray carries 4 GPUs and 2 Grace CPUs.Photo: Pokiiri, Nvidia DGX GB200, CC BY-SA 4.0, cropped.

RDMA takes the CPU and the kernel off the data path: the NIC reads one GPU's memory and writes another's

4. Leaving the server: RDMA, InfiniBand and RoCE

Past the NVLink domain, GPUs in different servers talk through NICs. The ordinary way, a program calling the operating system's TCP stack, copies every byte through kernel memory, takes interrupts and backs off on loss; at 400 Gb/s per GPU that costs CPU time and microseconds the GPUs spend idle (Networking foundations explains TCP, and its section 14 why clusters avoid it for heavy traffic). Remote direct memory access (RDMA) moves the whole transport into the NIC. Fig. 3 steps through it against the TCP path:

  1. TCP, for contrast. Bytes are copied from GPU memory to a host buffer, through the kernel's socket buffers to the NIC, and the same in reverse on the receiver: CPU copies and interrupts on both sides.
  2. Register memory. The program tells the NIC which buffer it may touch (on a GPU server, a buffer in GPU memory); the NIC pins it and gets a key. With GPUDirect RDMA the NIC reaches GPU memory across PCIe without the CPU copying it.
  3. Create a queue pair. Each connection is a pair of queues (send and receive) that live in the NIC; a reliable connection keeps ordering and retransmission in hardware.
  4. Post work. The program writes a small descriptor ("write these bytes into the remote buffer at this address with this key") into the queue and rings a doorbell. No system call, no copy.
  5. The NICs move the data. A one-sided RDMA write lands in the remote buffer without the remote CPU doing anything; completion shows up in a completion queue, which the GPU or CPU polls.

The same RDMA operations run on three kinds of fabric: InfiniBand, RoCE (RDMA over Converged Ethernet: the InfiniBand transport inside UDP packets, port 4791, on ordinary routed Ethernet) and AWS's EFA (its own SRD protocol); each is described in the closed block below, and how NCCL picks between them, or falls back to TCP sockets, is on Networking foundations, section 14. What separates InfiniBand from RoCE is how each avoids dropping packets, because RDMA's hardware transport recovers from a lost packet slowly. Meta trained Llama 3 405B over RoCE at 400 Gb/s per GPU (closed block below).

The three RDMA fabrics in one paragraph (under 1 min)

InfiniBand is a separate network built for RDMA, with its own adapters and switches (InfiniBand Trade Association). RoCEv2 carries the same RDMA operations in UDP datagrams to port 4791 over ordinary routed Ethernet and IP (IANA registered 4791/udp to the InfiniBand Trade Association in 2014, IANA port registry); the UDP header is only an envelope, and reliability lives in the RDMA transport and the fabric. AWS EFA is an OS-bypass interface whose transport is the Scalable Reliable Datagram (SRD) protocol, with built-in congestion control, reached through Libfabric, which ML applications use through NCCL and NIXL (EFA documentation).

InfiniBand: credits. "Each receiving end of a link supplies credits to the sending device ... Data is not transmitted unless the receiver advertises credits indicating receive buffer space is available" (Mellanox, Introduction to InfiniBand). So the fabric never drops for lack of buffer. Current NVIDIA switches add adaptive routing and in-network reduction (SHARP). vendor

RoCE: lossless Ethernet by configuration. Ethernet drops packets when buffers fill; RoCE needs Priority Flow Control (PFC), pause frames sent hop by hop, plus ECN marking and a congestion-control algorithm, usually DCQCN. The Ultra Ethernet Consortium names the costs: DCQCN "requires careful manual tuning", a lost packet triggers "Go-Back-N" retransmission, and PFC backpressure "can produce 'congestion trees' and head-of-line blocking" (UEC overview, 2023). In exchange it is multi-vendor and runs on the Ethernet a data centre already has.

InfiniBand never sends without buffer space; RoCE pauses the sender once a buffer fills

In-network reduction (SHARP). NVIDIA's InfiniBand switches can do the additions of an all-reduce themselves (SHARPv3 on Quantum-2, SHARP v4 on Quantum-X800), so data "traversing the network" shrinks as it climbs a reduction tree (NVIDIA SHARP docs). SemiAnalysis measured the effect: without SHARP the all-reduce slows as GPUs are added, "In contrast, with SHARP, the speed/completion time stays the same. We have results for up to 1,024 H100s" (SemiAnalysis, Dec 2024) independent.

InfiniBand cables plugged into the network ports of a column of compute nodes in a cluster rack
One cable per network port. Each of the stacked compute nodes carries its own InfiniBand cable to the cluster's switches. At one NIC per GPU, an 8-GPU server needs eight such cables, one to each rail leaf (section 5); "cables dominate network cost", as the dragonfly paper puts it (section 5).Photo: Javils00, Cables Infiniband, CC0, cropped.
RoCE at scale: Meta's Llama 3 cluster without DCQCN (under 1 min)

RoCE at scale, in a real run. Meta trained Llama 3 405B over RoCE at 400 Gb/s per GPU (smaller models on InfiniBand). "LLM training produces fat network flows that are hard to balance across all available network paths using traditional methods such as Equal-Cost Multi-Path (ECMP) routing", so "our collective library creates 16 network flows between two GPUs, instead of just one" and an enhanced ECMP hashes on more header fields; with that balancing and "Deep-buffer switches in the spine", they ran "without traditional congestion control methods such as ... (DCQCN)" (Llama 3 report, section 3.3.1). ECMP sends every packet of one flow down one path to keep order, so a few huge flows collide on some links while others sit idle; more flows per connection spread them.

NICs and switches by generation; where Ethernet is going (UEC, Spectrum-X, SRD) (2 min)
PartSpeedNotes
ConnectX-7 NIC400 Gb/sInfiniBand NDR or Ethernet; one per GPU in DGX H100 ("8 x ... ConnectX-7 ... Up to 400Gbps", DGX H100 guide)
ConnectX-8 SuperNIC800 Gb/sPCIe 6.0 (SuperNIC page)
ConnectX-9 SuperNIC1.6 Tb/s"per GPU", Rubin generation (same page)
Quantum-2 switch64 ports of 400 Gb/s"51.2 terabits per second (Tb/s) of bidirectional throughput", SHARPv3 (Quantum-2)
Quantum-X800 switch144 ports of 800 Gb/sSHARP v4, adaptive routing (Quantum-X800)
Spectrum-6 Ethernet switch chip102.4 Tb/s200G SerDes (Spectrum-X)

Per GPU this is 50 GB/s each way at 400 Gb/s, 100 at 800 Gb/s. Server totals vary by builder: NVIDIA's HGX B200 reference lists 0.8 TB/s of networking per 8 GPUs and HGX B300 1.6 TB/s (HGX); AWS's P6-B200 has 3.2 Tb/s and P6-B300 6.4 Tb/s, half of those (AWS P6). vendor spec

Where Ethernet is going. The Ultra Ethernet Consortium released its Specification 1.0 on June 11, 2025 (UEC press release). Its design goals, from the overview: "packet spraying" (every flow uses all paths at once), delivery out of order into the application buffer, and a transport that "does not depend on a lossless fabric". NVIDIA's Spectrum-X sells adaptive routing and telemetry-based congestion control on Ethernet (Spectrum-X, vendor claims). AWS's SRD already sprays and tolerates reordering (its user guide: "built-in OS-bypass and congestion control through the Scalable Reliable Datagram (SRD) protocol", EFA).

5. Topology: fat trees, rails, oversubscription and dragonflies

A switch has a fixed number of ports (64 on a Quantum-2), so thousands of NICs need layers of switches, each costing money, power and a hop of latency. How they are wired decides which GPUs can talk at full speed at once. Three shapes cover almost every machine:

Fat trees. The standard GPU-cluster answer is a folded Clos network, usually called a fat tree: leaf switches connect to NICs below and to every spine switch above; a third layer joins groups of spines when two are not enough. With k-port switches, two layers reach k²/2 endpoints and three reach k³/4 (Al-Fares et al., SIGCOMM 2008); with 64 ports that is 2,048 and 65,536 derived. If each leaf has as many uplinks as downlinks, the network has full bisection bandwidth: cut it into any two halves and each half can send to the other at the full rate of its NICs. Fewer uplinks than downlinks is oversubscription: at 1:7 (Meta) or 15:1 (Alibaba), traffic crossing that layer gets a seventh or a fifteenth of the NIC rate if everyone sends at once.

Dragonflies. "Because cables dominate network cost, the number of cables, and particularly the number of long, global cables should be minimized". The dragonfly answer "uses a group of high-radix routers as a virtual router to increase the effective radix of the network", so that "each minimally routed packet traverses at most one global channel"; the authors claim it "reduces cost by 20% compared to a flattened butterfly and by 52% compared to a folded Clos network in configurations with ≥ 16K nodes" (Kim, Dally, Scott and Abts, ISCA 2008). Inside a group the switches are wired all-to-all with short cables; between groups there is at least one long global link per pair (the Dragonfly view of the figure). The price is that heavy traffic between two groups shares few global links, so the paper adds adaptive routing that sends some packets through a third group. HPC machines such as Frontier use it; the AI training clusters in the table use rail-optimised or multi-plane fat trees, whose rails suit NCCL's same-index rings.

Three ways to join many chips: count the hops between the two highlighted endpoints

Rails. In a rail-optimised fabric, GPU k of every server connects to leaf switch k: rail k (rung 4 of the hero figure). NCCL's collectives across servers mostly pair same-index GPUs (the NVLink inside the server does the rest), so their traffic stays on one leaf, one hop, never touching the spine. NVIDIA's DGX SuperPOD reference: "Traffic per rail of the DGX B200 systems is always one hop away from the other 31 nodes in a SU. Traffic between nodes, or between rails, traverses the spine layer" (network fabrics). Real clusters (Meta, Alibaba, DeepSeek, NVIDIA, Frontier) are in the closed block below.

Predict first. 16 servers of 8 GPUs on a rail-optimised fabric. Every GPU sends 1 GB in an all-to-all, spread evenly over all 128 GPUs. What fraction of each GPU's bytes must cross the spine (go to a different rail on a different server)?
Of the 127 other GPUs, 15 are on the same rail (other servers) and 7 in the same server; the other 105 are on another rail and another server: 105/127 = 83% derived. A ring all-reduce sends none of its bytes over the spine. This is why all-to-all, not all-reduce, is what a network's spine and oversubscription are for. Check it in the explorer below.
Five real clusters: shape, oversubscription and why they oversubscribe (2 min)
ClusterShapeOversubscriptionSource
Meta, Llama 3 (24K GPUs, RoCE)Three-layer Clos. 16 GPUs (two servers) per rack and ToR; 192 racks form a pod of 3,072 GPUs; 8 pods form the clusterNone inside a pod ("full bisection bandwidth"); 1:7 between podsLlama 3, 3.3.1
Alibaba HPN (15K GPUs per pod)Two tiers, rail-optimised, each NIC's two ports on two different ToRs ("dual-ToR"), two planes; 1,024 GPUs per single-layer segment1:1 in the pod; 15:1 above itQian et al., SIGCOMM 2024
DeepSeek (2,048 H800s)Multi-plane fat tree: GPU-NIC pair k of every server on its own two-layer plane; 8 planes of 64-port switches reach 16,384 GPUs1:1Zhao et al., ISCA 2025
NVIDIA DGX SuperPOD (B200, 4 SUs)Rail-optimised two-tier fat tree: "A modular architecture based on SUs of 32 DGX B200 systems each", "rail-optimized, balanced, full-fat tree" (components); four units, 127 servers, use 32 leaf and 16 spine switches1:1SuperPOD RA
Frontier (HPE Slingshot)Dragonfly; 64-port, 12.8 Tb/s switches; "copper and optical cables"not statedOLCF, Frontier system architecture, Feb 2023

Why oversubscribe at all? Alibaba reports that "about 96.3% of in-production LLM training jobs take less than 1K GPUs", so a full-bisection core would mostly carry nothing; HPN places pipeline traffic, the lightest, across pods. DeepSeek's cost table prices a two-layer fat tree at $4.39k per endpoint against $7.5k for three layers, which is why it built eight two-layer planes instead of one three-layer tree (Zhao et al., Table 3). The rail-only proposal goes further and removes the spine, forwarding cross-rail traffic over NVLink, claiming "the same training performance while reducing the network cost by 38% to 77%" with "8.2% to 11.2% completion time overhead for all-to-all traffic" (Wang et al. 2023).

The same fabric under three traffic patterns: which class of link limits each one

Servers of 8 GPUs, each GPU with one 400 Gb/s NIC (50 GB/s each way) and NVLink 4 (450 GB/s each way) inside its server; each GPU sends 1 GB. The drawing shows the first few servers; the numbers are for the whole cluster. Start with all-to-all at 1:1, raise the oversubscription, then tick PXN.

Fluid model (src/fabric.py, mirrored here and checked on 216 cases): perfect load balance across spine switches, no congestion control or flow collisions (real ECMP hashing does worse), all GPUs sending at once. Time = the largest load / capacity over link classes. Switch ports count leaf downlinks plus leaf uplinks and the spine ports they need, a rough cost proxy. derived

6. TPU pods: a torus of chips, rewired by optical switches

Each TPU has its own inter-chip interconnect (ICI) ports wired straight to neighbouring chips: no NIC, no switch. Chips sit on a grid; each talks to 4 neighbours (a 2-D grid: v2, v3, v5e, v6e) or 6 (a 3-D grid: v4, v5p, Ironwood). Wiring the last chip of every row back to the first makes a torus (the Torus view in section 5's figure), which roughly halves the longest path and lets a ring of chips send both ways at once. A torus is excellent for ring collectives between neighbours and slower for arbitrary point-to-point traffic, which is why TPU programs are written as shardings over a device mesh (Sharding and scale).

Optical circuit switches. A torus wired once is fragile: one dead chip breaks a ring, and the whole machine must be cabled before any of it can be used. TPU v4 builds the pod from 4 × 4 × 4 cubes of 64 chips (one rack, 16 hosts), electrically wired inside, and connects the cubes' faces through optical circuit switches (OCS): MEMS mirrors that steer light from one fibre to another and switch in milliseconds. Each cube face has 16 links, 96 per cube; opposite faces go to the same switch, so 6 × 16 / 2 = 48 switches of 136 ports join 64 cubes into 4,096 chips. The mirrors are not a packet network: they only set which cube's face is plugged into which, like a plugboard: slices of any shape, routing around failed cubes, twisted tori, for under 5% of system cost.

What the optical switches buy, in detail (1 min)

All from the TPU v4 paper:

  • Slices of any shape: a job asks for, say, 4 × 8 × 16 chips, and the switches wire the cubes it gets into exactly that torus, wherever they sit in the hall.
  • Routing around failures: a cube with a dead host is swapped out by re-pointing mirrors; with 1,024 hosts each up 99.0% to 99.9% of the time, a large slice is otherwise rarely all healthy.
  • Twisted tori: some links are re-pointed to shorten the longest paths, which raised all-to-all throughput; 40% of slices of 64 chips or more chose a twisted topology in Google's sample.
  • Cost: the switches and optics are "<5% of system cost and <3% of system power".

Slices smaller than a cube get no optical wraparound, so a 2 × 2 × 4 slice is slower per byte than a 4 × 4 × 4. Ironwood keeps the scheme at 9,216 chips: 144 cubes of 64, 1.77 PB of HBM in one pod, ICI at 9.6 Tb/s (1.2 TB/s) per chip (Google Cloud, Nov 6 2025). Per link the scaling book uses 45 GB/s one way on v4 and v5e and 90 GB/s on v5p, v6e and TPU7x (scaling book). vendor spec

Beyond a pod. Pods (or slices) join over the ordinary data-centre network, DCN, at about 6.25 GB/s per chip (12.5 on v6e and TPU7x), more than 10 times slower than one ICI link (scaling book). So, as on GPUs, only data parallelism (the gradient all-reduce, once per step) crosses that boundary ("multislice"), and everything chatty stays on ICI: the same ladder, with ICI as the top network rung. Section 7 gives the collective times on a torus; the chip itself is on TPUs and other accelerators.

Figure 1 of the TPU v4 paper: a 4 by 4 by 4 cube of chips with its face links, and below it the cube's 16 links per face running to X, Y and Z optical circuit switches
Each face of a 64-chip cube has 16 links; opposite faces go to the same optical switch, which closes the torus in that dimension. Inside the cube chips are wired electrically; between cubes only the mirrors decide who connects to whom.Figure 1 of Jouppi et al., TPU v4: An Optically Reconfigurable Supercomputer for Machine Learning (ISCA 2023), CC BY 4.0, cropped.

The same 8B gradients, four algorithms: the ring pays many latencies, recursive doubling many bytes, the switch neither

7. Collectives on the wire: algorithms and what they cost

Training code calls a handful of collectives, operations every GPU in a group joins: all-reduce (everyone ends with the sum), reduce-scatter (everyone ends with the sum of one slice), all-gather (everyone ends with every slice), all-to-all (everyone sends a different piece to everyone). Distributed Training explains which parallelism calls which. A library (NCCL on NVIDIA, RCCL on AMD, XLA on TPU) turns each call into a schedule of point-to-point messages, and the schedule decides how many latencies and how many bytes the operation pays. Fig. 4 runs four schedules on the same input; pick one with the first row of buttons.

8 GPUs, each buffer cut into 8 chunks; a chunk's shade shows how many GPUs' contributions it holds (pale: its own; full: all 8). Predict, then step: at 16.06 GB, which schedule sends the most bytes per GPU, and which ties with the ring? Then pick 8 KB: there the step count is everything, and recursive doubling's 3 steps beat the ring's 14.

  1. Start. Every GPU holds its own gradients for all 8 chunks (pale). Goal: every GPU ends with the sum of all 8 GPUs' contributions in every chunk.
  2. Reduce-scatter, step 1. Each GPU sends one chunk, 1/8 of the buffer, to its right neighbour, which adds it to its own copy. Every link is busy, each carrying an eighth of the buffer.
  3. Reduce-scatter, steps 2 to 7. The partial sums keep moving right and growing; after 7 steps each GPU owns one fully summed chunk (8/8).
  4. All-gather, steps 8 to 14. Each GPU passes a finished chunk to the right, which overwrites its copy; nothing is added, the sums just travel. In all, 14 latencies and 2 × 7/8 of the buffer per GPU: 28.1 GB at 16.06 GB.

With n GPUs, a buffer of S bytes, and every GPU able to send and receive one message per step:

AlgorithmSteps (latencies)Bytes sent per GPUTime, alpha-betaGood for
Ring: pass chunks of S/n around a ring, adding (n−1 steps), then pass the finished sums (n−1 steps)2(n−1)2(n−1)/n · S2(n−1)α + 2(n−1)/n · S/βlarge buffers; the minimum bytes of any point-to-point scheme
Recursive doubling: swap the whole buffer with the partner at distance 1, 2, 4, ...log₂ nlog₂ n · Slog₂n (α + S/β)tiny buffers
Halving-doubling (Rabenseifner): swap halves of a shrinking range, then grow it back2 log₂ n2(n−1)/n · S2 log₂n α + 2(n−1)/n · S/βboth, when n is a power of 2
Double binary tree (NCCL across nodes): two pipelined trees, each carrying halfabout 2 log₂ nabout 2Sabout 2 log₂n α + 2S/βmany nodes, small and medium buffers
In-switch (NVLink SHARP, InfiniBand SHARP): everyone sends to the switch, which adds and sends back2S2α + S/β (up and down streams overlap)everything, if the switch can add at line rate
Sources and caveats of the cost table (1 min)

Formulas: Thakur, Rabenseifner and Gropp, 2005 for recursive doubling and halving-doubling; the ring line is their ring reduce-scatter plus ring all-gather, composed here derived. Their γ term for the additions is dropped: on GPUs the adds are far cheaper than the transfers. The tree row is the usual α-β estimate derived; NVIDIA: rings' "latency scales linearly with the number of GPUs", trees give "full bandwidth and a logarithmic latency", "up to 180x improvement at 24k GPUs" in latency (NCCL 2.4 blog, 2019). The in-switch line is idealised (the switch adds as fast as data arrives).

On a torus: one axis, two axes, or a tree

On a TPU slice the ring runs along a torus axis in both directions at once, and a collective over two mesh axes uses both, halving the bandwidth term; a tree trades the ring's n/2 latencies for 2 log2 n. The formulas are in the closed block.

For the 8B's 16.06 GB along one 16-chip v5p axis the ring form gives about 2 × 16.06 GB / 180 GB/s = 0.178 s, 0.059 s over all three axes derived, against 62.5 ms over 8 H100s' NVLink. The book's own statements, and a worked example checked against a profile, are in the closed block.

The torus formulas: the scaling book's statements and a worked example (2 min)

The scaling book's forms, with Wbidi one link's two-way bandwidth and α about 1 µs per ICI hop ("This is typically around 1us", scaling book, part 3, 2025-02-04):

AlgorithmAll-gather of V bytes over n devicesAll-reduceWhere it is used
Ring (1-D, both directions, wraparound)max(α·n/2, V / Wbidi)twice the all-gather (reduce-scatter, then all-gather)One axis of a TPU torus; NCCL rings inside a server
2-D torus (X × Y, gather over both axes)max(α·(X+Y)/2, V / (2 Wbidi))twice thatA collective over two mesh axes of a slice; the 2-D all-reduce of Ying et al. 2018 on TPU v3 pods
Tree (double binary tree)not used for gathersabout 2·log2(n)·α + 2V/WNCCL across many nodes

A bidirectional ring all-gather takes "Ttotal = V / Wici", which "doesn't depend on X!", gathering over several axes "increases the available bandwidth by a factor of Naxes", "an AllReduce is twice as expensive as an AllGather", an all-to-all on a 1-D ring is "1/4 the cost of an AllGather", and an axis without the wraparound "typically doubles the time of most communication" (scaling book, sharding). The book's worked example, an all-gather of 34 MB over a 4-chip v5e axis, predicts 378 µs with a wraparound and 560 µs without one; the profile it shows measured 680 µs measured by Google.

All-reduce time against message size: flat while latency dominates, then rising with the bytes derived

Predict, then drag: at 1,024 devices, which loses for a 100 KB message, the ring or the tree? For small messages latency dominates and a ring over many devices loses; for large ones bandwidth dominates and the ring's latency is irrelevant.

What real clusters measure

Against published nccl-tests runs, rings reach 76 to 81% of NVLink's per-direction rate, and in-switch reduction is real but well short of its ideal: 1.29 times the ring on H200 and 1.23 times on B200, not 1.75 times. The table, its model and what nccl-tests' busbw means are in the closed block.

busbw, and published nccl-tests against the model (3 min)

NVIDIA's nccl-tests, the standard benchmark, prints two bandwidths: algbw = S / t, and busbw = algbw × 2(n−1)/n for all-reduce ((n−1)/n for all-gather, reduce-scatter and all-to-all), defined so that it can be compared "with the hardware peak bandwidth, independently of the number of ranks used" (nccl-tests PERFORMANCE.md). For a ring, busbw is the bandwidth on each wire. In-switch and hierarchical algorithms break that meaning; NCCL's author: "with SHARP enabled ... BusBW may not represent any 'Bus' bandwidth" (nccl-tests issue 153). So a busbw above the link's rate is not a measurement error: it is NVLS or a hierarchy at work.

Model: ring busbw equals the link's bandwidth each way; in-switch busbw = 1.75 × link (S/β time, rescaled by 2(n−1)/n); across servers a two-level model (ring inside over NVLink, each GPU's 1/8 share all-reduced over its own NIC, the slower phase setting the time) derived. Measurements: Bekman, ML Engineering, network benchmarks independent; AWS awsome-distributed-training sample outputs vendor. Together AI's acceptance target for H100 InfiniBand clusters is "around 92% of the theoretical maximum of the fabric: so around 370 GB/s on a 400GB/s fabric" (Together AI, Aug 2024).

Rings reach 76 to 81% of NVLink's per-direction rate, and two-level all-reduces across servers 73 to 101% of the model. In-switch reduction is real but well short of the ideal: 1.29 times the ring on H200 and 1.23 times on B200, not the 1.75 times that halving the bytes would give, because the switch's adders and protocol overheads, not the wires, become the limit. The 2 × p5 case reaches 101% of a model that assumes a ring inside each server, which fits NCCL using NVLS there (the README does not say).

How NCCL picks. NCCL chooses algorithm (ring, tree, NVLS, CollNet, PAT) and protocol by message size and topology from a cost model: logarithmic-latency schemes for small messages, bandwidth-optimal ones for large. NVIDIA's tuning post prints a real choice on 4 servers, 32 GPUs: tree with LL up to 96 KiB, tree with LL128 up to 12 MiB, ring with LL128 up to 96 MiB, ring with Simple above (NVIDIA, Jul 2025).

NCCL's three protocols: LL, LL128, Simple (under 1 min)

The protocols trade latency against bandwidth: LL sends 4 bytes of data with a 4-byte flag (about 1 µs per hop, 25 to 50% of peak bandwidth), LL128 120 bytes of data with an 8-byte flag (about 2 µs, about 95%), Simple large chunks with memory fences (about 6 µs, near peak) (Hu et al., Demystifying NCCL, Table I) independent.

Measured here: latency against bandwidth on one laptop

Both algorithms written with send and receive in PyTorch, run as 2, 4 and 8 processes on this laptop over loopback TCP. At small sizes the ring takes as long as recursive doubling with 8 ranks; the model's step count predicts 14/3 = 4.67. The predicted crossover is , and the measured crossover falls between the 1 MiB and 4 MiB sizes for 4 and 8 ranks.

How it was measured, and the two departures from the model (1 min)

measured here Apple M1 Pro (8 performance and 2 efficiency cores), PyTorch 2.14.1, Gloo backend, three runs 20 s apart, median shown with the min-max range; load average 5.5 to 7.2 (the machine was shared with other jobs). The "links" are slow (about 80 µs per message) and share one memory system; every result was checked against the exact sum. Lines: the alpha-beta model with α fitted from sizes up to 16 KiB (both algorithms pooled, time divided by steps) and β from the ring at 16 MiB derived. Gloo's own all-reduce (grey) is shown for reference; its algorithm choice was not inspected. Script: src/meas/coll_bench.py.

Two departures teach as much as the agreement. The per-step latency grows with the number of ranks (), because the processes compete for cores. And the bandwidth per rank falls as ranks are added () while the total stays near : all the "links" share one memory system, exactly like GPUs whose NICs share an oversubscribed switch. The model assumes independent links; a real fabric only gives you that if it was built with full bisection.

Ring against recursive doubling, measured: recursive doubling wins small, the ring wins past the crossover

Corrections to the old page's sanity numbers
The old page put the 16 GB all-reduce at "~2 x 16/50 = 0.64 s" over 400G InfiniBand and "~70 ms" over NVLink 4. 2S/β is the large-n limit; for 8 GPUs the ring factor is 2 × 7/8 = 1.75, giving 0.56 s and 62 ms () derived. It also said SHARP "roughly halv[es] traffic": the bytes per GPU do fall from 2(n−1)/n · S to S, but measured speed-ups are 1.23 to 1.29 times inside a server (table above).
Go deeper (optional). The Collective simulator tab runs any of these algorithms, plus all-gather and all-to-all, for 2 to 16 GPUs at any size and link, draws time against size with the crossovers, and overlays the published curves.

8. All-to-all and mixture-of-experts

A mixture-of-experts layer sends each token to a few of many experts, which live on different GPUs (expert parallelism). Every MoE layer does two all-to-alls going forward (dispatch tokens to experts, combine the results) and two going back. In bytes an all-to-all looks cheap: each GPU sends (n−1)/n of its buffer, once. But every GPU talks to every other at once, so its traffic crosses the spine (section 5's prediction: 83% of it on 16 servers) and nothing is reduced on the way. It is limited by the narrowest cut it crosses: the NVLink port inside a domain; across servers the NIC if the fabric has full bisection, or the spine if it is oversubscribed. Two tricks keep it off the spine. Forwarding through NVLink (NCCL calls it PXN): a GPU hands a piece destined for rail k of another server to its own server's GPU k over NVLink, which sends it on rail k (tick PXN in section 5's explorer). Limiting the fan-out: route each token to fewer servers.

DeepSeek-V3: an MoE designed around its network
  • 2,048 H800s; "NVLink offers a bandwidth of 160 GB/s, roughly 3.2 times that of IB (50 GB/s)" (the H800's NVLink is cut to 400 GB/s total from the H100's 900, per DeepSeek's later paper). 256 routed experts per layer, 8 per token, spread over 64 GPUs in 8 servers (DeepSeek-V3 report).
  • Node-limited routing: "we limit each token to be dispatched to at most 4 nodes, thereby reducing IB traffic". A token is sent once over InfiniBand to the same-index GPU on each target server, "then instantaneously forwarded via NVLink" to the right experts there; "only 20 SMs are sufficient to fully utilize the bandwidths of IB and NVLink".
  • Their cost: "the communication overhead introduced by cross-node expert parallelism results in an inefficient computation-to-communication ratio of approximately 1:1", which they hide with the DualPipe schedule (computation of one micro-batch overlapping communication of another).

Per-token arithmetic from DeepSeek-V3's config reproduces the 1:1 at a realistic fraction of FP8 peak (closed block).

Checking DeepSeek's 1:1 (1 min)

Checking the 1:1. Per token per MoE layer going forward, the InfiniBand traffic is at most 4 servers × (7,168 bytes of FP8 dispatch + 14,336 bytes of BF16 combine) = 86,016 bytes, which takes 1.72 µs at 50 GB/s. The experts' matmuls for that token are 9 experts (8 routed, 1 shared) × 3 matrices of 7,168 × 2,048 × 2 FLOPs = 0.79 GFLOP. For compute to take as long as the transfer, the GPU must run them at 461 TFLOP/s: of an H100-class chip's dense FP8 peak (1,979), the format DeepSeek trained in derived. A realistic fraction of peak, so "approximately 1:1" is what the arithmetic predicts. (Sizes from the DeepSeek-V3 config; attention and the backward pass left out, both of which scale the same way.)

The rack-scale answer. An NVL72 rack makes 72 GPUs one NVLink domain, so expert parallelism up to 72 never touches the network. DeepSeek's own hardware wish list asks for the same thing from the other side: "future hardware should integrate intra-node (scale-up) and inter-node (scale-out) communication into a unified framework" (Zhao et al., ISCA 2025).

9. Why the network picks your parallelism

One number per link. Divide the FLOP/s a GPU actually sustains by the bandwidth of the link its traffic crosses: the link intensity I = F / β, the FLOPs the GPU does in the time one byte crosses. It plays the role the ridge point plays in the parent page's roofline: a parallelism whose computation per byte sent is below I waits on the link. For an H100 at 40% of its dense BF16 peak (F = 396 TFLOP/s): FLOPs per byte over NVLink 4, over a 400 Gb/s NIC derived.

Fig. 5 puts each kind of parallelism on the two servers of Fig. 1, its traffic on the link it crosses, and beside them a pair of bars: the step's compute time and its communication time, to scale, with no overlap (the table below).

  1. Two rungs, two link intensities. Over NVLink 4 an H100 at 40% of its dense BF16 peak does 880 FLOPs in the time one byte crosses; over a 400 Gb/s NIC, 7,916, nine times more. The bars are those two numbers.
  2. Tensor parallelism 8 inside the server: 16%. Four all-reduces of the activations per layer stay on NVLink; for Llama 3.1 70B the communication is 16% of the layer's compute.
  3. The same tensor parallelism across the NIC: 141%. The same bytes over a link nine times slower: with no overlap the GPUs wait 59% of the time, and the next matmul needs the result, so nothing hides it. Bigger batches do not help, because the ratio depends only on t, h and I.
  4. Pipeline across servers: 0.34%. Llama 3.1 405B in 16 stages sends one activation forward (and one gradient back) per stage boundary, each GPU its 1/8 over its own NIC: a trickle against the stage's compute.
  5. Data parallelism across replicas: about 4%. The gradient all-reduce, once per step, rides the rails (GPU k with GPU k, never the spine) and overlaps backward. It breaks even at 5,277 tokens per replica on a 400 Gb/s NIC; Llama 3 405B ran about 131,000 (16M tokens over 128 replicas), so it costs about 4% of compute derived: 5,277 / 131,072.
  6. Expert parallelism: all-to-all over the spine, about 1:1. Every GPU sends a different piece to every other, so most bytes cross the spine (83% on 16 servers, section 5) and nothing is reduced on the way; DeepSeek-V3 reports computation to communication of about 1:1 across servers and limits each token to 4 nodes (section 8).
ParallelismTraffic per step, per GPUCompute it is set againstFits a link whenH100, 40%: NVLink 4 / 400G NIC
Data (DDP)2 × 2P bytes (bf16 gradients, ring, large n)6P × T tokens per replicaT ≥ 2I/3 tokens
Fully sharded (FSDP, ZeRO-3)3 × 2P bytes (gather forward, gather backward, reduce-scatter)6P × TT ≥ I tokens
Tensor (TP, degree t)4 all-reduces of the activations per layer: 16(t−1)/t · h bytes per token6 × layer parameters / t per tokenratio = 2(t−1)I / (9h) small (layer ≈ 12h² parameters)70B, t = 8:
Pipeline (PP)one activation and one gradient per stage boundarythe stage's layersalmost always405B, 16 stages:
Expert (EP)4 all-to-alls of the routed tokens per MoE layerthe experts' matmulssee section 8about 1:1 across servers (DeepSeek)
Assumptions behind the table (under 1 min)

P parameters, T tokens per data-parallel replica per step, h hidden size. The TP column is the parent page's Performance calculator model (Megatron-LM's two all-reduces forward and two backward per layer; Llama 3.1 70B, 8,192 tokens, real layer sizes); the simplified 12h² formula gives . PP: Llama 3.1 405B, one 8,192-token micro-batch, 126/16 layers per stage with TP 8 inside the server, each GPU sending its 1/8 over its own NIC. All rows assume no overlap; overlap hides the data-parallel and pipeline traffic, never the tensor-parallel all-reduces, whose result the next matmul needs. derived

Reading the table. Data parallelism over a 400 Gb/s NIC breaks even at about 5,300 tokens per replica per step, and real runs are far above that: Llama 3 405B's 16M-token batches over 128 replicas are about 131,000 tokens each derived: 16,384 GPUs / (TP 8 × PP 16) = 128 replicas. So data parallelism crosses the slowest rung comfortably and overlaps the rest. Tensor parallelism is the opposite: its ratio does not depend on batch size at all, only on t, h and I, so a slow link cannot be fixed by bigger batches. Over NVLink it costs of the layer's compute; over a NIC the GPUs would wait of the time. That is the whole rule: tensor and expert parallelism inside the NVLink domain, pipeline and data parallelism across it, and the NVL72 rack exists to make "inside" bigger. TPU slices follow it too: FSDP and tensor parallelism on ICI, data parallelism over DCN (section 6).

Two real runs that follow the rule
  • Llama 3 405B: tensor parallelism 8 (one server), pipeline 16, data parallelism across the rest, on a fabric oversubscribed 1:7 above each 3,072-GPU pod (Llama 3 report). Alibaba places pipeline traffic across its oversubscribed pods for the same reason.
  • DeepSeek-V3: no tensor parallelism at all in training; 16-way pipeline, 64-way expert parallelism over 8 servers, ZeRO-1 data parallelism; the expert traffic shaped to the network as in section 8.
Corrections to the old page
  • "Running TP across InfiniBand wastes 90%+ of your FLOPs waiting": for 70B with TP 8 over a 400 Gb/s NIC the communication is 141% of the compute, so with no overlap the GPUs wait about 59% of the time. Bad enough, not 90%.
  • "TP=2 attention+MLP all-reduces for one 8B-scale layer stack easily exceed PCIe budgets at inference batch 1": at batch 1 each all-reduce carries one token, 8 KB (4,096 values in bf16), far below PCIe's n½ of about 315 KB (with its assumed 5 µs latency). The cost is latency, not bandwidth: 64 all-reduces per token (2 per layer, 32 layers) at several microseconds each.

Move the link down the ladder: data parallelism's break-even rises with I, tensor parallelism's cost rises with no batch to absorb it

Go deeper. How the splits compose into 3-D, 4-D and 5-D layouts, and what each holds and sends, with an animated step under nine splits and a layout calculator: Distributed Training, section 9 "Composing them". The same step on 1, 8 and 64 GPUs, FSDP against HSDP: the parent's Performance calculator. Choosing a mesh on a TPU slice: Sharding and scale.

10. Checking it yourself, and depth

On a real cluster, three commands confirm everything on this page: nvidia-smi topo -m for the wiring, nccl-tests' all_reduce_perf for the collectives, NCCL_DEBUG=INFO for what NCCL chose.

How to check a real system, step by step (1 min)
  1. See the wiring. nvidia-smi topo -m prints, for every GPU pair and GPU-NIC pair, whether they meet over NVLink, a PCIe switch or the CPU. A NIC that is not under the same PCIe switch as its GPU loses GPUDirect's direct path.
  2. Measure the collectives. Build nccl-tests and run all_reduce_perf -b 8 -e 8G -f 2 -g 8 on one server, then across servers under your launcher. Compare busbw at large sizes with the link's per-direction rate (rings: 75 to 90% is normal, section 7) and look at the small-size time for latency.
  3. See what NCCL chose. NCCL_DEBUG=INFO logs the transport (NVLink, IB, sockets), the rings and trees, and whether NVLS is used (NCCL environment variables). A job that silently fell back to TCP sockets is the classic slow cluster (Networking foundations, section 14).
  4. In the training run, profile one step and compare the time inside communication kernels with the formulas here; a collective much slower than its bytes predict usually means a straggler rank or a congested link, not a slow algorithm.
Common mistakes (1 min)
  • Comparing a two-direction vendor number with a one-direction one. 900 GB/s NVLink against 64 GB/s PCIe is 14 times; per direction it is 7. Convert everything to one direction and to bytes (divide Gb/s by 8) before comparing.
  • Reading busbw above the link rate as an error. With NVLS or a hierarchical algorithm busbw is no longer a wire bandwidth. Use algbw, or the time, when comparing algorithms.
  • Assuming bigger links help small messages. Below n½ = αβ the latency dominates; a link 9 times faster gave 1.18 times on a 64 KB message. Bucket small tensors together.
  • Judging a fabric by its NIC speed alone. An all-to-all on a 1:7 oversubscribed spine runs at a seventh of the NIC rate for the traffic crossing it. Ask for the oversubscription and whether the fabric is rail-optimised.
  • Putting tensor parallelism across servers to fit a model. Its cost is independent of batch size and runs on the critical path. Use pipeline or fully sharded data parallelism across servers instead.
  • Asking for a TPU slice smaller than a cube and expecting cube speed. Below 4 × 4 × 4 there is no optical wraparound, and a missing wraparound typically doubles collective time.
Interview rehearsal (2 min)
  • How long does a ring all-reduce of S bytes over n GPUs take? 2(n−1)α + 2(n−1)/n · S/β. The bandwidth term hardly changes with n; the latency term grows linearly, which is why trees exist.
  • Why can busbw exceed the hardware's bandwidth? busbw rescales S/t by 2(n−1)/n assuming a flat point-to-point algorithm. In-switch reduction sends S instead, and hierarchical algorithms use NVLink and the NIC at once, so the rescaled number can exceed either link.
  • Why does tensor parallelism stay inside a server but data parallelism does not? TP's communication per FLOP is fixed by the model width and the TP degree and sits between dependent matmuls; data parallelism's falls with tokens per replica and overlaps with the backward pass.
  • What is a rail-optimised network and why does it help? GPU k of every server connects to leaf switch k. Collectives across servers mostly pair same-index GPUs, so they stay one hop away on their rail and never load the spine; NVLink inside the server handles the rest.
  • InfiniBand or RoCE? Both do RDMA at the same speeds. InfiniBand is lossless by design (credits) with SHARP and adaptive routing from one vendor; RoCE runs on multi-vendor Ethernet but needs PFC and congestion control tuned, or, as Meta did for Llama 3, careful load balancing. Ultra Ethernet aims to remove the lossless requirement.
  • Why do MoE models like big NVLink domains? Expert parallelism is all-to-all, which crosses the spine and is not reduced on the way. Keeping the experts inside one NVLink domain (8 GPUs, or 72 in an NVL72 rack) avoids the network; otherwise you limit fan-out and forward through NVLink, as DeepSeek did.
  • What does an optical circuit switch do in a TPU pod? MEMS mirrors connect the faces of 64-chip cubes, like a plugboard: they build each job's slice as a torus of the requested shape, route around failed cubes and allow twisted tori, for under 5% of system cost and 3% of power (TPU v4).