Performanceamdahlserial fractionspeedup limit

Amdahl's law

Definition

Amdahl's law gives the maximum speedup of a fixed amount of work on N workers as 1 ÷ (s + (1 − s) ÷ N), where s is the fraction that must run serially.

In practice

Every parallel design has a serial part: a lock around shared state, a single writer, a coordinator that splits and merges work. As N grows, the parallel part shrinks towards zero and the serial part dominates, so adding workers gives less and less. Naming the serial part is the first step in judging whether more cores or more instances will help.

Real systems often do worse than Amdahl predicts, because coordination cost grows with the number of workers (lock contention, cache-line bouncing, more participants to synchronise). Gustafson's law is the optimistic counterpart: if the problem grows with the machine, larger jobs keep scaling. Amdahl applies when the work is fixed.

Example

If 5% of a batch job is serial, 16 workers give at most 1 ÷ (0.05 + 0.95 ÷ 16) ≈ 9.1× speedup, and no number of workers can exceed 20×.