BandwidthMeasurement
BandwidthMeasurement watches a Job’s NCCL log output and computes per-message-size bus bandwidth metrics for collective operations. It is automatically created by the Job controller when spec.bandwidthMeasurement is configured, or can be created manually.
Spec fields
Status fields
Each BandwidthResult entry contains:
How it works
- While the Job runs, samples the launcher’s log at
sampleIntervaland keeps a running average per message size. These results are provisional: they show progress and feed the Prometheus gauges, but no threshold is evaluated against them.nvcrectlreports display whatever results the measurement holds. - Applies the
bandwidthResultregex pattern from the referencedLogProfileto extractsize,algBW, andbusBWcapture groups. - When the LogProfile defines
networkTransport, records the distinct set of capturedtransportnames onstatus.transport. Record-only; never used for pass/fail. - When the Job succeeds, reads the launcher’s log once more from its first line to its last, counts every result row exactly once, and replaces the provisional results with the per-size averages. The result depends only on the log, not on when samples were taken.
- Sets
Complete. The reason says whether the results are final:
A threshold on busBandwidthGBps or algBandwidthGBps is evaluated only against final results. Any other outcome leaves the value unmeasured, and the Job fails validation once its measurementTimeout expires. In diagnose mode, the group is treated as failed.
If the final read fails, for example because the launcher pod’s log is briefly unreachable, Measuring is set to False with reason FinalReadPending and the read is retried for as long as the Job waits for measurement data: its measurementTimeout (5m by default), and never less than two minutes. After that the measurement completes as LogsUnavailable. A log that can never be read in full, for example one with a line longer than 1 MiB, completes as LogsUnavailable at once.
Set measurementTimeout as a Go duration such as 10m: options.measurementTimeout on a Certification category (or at the top of the Certification spec for every category), spec.validation.performance.measurementTimeout on a Workflow, or spec.measurementTimeout on a Job.
The final read covers the container’s current log file. If the kubelet rotated the file while the Job ran, which happens only when the container logs more than the node’s containerLogMaxSize (10Mi by default), rows in the rotated file are not part of the final results.