Skip to content
jtoghrul, home

Visual proofs

Amdahl’s law

Performance · Intro

If a fraction s of a job must run serially, p processors give a speedup of 1 / (s + (1 − s)/p), which can never exceed 1/s.

Try this

Set the serial share to 10% and push the processors to 1,024. Then halve the serial share instead.

Why it matters

It tells you when adding machines stops paying, and points at the serial part (locks, coordination, a single writer) as the thing to remove.

The proof

Call the time on one processor 1. The serial part takes s whatever happens; the rest, 1 − s, can be split across p processors and takes (1 − s)/p.

Speedup is the old time over the new: 1 / (s + (1 − s)/p).

As p grows, (1 − s)/p shrinks to nothing, but s stays. The speedup approaches 1/s and never passes it: 5% serial work caps you at 20×.

Gustafson’s law is the hopeful companion: with more processors people usually grow the problem, and then the parallel part grows too.

Sources

  • Validity of the single processor approach to achieving large scale computing capabilities, Gene Amdahl, 1967
  • Reevaluating Amdahl’s Law, John L. Gustafson, 1988