Amdahl’s Law
Amdahl’s law bounds how much faster a task finishes when part of it is run in parallel. Gene Amdahl stated the argument in 1967: the portion of the work that cannot be parallelized sets a ceiling on the speedup, however many workers are added.
The formula
Let \(f\) be the fraction of the single-worker running time that must happen in sequence, and \(1-f\) the fraction that can be split evenly across \(k\) workers. The running time with \(k\) workers, relative to one worker, is
\[ T(k) = f + \frac{1-f}{k}, \]
so the speedup is
\[ S(k) = \frac{1}{f + (1-f)/k}. \]
The serial part takes the same time no matter how many workers exist. The parallel part shrinks in proportion to \(k\). As \(k\) grows, the second term vanishes and \(S\) approaches \(1/f\). A task that is 20 percent serial can never run more than 5 times faster.
Worked numbers
Computed from the formula:
| serial fraction \(f\) | k=2 | k=4 | k=8 | k=16 | limit \(1/f\) |
|---|---|---|---|---|---|
| 0.05 | 1.90 | 3.48 | 5.93 | 9.14 | 20 |
| 0.20 | 1.67 | 2.50 | 3.33 | 4.00 | 5 |
| 0.50 | 1.33 | 1.60 | 1.78 | 1.88 | 2 |
With 20 percent serial work, doubling workers from 8 to 16 raises the speedup only from 3.33 to 4.00. Returns diminish quickly, and the serial fraction decides where.
Relevance to parallel agents
Suppose a task is split among several LLM agents. Steps that depend on each other, such as a plan that must exist before searches can start, or a final synthesis that needs every sub-result, form the serial part. Independent lookups form the parallel part. Wall-clock time is then the serial steps plus the slowest parallel branch, which is why the law predicts a hard ceiling for any plan with long dependency chains.
The basic formula assumes parallelism is free. Multi-agent systems add costs that grow with the number of workers: splitting the task, passing context, merging results, and reconciling conflicts. A simple extension adds an overhead term \(o\) per additional worker: \(T(k) = f + (1-f)/k + o(k-1)\). With \(f=0.2\) and \(o=0.02\) (hypothetical values), the speedup is 1.61 at 2 workers, 2.17 at 4, 2.27 at 8, and 1.82 at 16. Beyond about 8 workers it gets slower, not just flatter. Overhead is the reason adding agents can reduce speed as well as raise cost.
What the law does and does not say
- It is about latency of one fixed task. Parallel workers can also increase throughput, but splitting the task, passing context, and merging answers add costs. Model-call count and token spend depend on how the work is divided; they are not bounded by Amdahl’s time formula.
- It assumes the parallel part divides evenly. Uneven branches mean the slowest one dominates, so the real speedup is lower.
- It assumes the problem size is fixed. Gustafson’s law considers the opposite case, where more workers are used to handle a larger problem in the same time. In that view the serial fraction matters less, because the parallel part grows with the problem.
- It does not account for quality. Splitting a task among agents may change the answer, not just the time taken.
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
