advanced33 min studyLesson 596 in Engineering

A barrier follows the slowest required participant, not the average rank

Analyze maximum completion times, rank waiting, and the assumptions needed to extrapolate straggler probabilities as a job scales.

On this page

What you’ll understand

  • Compute barrier completion and aggregate waiting from per-rank arrival times.
  • Derive a maximum's distribution under explicit independence assumptions.
  • Distinguish repeated slow-rank evidence from common-mode or shifting delays.

Synchronous training often requires every participant to reach a particular dependency before the next phase can proceed. The average rank duration can remain almost unchanged while the slowest required arrival repeatedly delays the job. Adding ranks also adds opportunities for a rare delay, but the amount depends on dependence between their timings. A useful straggler analysis combines per-step rank arrivals, tail distributions, and actual synchronization semantics. Averages alone cannot explain the waiting pattern or identify its cause.

Measure arrival at the same required boundary

For a simple barrier, take each participant's arrival time relative to a common step origin and define release by the latest required arrival. A participant that finishes early waits for that maximum. Aggregate waiting can be expressed in rank-time units, which is different from elapsed job time. This model excludes barrier implementation overhead unless it is added explicitly. A collective has a richer execution pattern than an instantaneous barrier, but matching readiness and completion boundaries still prevents confusing an early rank's wait with its own productive computation.

Use aligned rank and step identities, and include the actual required participant set. Pipeline stages, uneven expert routing, and different local work can make ranks legitimately heterogeneous. A rank appearing slow at a later synchronization may have inherited an earlier delay, so trace backward to its first unusual readiness or service interval. Compare multiple steps to see whether the same rank is persistently slow or the maximum moves around. Both patterns can hurt throughput, but they suggest different hypotheses about placement, work imbalance, and shared disturbances.

Tbarrier=max⁡rTr,Wr=Tbarrier−Tr,∑rWr=Dmax⁡rTr−∑rTrT_{\rm barrier}=\max_r T_r,\qquad W_r=T_{\rm barrier}-T_r,\qquad \sum_rW_r=D\max_rT_r-\sum_rT_r
Arrival times T_r share one calibrated origin and time unit for D required ranks. W_r excludes separately modeled barrier-release overhead. The sum of waits has rank-time units; it is not an additional interval to add to wall time or a proof that each rank consumed energy at a fixed rate.↔ Scroll wide equations horizontally.

Tail amplification requires a dependence model

If rank durations are independent, the probability that all finish before a threshold is the product of their individual completion probabilities. Identically distributed independent ranks reduce this to a common CDF raised to device count. A small per-rank slow probability can then become a noticeable probability that at least one rank is slow. This is a model of repeated comparable steps with stated distributions; it is not a license to extrapolate a measured single-device tail unchanged into a different distributed workload.

Common storage stalls, synchronized checkpoints, thermal or power constraints, and shared network congestion can correlate timings. Under perfectly correlated rank durations, adding ranks does not multiply independent chances of a slow event. Other dependence structures can change both frequency and severity. Temporal correlation across steps also affects uncertainty in estimated tail rates. Keep joint per-step measurements when possible instead of reconstructing a maximum distribution only from separately recorded rank histograms. Marginal distributions alone generally do not determine the distribution of their maximum.

Pr⁡(max⁡rTr≤t)=∏r=1DFr(t),Pr⁡(max⁡rTr≤t)=F(t)D if also identically distributed\Pr(\max_rT_r\le t)=\prod_{r=1}^{D}F_r(t),\qquad \Pr(\max_rT_r\le t)=F(t)^D\ \text{if also identically distributed}
The product requires independence of rank durations at the relevant boundary. Each F_r is a CDF of time and probabilities are dimensionless. The power form additionally requires identical distributions. Neither formula applies automatically to correlated ranks or guarantees independence across successive steps.↔ Scroll wide equations horizontally.

Test where the first extra delay appears

Compare per-rank input readiness, kernel execution, collective readiness, and completion to locate the earliest divergence. A slow collective on every rank may reflect one late entrant rather than uniformly poor links. A repeated long compute kernel on one rank may reflect different work or an execution-resource difference. Separate these hypotheses with fixed-shape replays, placement changes, and repeated measurements. Report tail quantiles with sample count and dependence assumptions; a maximum from one short trace is not a reliable estimate of a rare-event distribution.

The probability lab can illustrate an explicitly independent slow-event count. Reset, set both p=0.1 and n=4, predict probability of no slow participants 0.9⁴=0.6561 and at least one 0.3439, then Play or Step. Reset and set both p=0.1 and n=8 to predict at least one 0.56953279. Its bars are exact binomial masses and playback only highlights outcomes; it neither samples rank timings nor models correlated training participants. n is limited to thirty. Use this chosen independent model to understand the product rule, then check real dependence separately.

Rare independent delays increase the expected barrier time

Eight required ranks each take 10 ms with probability 0.98 and 30 ms with probability 0.02 on a comparable step. First assume independent rank durations and negligible barrier overhead, then compare perfect common-mode correlation with the same marginals.

  1. For one rank, mean duration is 0.98×10+0.02×30=10.4 ms. Under independence, all eight are fast with probability 0.98⁸≈0.8507630226.

  2. The barrier takes 30 ms whenever any rank is slow, a probability about 0.1492369774. Its mean is 10+20×(1−0.98⁸)≈12.98473955 ms, larger than the individual-rank mean.

  3. Under perfect common-mode correlation, all ranks are slow together with probability 0.02. The maximum then has mean 10.4 ms, showing that the marginal rank distributions alone did not determine the independent-case barrier expectation.

The result

The example isolates tail amplification under independence. Actual training ranks require joint timing evidence, calibrated boundaries, and a model for their dependence.

Explore the model

Interactive lab

Interactive lab · probability

An independent slow-event count is a declared model

Reset, set both p=0.1 and n=4, predict P(K=0)=0.6561 and P(K≥1)=0.3439, then Play or Step. Reset and re-enter both p=0.1 and n=8 to predict P(K≥1)=0.56953279. Exact binomial bars assume independent equal-probability trials; playback highlights outcomes rather than drawing samples. The trial slider caps n at 30 and contains no rank durations, barrier, or common-mode delays.

An independent slow-event count is a declared modelThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. 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 forCheck rank dependence before using an independent product rule to extrapolate straggler risk.

Check your understanding

Every rank has a 2% slow-event marginal probability. What additional information is needed before using 1−0.98ᴰ for the chance that any of D ranks is slow?

Try it yourself

Four independent ranks take 5 ms normally and 15 ms with probability 0.1. Find the chance of any slow rank and expected barrier duration under negligible release overhead. Compare the mean of one rank.

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

Give me a hint

The all-fast probability is 0.9⁴; the maximum takes only the two possible durations in this model.

Compare with the solution

Any-slow probability is 1−0.9⁴=0.3439. Expected barrier time is 5+10×0.3439=8.439 ms. A single-rank mean is 0.9×5+0.1×15=6 ms. The comparison depends on independence, equal marginals, the common boundary, and the specified two-point durations.

Take it with you

  • Synchronization depends on required maximum arrival, with waiting measured separately from wall time.
  • Independent-tail formulas need independence; correlated marginals do not determine the same maximum law.
  • Find the first unusual readiness or service interval before attributing a straggler's cause.

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.