liveBook · Manning

Amdahl’s Law

As explained in Grokking Concurrency

Amdahl's law is a formula for estimating the maximum speedup of a computation from its sequential fraction and available processing resources.

Adding more processors cannot make every computation arbitrarily fast. Amdahl’s Law estimates the maximum speedup available from the work that can run in parallel and the work that must remain sequential. section 2.11 section 2.14

Apply the idea by separating a computation into:

  • Sequential work, such as dividing inputs or collecting results, which limits the overall speedup. section 2.11
  • Independent parallel work, which can be divided among multiple processing resources. section 2.11 section 2.14
  • Practical overheads and redesign needs, including decomposition, algorithm changes, and synchronization points. section 2.14

Searching index cards

Searching a mixed pile takes 5 seconds alone: 1 second to divide the cards, 3 seconds to search, and 1 second to collect matching cards. Two friends reduce the search phase to 1 second, so the total becomes 3 seconds—a 40% speedup, not an unlimited one. section 2.11

The law is a decision aid: estimate the benefit before parallelizing, especially when a large sequential fraction remains. Parallelism also requires multiple processing resources and independent tasks. section 2.14

How Grokking Concurrency covers it

How deep it goes
Explains the speedup limit through a timed card-search example, stopping short of detailed formula derivation or implementation.
Examples
Uses a mother-and-baby analogy and a timed index-card search divided among friends.
What it assumes
Assumes only basic awareness of serial and parallel work while introducing task independence, processing resources, and synchronization.
What you can do after
Evaluate expected parallelization benefits before redesigning an algorithm for multiple processing resources.
How it connects
Connects sequential execution, parallel execution, parallel computing, concurrency, parallelism, synchronization, 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 Grokking Concurrency. The section links point to the parts of the book it draws on.