advanced25 min studyLesson 490 in Engineering

Collective microbenchmark interpretation

Read operation timing, algorithm bandwidth, normalized bus bandwidth, payload conventions, and correctness checks before attributing a result to hardware.

On this page

What you’ll understand

  • Calculate AllReduce algorithm and normalized bus bandwidth using the documented nccl-tests convention.
  • Distinguish normalized bandwidth from direct physical-port traffic counters.
  • Design a reproducible benchmark and compare it with actual training dependencies.

A collective benchmark can isolate communication behavior more cleanly than an entire training job. Its columns still require interpretation. A normalized bandwidth value is derived from payload, rank count, and elapsed time; it is not a direct observation of every physical link. A credible result records the operation contract, selected environment, measurement boundary, correctness outcome, and the limitations of extrapolating to a real workload.

Begin with payload and completed-operation time

The nccl-tests performance documentation defines algorithm bandwidth as logical operation size divided by measured time. For the AllReduce examples here, size is the complete input tensor bytes per rank. Preserve the benchmark's exact definition for other collectives, whose count arguments and full output sizes differ. Distinguish decimal GB/s from binary GiB/s, and do not multiply an input element count by a datatype width twice. Record whether in-place or out-of-place execution, datatype, reduction operation, and validation mode match the intended workload.

Time a completed operation at a defined boundary rather than only the host enqueue. Warmup can avoid conflating communicator setup, allocation, or initial transport behavior with steady operation, but cold-start cost may itself matter and should then be reported separately. Iteration averages can hide tails and rank asymmetry, so preserve the tool's rank aggregation mode and useful variation. GPU event clocks have device and recording semantics; do not subtract unrelated device timestamps as though they shared one calibrated wall clock.

Balg=ntB_{\rm alg}=\frac{n}{t}
For the AllReduce convention used here, n is full logical input bytes per rank and t completed-operation seconds. B_alg is bytes/s; divide by 10^9 for decimal GB/s. This is a payload/time ratio, not a count of every physical transfer.↔ Scroll wide equations horizontally.

Bus bandwidth applies an operation-specific normalization

For AllReduce, nccl-tests multiplies algorithm bandwidth by 2(p−1)/p to form its bus-bandwidth column. That factor reflects a conventional per-rank transfer normalization and enables a more useful comparison across rank counts under the model discussed in its documentation. It does not prove that the implementation selected a ring. Other operations use their own factors and size conventions. A single formula should not be copied to ReduceScatter or AllGather without checking whether size refers to the full array or one local contribution.

Normalized bus bandwidth is not a direct physical-port counter, a per-link utilization percentage, or total fabric-hop throughput. Multiple links, channels, rails, asymmetric paths, and hardware collective assistance can change how the logical normalized work relates to actual traffic. An apparently surprising ratio should trigger checks of units, topology, operation definition, algorithm, and timing before a product claim. Compare a measured physical bottleneck only when its counted direction, aggregate scope, and transfer assumptions match the normalization.

Bbus=Balg 2p−1pB_{\rm bus}=B_{\rm alg}\,2\frac{p-1}{p}
This is the documented nccl-tests AllReduce normalization for p≥2 ranks, using the same bytes/s units as B_alg. It is a derived operation-normalized rate, not a measurement of every physical port or proof of a particular algorithm's actual traffic.↔ Scroll wide equations horizontally.

Validate both the benchmark and its relevance

Record accelerator placement, NIC or rail mapping, node count, library/runtime/driver versions, selected configuration, message-size range, warmup and measured iterations, and correctness results. Sweep payloads corresponding to real training buckets instead of publishing only the best large-array point. Compare a one-node baseline with cross-node and contended runs where the application needs those conditions. A benchmark with incorrect output, a hidden fallback path, or a different datatype cannot support the desired training-performance claim even if its bandwidth column looks impressive.

The queue lab provides an intentionally separate measurement-boundary exercise. Reset, set both λ=2 and μ=3, predict drainage of its initial four work units at t=4, then Play or Step. Separately Reset, set both λ=4 and μ=3, predict growth at one unit/s from four, then Play or Step. The fluid model has no bytes, accelerator links, or collective timing and cannot generate nccl-tests bandwidth. Use the explicit units and initial condition as a reminder to define what a real numerator, denominator, and boundary count before interpreting their ratio.

Normalize an eight-rank AllReduce measurement

A hypothetical eight-rank AllReduce processes a 256 MiB complete input per rank in twenty milliseconds. Use decimal GB/s for the nccl-tests-style algorithm and bus bandwidth calculations.

  1. Convert 256 MiB to 268,435,456 bytes and twenty milliseconds to 0.02 s. Algorithm bandwidth is 268,435,456/0.02=13,421,772,800 bytes/s, or 13.4218 GB/s.

  2. The eight-rank AllReduce factor is 2×7/8=1.75. Normalized bus bandwidth is 13.4217728×1.75=23.4881024 GB/s.

  3. The normalized value is not proof that each NIC or GPU link moved 23.4881 GB/s. Relating it to a specific physical path requires actual topology, traffic scope, algorithm, and counter evidence; it also does not include the readiness and overlap behavior of a complete training step.

The result

The two columns are consistent derived ratios under one explicit convention. Their interpretation still depends on completed timing, correctness, units, and physical scope.

Explore the model

Interactive lab

Interactive lab · queue

A ratio is meaningful only with defined units and scope

Reset, set both λ=2 and μ=3, predict drainage of the initial four units at t=4, then Play or Step. Separately Reset, set both λ=4 and μ=3, predict growth from four at one unit/s, then Play or Step. This fluid model has no bytes, NCCL measurements, or fabric counters and cannot compute collective bandwidth.

A ratio is meaningful only with defined units and scopeFluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Current readings: Fluid backlog: 4; Net rate · λ − μ: −1 /s; M/M/1 mean residence: 1 s. All parameters are adjustable with the labeled controls below.02.557.51001.534.56Elapsed time · sFluid backlogλ < μ
Fluid backlogCurrent time
Fluid backlog
4
Net rate · λ − μ
−1 /s
M/M/1 mean residence
1 s
t = 0 s

Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forKeep the numerator, denominator, operation contract, and resource boundary explicit before interpreting a benchmark rate.

Check your understanding

An nccl-tests AllReduce result has bus bandwidth larger than algorithm bandwidth. What directly explains the reported difference?

Try it yourself

A four-rank AllReduce processes 64 MiB per rank in ten milliseconds. Compute algorithm and normalized bus bandwidth in decimal GB/s, and state one limitation of interpreting the result.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

64 MiB is 67,108,864 bytes and the four-rank factor is 1.5.

Compare with the solution

Algorithm bandwidth is 67,108,864/0.01/10^9=6.7108864 GB/s. Normalized bus bandwidth is 6.7108864×1.5=10.0663296 GB/s. These derived rates do not directly report every port's utilization, prove a selected algorithm, or predict a full training step with rank skew, overlap, and other workload traffic.

Take it with you

  • Use completed-operation timing and the correct payload convention.
  • AllReduce bus bandwidth is an operation-specific derived normalization.
  • Record correctness, versions, topology, and workload relevance before making a hardware claim.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.