liveBook · Manning

Amdahl’s Law

As explained in Learn Concurrent Programming with Go

A performance model stating that the overall speedup from optimizing or parallelizing a system is limited by the fraction of execution that remains sequential.

Amdahl’s law states that optimizing or parallelizing one part of a system cannot overcome the time spent in sequential work. The non-parallel portion becomes the bottleneck limiting overall speedup. section 1.6.1

Building a house with more workers

A house project may be 95% parallelizable, while tasks such as moving materials along a single road remain sequential. Even with 512 builders, the project finishes only about 19 times faster; adding more workers eventually wastes money. section 1.6.1

Use Amdahl’s law to reason about scalability:

  • Find the work that must happen one step at a time. section 1.6.1
  • Estimate whether additional processors can improve the parallel portion enough to matter. section 1.6.1
  • Avoid assuming that more workers or processors will produce proportional gains. section 1.6.1

Amdahl’s law describes fixed-size problems. Gustafson’s law offers a complementary view: increasing the problem size can keep additional resources busy when the serial portion stays relatively constant. section 1.6.2 section 1.7

Figure 1.6 The speedup against the number of processors according to Amdahl’s law

Shows how theoretical speedup changes as processor count increases for different parallel-to-sequential ratios. section 1.6.1

How Learn Concurrent Programming with Go covers it

How deep it goes
Defines sequential bottlenecks and illustrates speedup limits with construction scenarios and a processor-scaling figure, without deriving the formula.
Examples
Uses house construction, a narrow transport route, processor-count charts, and a 95%-parallel workload reaching roughly 19-fold speedup.
What it assumes
Assumes only a distinction between sequential and parallel work, which it develops through a construction analogy.
What you can do after
Evaluate scalability limits and choose whether additional parallel resources are likely to improve a fixed-size workload.
How it connects
Connects sequential execution, parallelism, scalability, processor resources, and Gustafson’s law.

Also explained in

Compare how 3 books explain Amdahl’s Law →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Concurrent Programming with Go. The section links point to the parts of the book it draws on.