Definition · StragglerIn a job that must wait for every partition, the straggler is the partition that finishes last. The job's completion time is that partition's completion time, so the job's running time is max(T₁, …, T_N) where Tᵢ is partition i's time. The straggler tax is the ratio of the job's mean time to one partition's mean time.
The distribution of the maximum follows from one observation, and the observation is about the complement. The maximum is at most t exactly when every one of the N partitions is at most t; there is no other way for the largest of them to be small. Under independence that probability is the product, and since the partitions are drawing from the same distribution it is a power.
P(max ≤ t) = P(T ≤ t)ᴺ independent, identically distributed
the lab's partition-time distribution, in ms
20 with weight 900 40 with 70 120 with 25 400 with 5
one partition
mean = 0.900(20) + 0.070(40) + 0.025(120) + 0.005(400) = 25.80 ms
p99 = 120 ms since P(T ≤ 40) = 0.970 and P(T ≤ 120) = 0.995
the job over N = 24
mean = 111.63 ms p99 = 400 ms
tax = 111.63/25.80 = 4.33×
P(at least one past 120 ms) = 1 − 0.995²⁴ = 11.33%
Every figure above is exact. The distribution of the maximum over a finite set of outcomes is a finite object, so the lab enumerates it rather than simulating it — the 111.63 ms is a sum over outcomes, not an average over runs, and it will be the same number every time you open the page.
What another partition actually buys
Two things happen when a job is spread over more partitions and they point in opposite directions. Each partition has less work, which shifts its own time distribution down; and the job takes a maximum over more draws, which pushes the job time up. The first effect is real, and it is why partitioning works at all. The second is what this lesson measures, and it is the one nobody budgets for.
the same distribution, job time against partition count
N mean (ms) p50 p90 p99 P(job past 120 ms)
1 25.80 20 20 120 0.50%
2 31.32 20 40 120 1.00%
4 41.61 20 120 400 1.99%
8 59.70 40 120 400 3.93%
16 88.73 40 120 400 7.71%
24 111.63 120 400 400 11.33%
32 130.62 120 400 400 14.82%
64 185.43 120 400 400 27.44%
128 250.97 120 400 400 47.36%
The p99 column is the sharpest reading. One partition has a p99 of 120 ms; by N = 4 the job's p99 is 400 ms, the worst outcome in the distribution, and it stays there for every larger N. Nothing about the partitions got slower. The job simply takes enough draws that the rarest outcome is no longer rare.
Example · Reading the last column as a failure rateP(job past 120 ms) is 0.50% at one partition and 47.36% at 128. If 120 ms is a timeout, the same code that succeeded 199 times in 200 as a single unit fails about half the time as a 128-way job — and every one of those failures is a retry, which “Retries and Request Amplification” prices. The partition count did not change any component's reliability; it changed how many components have to all be fast at once.
What to do about it
Three responses, in increasing order of what they cost. Reduce the tail of one partition, which moves the whole table at once and is almost always the best value. Stop waiting for every partition where the answer permits it — a job that can return on 95% of its partitions is taking a much lower quantile of the same distribution. Or send the slow partition somewhere else and take the first answer, which is “Hedged Requests” and costs duplicate work.
What does not help is adding partitions, and it is worth being precise about why that differs from the two previous lessons. A hot range and a hot key are skew: the work is unevenly distributed and the arithmetic is about where it lands. A straggler needs no skew at all. Every partition here draws from the same distribution and the job is still four times slower than one partition, because the maximum of many identical things is larger than any of them.