Before you start: words you need#
| Word | Plain meaning |
|---|---|
| NVLink | NVIDIA’s direct GPU-to-GPU link, far faster than PCIe. Each generation roughly doubles it. |
| NVSwitch | A switch chip for NVLink, so every GPU in a server or rack reaches every other at full speed. |
| Scale-up / scale-out | Scale-up joins GPUs with NVLink into one fast domain; scale-out joins those domains with NICs and network switches (9.d). |
| NIC | Network interface card. In AI servers, usually one 400–800 Gb/s NIC per GPU. |
| RDMA | Remote direct memory access: a NIC writes straight into another machine’s memory without either CPU copying the data. |
| InfiniBand (IB) | A network built for RDMA from the start, common in GPU clusters. Generations: HDR 200 Gb/s, NDR 400 Gb/s, XDR 800 Gb/s. |
| RoCE | RDMA over Converged Ethernet: the same RDMA model carried on Ethernet. |
| GPUDirect RDMA | The NIC reads and writes GPU memory directly, so network data never touches host memory. |
1. What is it?#
The physical links between GPUs, inside a node and between nodes. These numbers decide which parallelism strategies are viable.
| Link | Bandwidth per GPU, each way | Typical latency | Scope |
|---|---|---|---|
| HBM (for comparison) | 3.35–22 TB/s | ~0.5 µs | inside the GPU |
| NVLink 6 (Rubin) | 1.8 TB/s | ~1–2 µs | NVL72 rack |
| NVLink 5 (Blackwell) | 900 GB/s | ~1–2 µs | 8-GPU node or NVL72 rack |
| NVLink 4 (Hopper) | 450 GB/s | ~1–2 µs | 8-GPU node |
| PCIe 5 x16 | ~50 GB/s achieved | ~5–10 µs | inside a node |
| InfiniBand XDR / 800G Ethernet RDMA | ~100 GB/s | ~2–5 µs plus switch hops | across nodes |
| InfiniBand NDR / 400G Ethernet RDMA | ~50 GB/s | ~2–5 µs plus switch hops | across nodes |
| 100 GbE TCP, no RDMA | ~10 GB/s | ~20–100 µs | across nodes |
NVIDIA quotes NVLink as the total of both directions (1.8 TB/s for Blackwell, 3.6 TB/s for Rubin, 7.d, 7.e); this table uses one direction, which is what a transfer sees.
Ratio, Blackwell node: NVLink : 800G NIC : PCIe 5 ≈ 18 : 2 : 1. Tight cooperation belongs on NVLink.
Facts checked on 12 November 2026.
2. Why does it matter?#
Because each parallelism strategy has a communication volume, and volume ÷ bandwidth is time. That time either fits the budget or it does not.
Llama-3-70B decode, BF16, batch 32, tensor parallelism (TP) over 8 GPUs. 14.c derives the traffic: 143 MB per GPU per decode step. Compute and weight reads take about 5.3 ms per step on H100s.
bandwidth term only (9.g adds latency):
NVLink 5 143 MB / 900 GB/s = 0.16 ms → 3% of the step ✓
NVLink 4 143 MB / 450 GB/s = 0.32 ms → 6% ✓
XDR / 800G 143 MB / 100 GB/s = 1.4 ms → 27% ✗
PCIe 5 143 MB / 50 GB/s = 2.9 ms → 54% ✗
NDR / 400G 143 MB / 50 GB/s = 2.9 ms → 54% ✗One row of the table decides whether TP=8 is a good idea. This is why “check the topology” appears in every lesson of this module.
3. Simple analogy#
Roads between workshops.
- HBM: the workbench. Instant.
- NVLink: a wide corridor between adjacent rooms. Fast enough to work on one piece together.
- PCIe: a normal doorway with a queue.
- InfiniBand or RoCE: a fast road between buildings. Fine for delivering finished parts; too slow for passing a tool back and forth 160 times a minute.
- Ethernet without RDMA: the same road, but every delivery is unloaded into a warehouse and reloaded on each side (the host-memory bounce).
The rule: cooperate tightly over NVLink; hand off finished work over the network. That is TP inside a node or rack; pipeline or data parallelism across them.
4. Tiny example: reading the topology#
nvidia-smi topo -m on an 8-GPU NVSwitch server (HGX H100):
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7
GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 ← every pair: 18 NVLinks via NVSwitch
GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18
...And on a 4-GPU workstation with NVLink bridges between pairs only:
GPU0 GPU1 GPU2 GPU3
GPU0 X NV4 SYS SYS ← only GPU0–GPU1 share NVLink
GPU1 NV4 X SYS SYS GPU0–GPU2 goes across the CPU sockets
GPU2 SYS SYS X NV4
GPU3 SYS SYS NV4 XIn the second case TP=4 is a bad idea: half the traffic crosses the CPUs. TP=2 inside each NVLink pair, plus two data-parallel replicas, is much better. The full legend for the codes is in 9.b.
5. Technical explanation#
NVLink and NVSwitch#
NVLink is a point-to-point link. With a few GPUs, links go directly between pairs; to connect every GPU to every other at full speed you need NVSwitch chips:
- HGX servers: 8 GPUs and NVSwitch chips on one board. Any TP grouping inside the 8 works equally well.
- NVL72 racks: 72 GPUs across 18 compute trays, joined by 9 NVLink switch trays over a copper spine
(7.d). Software sees one 72-GPU NVLink domain, called multi-node NVLink because the GPUs are in
different trays (NCCL’s
NCCL_MNNVL_ENABLEcontrols it). - NVLink SHARP (NVLS): the NVSwitch chips can do part of an all-reduce themselves, so less data crosses each link (9.f).
NVLink stops at the rack because copper reaches about a metre; Rubin Ultra’s Kyber racks (2027) are NVIDIA’s next step to larger domains (7.e).
Across nodes: RDMA and GPUDirect#
WITHOUT RDMA (plain TCP/IP):
GPU memory → host memory (PCIe copy)
→ kernel network stack (CPU)
→ NIC → network → NIC
→ kernel network stack (CPU)
→ host memory
→ GPU memory (PCIe copy)
Two extra copies, CPU work on both ends.
Effective bandwidth often well under half the link rate; latency tens of µs.
WITH RDMA + GPUDirect RDMA (InfiniBand or RoCE):
GPU memory → NIC (the NIC reads GPU memory directly over PCIe)
→ network → NIC → GPU memory
No host memory, no CPU on the data path.
Effective bandwidth 85–95% of the link rate; latency a few µs.How RDMA works, in words: each side registers a region of memory with its NIC, which pins it and gives it a key. The two sides set up a queue pair (a send queue and a receive queue). After that, a process posts “write these bytes to that key at that offset” and the NICs do the rest. With GPUDirect RDMA the registered memory is GPU memory.
GPUDirect RDMA is not optional for multi-node inference. To use it, the driver must let the NIC
reach GPU memory, through either the nvidia_peermem kernel module or, on recent kernels with
NVIDIA’s open GPU kernel modules, the Linux DMA-BUF mechanism that NCCL uses by default where
available. Check that NCCL is actually using it:
NCCL_DEBUG=INFO your_job 2>&1 | grep -E "NET/IB|GDRDMA|DMABUF"
# Want: ... via NET/IB/0/GDRDMA
# Bad: ... via NET/IB/0 (data bounces through host memory)
# Worse: ... via NET/Socket (plain TCP)InfiniBand, RoCE and plain Ethernet#
| InfiniBand | RoCE v2 on Ethernet | Plain Ethernet (TCP) | |
|---|---|---|---|
| RDMA | native | yes | no |
| Speeds in 2026 | NDR 400 Gb/s, XDR 800 Gb/s (NVIDIA Quantum-X800, ConnectX-8) | 400 and 800 Gb/s (ConnectX-8, Spectrum-X, other vendors), 1.6 Tb/s NICs arriving with ConnectX-9 | anything |
| Losses | lossless by design (credit-based flow control) | classic RoCE needs a lossless setup (PFC and ECN); newer fabrics use adaptive routing and smarter congestion control instead | TCP retransmits |
| Who runs it | most dedicated GPU training clusters | most hyperscaler GPU fleets; growing share everywhere | front-end networks |
| Use for | everything | everything, once tuned | data parallelism and request traffic only |
A misconfigured RoCE network performs worse than TCP and is hard to debug: packet drops trigger expensive retransmission of whole message windows. Lesson 9.d covers the fabrics (Spectrum-X, Ultra Ethernet) built to fix that.
If your cluster has plain Ethernet between nodes, do not attempt cross-node TP or expert parallelism. Use data parallelism across nodes and keep tight coupling inside them.
The design rules that follow#
- Tensor parallelism only inside one NVLink domain (14.c).
- Expert parallelism inside one NVLink domain when you can; across nodes only with RDMA and kernels built for it (14.e, 14.h).
- Pipeline parallelism across nodes: it sends little, and tolerates latency (14.d).
- Data parallelism anywhere: replicas do not talk during serving (14.b).
- Verify GPUDirect RDMA for any cross-node collective or KV transfer (9.e).
6. Under the hood: measuring your links#
# GPU-to-GPU bandwidth and latency inside a node (cuda-samples)
./p2pBandwidthLatencyTest
# Collectives (nccl-tests, 9.f)
./build/all_reduce_perf -b 8 -e 1G -f 2 -g 8
# Cross-node RDMA bandwidth and latency (perftest package)
ib_write_bw -d mlx5_0 -a # on the server node
ib_write_bw -d mlx5_0 -a <server> # on the client node
ib_write_lat -d mlx5_0 <server>
# RDMA device and link state
ibstat # port state, rate (e.g. 400 for NDR, 800 for XDR)
ibv_devinfoIllustrative results on an HGX H100 node with NDR InfiniBand (record your own; these are the constants for every estimate you make):
P2P bandwidth (NVLink 4): ~370 GB/s one way per pair
P2P latency: ~2 µs
Host-to-device, pinned: ~50 GB/s (PCIe 5)
IB write bandwidth (NDR): ~48 GB/s
IB write latency: ~2 µs7. Performance implications#
- Bandwidth falls about 9–18x at the edge of the NVLink domain. Anything that talks every layer must stay inside it.
- Latency matters more than bandwidth for decode. Decode messages are small (hundreds of KB), so the fixed cost per message dominates (9.f, 9.g).
- NICs are shared. On servers with fewer NICs than GPUs, or with several jobs on one node, each GPU gets a fraction of the rated bandwidth.
- One slow link slows everyone. Collectives run at the speed of the slowest participant.
8. Production implications#
- Verify the topology on every new instance type. Cloud SKUs with the same GPU can have very different interconnects and NIC counts.
- Test GPUDirect RDMA explicitly after any driver, kernel or container change. It regresses silently.
- Expose RDMA devices to containers. Pods need the RDMA device plugin,
IPC_LOCKand the right device files; without them traffic quietly falls back to TCP (21.c). - Write topology assumptions down. “This configuration needs 8 GPUs on NVSwitch and RDMA” belongs in the deployment config.
- Budget for the network. RDMA fabrics are a real share of cluster cost (7.l); plain Ethernet constrains the architecture you can run.
9. Common mistakes#
- Assuming all GPUs in a node are NVLink-connected. Many workstation and PCIe servers are not.
- TP across a
SYSlink or across nodes. The communication can exceed the compute. - Multi-node without GPUDirect RDMA. Roughly half the bandwidth and many times the latency.
- Misconfigured RoCE. Without a lossless or properly congestion-controlled setup it can be worse than TCP.
- Mixing up Gb/s and GB/s. An 800 Gb/s NIC is 100 GB/s.
- Comparing NVIDIA’s bidirectional NVLink figure with a one-way NIC figure. Halve the NVLink number first.
10. Hands-on exercise#
- Map your hardware. Run
nvidia-smi topo -m,p2pBandwidthLatencyTestandall_reduce_perf. Draw the topology and write the measured bandwidths on it. Keep it: it is the reference for every distributed decision on this hardware. - Quantify NVLink. Run TP=2 on an NVLink pair and again with
NCCL_P2P_DISABLE=1(which forces traffic off NVLink). Measure inter-token latency and throughput for both. - Verify GPUDirect. Run a two-node NCCL job with
NCCL_DEBUG=INFO. ConfirmGDRDMAin the log. - Recompute section 2 for Rubin (1.8 TB/s NVLink) and for a 1.6 Tb/s NIC. Does cross-node TP become reasonable?
11. Interview questions#
- Rank the interconnects by bandwidth and give approximate numbers, one direction.
- Why can’t you do tensor parallelism across nodes?
- What is NVSwitch, and why does its presence change your TP strategy?
- What is GPUDirect RDMA, what does it save, and how do you check it is working?
- What does
SYSmean innvidia-smi topo -m? - What makes RoCE harder to run than InfiniBand?
- Given plain Ethernet between nodes, how would you deploy a 70B model?
12. Further reading#
Checked on 12 November 2026.