6.3.4 · D3Interconnects, Buses & SoC

Worked examples — NVLink and GPU interconnects

3,884 words18 min readBack to topic

This page is a drill hall. The parent note built the theory; here we hammer every kind of question NVLink arithmetic can throw at you, one worked example per case. Before each solution I ask you to Forecast the answer — guessing first is how the number sticks.

The scenario matrix

Cell Case class What makes it tricky Example
A 8b/10b payload from line rate must multiply by Ex 1
B PAM4 + 128b/130b payload 2 bits/symbol AND new encoding ratio Ex 2
C Raw vs payload (datasheet twist) headline number ≠ usable number Ex 3
D Direction bookkeeping (uni vs bidir) factor-of-2 trap Ex 4
E Aggregate over many links multiply per-link by link count Ex 5
F Saturated link (buffer ≥ BDP) efficiency = 100% Ex 6
G Degenerate: buffer too small (< BDP) stall, efficiency < 100% Ex 7
H Limiting case: zero latency / infinite buffer boundary sanity check Ex 8
I Real-world all-reduce word problem ring algorithm, many peers Ex 9
J Exam twist: NVLink vs PCIe crossover when is NVLink NOT worth it? Ex 10

Every cell below is filled. Let us begin.


Building the one tool we reuse everywhere

Almost every example uses the same conversion chain, so define it once, in plain words, before any symbol appears.

Read the figure below as a pipe that narrows at each stage. Start at the wide mouth on the left — the raw GT/s of symbols. The pipe keeps its width through the "×1 bit/symbol" stage (on/off signaling adds nothing). At the orange "×8/10" stage the pipe narrows: one fifth of the width is lost to encoding overhead, dropping us to 128 Gb/s. Finally the green "÷8" stage narrows it again to convert bits into bytes, ending at the 16 GB/s spout. The visual point: each stage can only shrink the flow, never grow it — so your final payload is always the smallest number in the chain, and forgetting a stage means over-reporting.

Figure — NVLink and GPU interconnects

Cell A — 8b/10b payload

  1. Bits per lane per second . Why this step? Turns raw symbols into real payload bits by paying the encoding tax first.
  2. All 8 lanes . Why this step? Lanes run in parallel, so their payloads simply add.
  3. Gigabits → gigabytes: . Why this step? A byte is 8 bits; datasheets speak GB/s.

Verify: Plug into master formula: . ✓ Units: . ✓ Matches parent table row NVLink 1.0.


Cell B — PAM4 + 128b/130b

Before the example, here are the raw parent-note figures reproduced so you need not context-switch:

  1. Bits/lane/s . Why this step? Two things changed at once — bits/symbol AND the encoding ratio — so both enter here.
  2. 9 lanes: . Why this step? Parallel lanes add; note the odd lane count (9, not 8).
  3. Gigabits → gigabytes: . Why this step? Exactly as in Ex 1 — a byte is 8 bits, so we divide the bit-rate by 8 to report bytes. The result is in GB/s, not Gb/s.
  4. Reconcile with the parent's 46.5: the parent's datasheet-consistent figure is GB/s/dir. The pure master-formula number is 58.8 GB/s; real silicon includes extra framing/protocol overhead the marketing payload folds in. For this drill we report the formula value 58.8 GB/s and flag that datasheet-consistent NVLink 4.0 is quoted near 46.5.

Verify: GB/s (formula). ✓ The and bits/symbol are the only structural differences from Ex 1. The gap to 46.5 is protocol overhead beyond encoding — see the mistake box.


Cell C — raw line rate vs payload (the datasheet twist)

  1. Decode the 25: per lane of raw symbols. Over 8 lanes: raw. Why this step? Shows "25" is symbols-as-bytes, before the encoding haircut.
  2. Apply 8b/10b: payload. Why this step? Only of transmitted bits are your data.

Verify: GB/s. ✓ The 25 is the pre-encoding line rate; the 20 is what your data actually moves at. Always convert before timing calculations.


Cell D — direction bookkeeping

  1. Full duplex means simultaneous: send-lanes and receive-lanes are physically separate, so directions do not share bandwidth. Why this step? This is why you may add them; on a half-duplex bus you could not.
  2. Add: bidirectional.

Verify: GB/s. ✓ Matches parent table "Bidir/link = 40 GB/s" for NVLink 2.0. Trap: never use 40 GB/s to time a one-way transfer — a single flow only ever sees 20.


  1. Per-link bidir = 40 GB/s (from Ex 4).
  2. Six links = aggregate. Why this step? Links are independent physical ports; their bandwidths add.

Verify: GB/s. ✓ Parent says 240 GB/s aggregate, and over PCIe Gen3 x16. ✓ Caution: aggregate ≠ what any single peer sees; one peer is capped at 40 (or 20 one-way).


First define the two tools that govern saturation: the BDP and the efficiency law we will lean on in Cells F, G and H.

  1. Compute BDP (decimal KB). Why this step? BDP is the minimum buffer for zero stalls — the yardstick.
  2. Apply the efficiency law: . Why this step? Buffer ≥ BDP means the ratio ≥ 1, so the cap fires and there is no stall.
  3. Cross-check with a timeline: buffer drains in ; the first ack returns at , replenishing credits before exhaustion. Why this step? Confirms the efficiency-law verdict against the actual clock.

Verify: ack at 500 ns arrives before buffer empties at 800 ns → no stall. Efficiency . ✓

Read the figure below as the sender's fill-and-refill timeline. The blue curve is the amount of data "in flight" as time advances (rising because the sender is pouring at 20 GB/s). The gray dashed line at 10 KB marks the BDP; the orange dashed line at 16 KB marks the buffer ceiling. The green dotted vertical at 500 ns is when the first acknowledgement returns. The key thing to see: the green line arrives to the left of the point where the blue curve would hit the 16 KB ceiling (at 800 ns), so credits are refreshed before the buffer ever empties — the blue curve never flattens, meaning the link never idles. That geometric "ack-before-ceiling" is exactly the condition buffer ≥ BDP.

Figure — NVLink and GPU interconnects

Cell G — degenerate: buffer too small (stall)

  1. Time to send 6 KB . Why this step? When credits hit zero, this is how long useful work lasted.
  2. Ack arrives at 500 ns; sender idle from 300 → 500 ns. Why this step? The gap is the forced stall.
  3. Stall .
  4. Efficiency , matching . Why this step? Below BDP the cap does not fire, so efficiency is just the raw ratio buffer/BDP.

Verify: and agree. ✓ Effective throughput GB/s. ✓ Rule confirmed: below BDP, efficiency . ✓


Cell H — limiting cases (boundary sanity)

  1. (a) . Then for any . Why this step? Tests the law at the low boundary — no in-flight data means the buffer requirement collapses to zero.
  2. (b) As , , so . Why this step? Shows the cap keeps efficiency at exactly 100%, never above it — a sanity guard.

Verify: in both limits. ✓ Both degenerate ends give 100%, matching intuition: only a finite latency paired with a too-small buffer (Cell G) can stall.


Cell I — real-world all-reduce word problem

Before the numbers, fix the algorithm carefully — the common trap is assuming each hop moves the whole gradient.

  1. Steps (reduce-scatter + all-gather). Why this step? The ring completes a reduction in two -step passes, not one; both must be counted.
  2. Chunk per step . Why this step? This is the whole correction — a hop carries one chunk, not the full gradient.
  3. Per-step time . Why this step? All links move their chunk in parallel, so one step costs a single chunk-transfer time.
  4. Total NVLink . Why this step? Steps run one after another; multiply.
  5. PCIe (5 GB/s effective): per step ; total . Why this step? Same algorithm and data volume, slower link.

Verify: NVLink ms. ✓ PCIe ms. ✓ Speedup . Note this corrects a naive model (full 1.5 GB per hop) which would have over-estimated NVLink time by a factor of several ×; the parent's ~10× headline uses a more pessimistic PCIe figure and the "full-gradient" simplification, so its arithmetic and ours differ — the method here is the correct one. Units: GB ÷ (GB/s) = s throughout. ✓


  1. Model each path as fixed cost + transfer time: NVLink time ; PCIe time . Why this step? NVLink's advantage is speed but it pays a setup tax; PCIe's fixed cost is ~0 here.
  2. Set equal: . Why this step? The crossover is exactly where the two times match.
  3. Solve: , so .
  4. Plug : (decimal KB). Why this step? Below 333 KB the setup overhead makes NVLink slower than plain PCIe.

Verify: At GB: NVLink ; PCIe . Equal ✓.

Read the figure below as two cost lines crossing. The blue line (NVLink) starts above zero at — that raised intercept is the fixed 50 µs setup tax — then climbs gently (shallow slope ). The orange line (PCIe) starts at the origin but climbs steeply (slope , four times steeper). They meet at the red dot: KB, µs. To the left of the dot the orange line is lower — PCIe wins for small messages. To the right the blue line is lower — NVLink wins for large messages. The lesson lives in that intersection: NVLink shines for large transfers (gradients, activations); for chatty tiny messages the setup tax can flip the winner.

Figure — NVLink and GPU interconnects

Closing the drill hall — lessons from the ten cells

Recall Self-test: name the cell, then answer

NVLink 1.0 8-lane 20 GT/s 8b/10b unidirectional payload? ::: 16 GB/s (Cell A) NVLink 4.0 raw master-formula payload/dir (9 lanes, 26.56 GT/s, PAM4, 128b/130b)? ::: 58.8 GB/s formula (46.5 datasheet) (Cell B) A datasheet "25 GB/s/dir" for NVLink 2.0 corresponds to what payload? ::: 20 GB/s after 8b/10b (Cell C) One V100's aggregate NVLink 2.0 bandwidth (6 links)? ::: 240 GB/s bidirectional (Cell E) BDP for 20 GB/s at 500 ns latency? ::: 10 KB decimal (Cell F) Efficiency with a 6 KB buffer when BDP is 10 KB? ::: 60% via min(1, 6/10) (Cell G) Ring all-reduce time, 8 GPUs, 1.5 GB, 20 GB/s (chunks, both phases)? ::: 131.25 ms (Cell I) Crossover payload where NVLink overhead 50 µs equals PCIe (5 vs 20 GB/s)? ::: 333 KB (Cell J)