Amdahl's Law Calculator
Inputs
| Parallel portion | 95 % |
|---|---|
| Processors | 16 |
Amdahl's Law Calculator
Estimate the maximum speedup of a program from parallelization using Amdahl's law, given the parallelizable fraction of the work and the number of processors.
Inputs
Workload
Results
Enter a value to see results.
Speedup
Efficiency
Amdahl's Law
Amdahl's law predicts how much faster a fixed task can run when part of it is executed in parallel across several processors. It answers a question every engineer faces when scaling software onto more cores: if only some of the work can be parallelized, what is the realistic speedup, and where does adding hardware stop helping? The calculator takes the parallelizable fraction of the work and a processor count and returns the resulting speedup, the theoretical ceiling, and the parallel efficiency.
The serial bottleneck
Most programs contain a mix of work. Some parts — independent iterations of a loop, rendering separate image tiles, processing distinct records — can run simultaneously. Other parts — reading a configuration file, building a data structure that everything else depends on, a final reduction step — must run in sequence. The serial parts cannot be accelerated by adding processors, so they set a floor on the total run time.
Amdahl's law makes this precise. Let be the fraction of the original run time that is parallelizable and the serial fraction. With processors the parallel part finishes in of the original time, while the serial part still takes . The overall speedup is the original time divided by the new time:
The ceiling
As grows, the term shrinks toward zero, but the serial term stays put. Taking the limit gives the maximum speedup the program can ever reach:
A program that is 95% parallel can never exceed a 20× speedup, no matter how many processors are thrown at it. A program that is 50% parallel tops out at 2×. This is why reducing the serial fraction — not just buying more cores — is often the higher-leverage optimization.
Worked example
Suppose 95% of a job is parallelizable and you run it on 16 processors. The speedup is:
S=(1−0.95)+160.951=0.05+0.0593751=0.1093751≈9.14So 16 processors deliver about a 9.1× speedup — well short of a perfect 16×. The theoretical ceiling here is , and the parallel efficiency is , meaning nearly half of the added compute capacity is lost to the serial bottleneck.
Why efficiency matters
Parallel efficiency, , captures how well the extra processors are being used. Efficiency near 100% means almost linear scaling; efficiency that falls quickly as rises signals that the serial fraction dominates and that more hardware is poor value. Amdahl's law describes strong scaling — a fixed workload on more processors. When the workload itself grows with the hardware, the more optimistic Gustafson's Law Calculator applies instead.
Treat the parallel fraction as an estimate: it is usually measured by profiling and often shifts with problem size and hardware, so the predicted speedup is a guide to expected behavior rather than a guarantee.
Frequently Asked Questions (FAQ)
What is Amdahl's law?
Amdahl's law, formulated by Gene Amdahl in 1967, gives the theoretical speedup of a fixed task when part of it is parallelized. If a fraction p of the work can run in parallel across N processors and the remaining 1 − p must run serially, the overall speedup is S = 1 / ((1 − p) + p / N). The serial portion sets a hard ceiling: no matter how many processors are added, the program can never run faster than 1 / (1 − p) times the original.
Why does adding more processors give diminishing returns?
As the processor count rises, the parallel part of the work shrinks toward zero time, but the serial part stays constant. Once the parallel part is small relative to the serial part, each additional processor barely changes the total run time. For example, with 90% parallel work, going from 1 to 16 processors gives roughly a 6.4× speedup, but going from 16 to 1,024 processors only reaches about 9.9× — still short of the 10× ceiling.
How is Amdahl's law different from Gustafson's law?
Amdahl's law assumes a fixed problem size and asks how much faster it runs with more processors — emphasizing the limit imposed by serial work. Gustafson's law assumes the problem size grows with the available processors (a fixed time budget, larger workload) and predicts speedup that scales more favorably. Both are correct; they answer different questions about strong scaling versus weak scaling.
How do I estimate the parallel portion of my program?
The parallel portion is best measured rather than guessed. Profile the program to find how much wall-clock time is spent in code that can run concurrently versus code that must run in sequence (I/O setup, dependency chains, synchronization).
You can also infer it from two measured run times at different processor counts by rearranging the speedup formula. Treat any single estimate as approximate, since the parallel fraction often changes with problem size and hardware.
Recommended Next
Gustafson's Law Calculator
Estimate the scaled speedup of a parallel workload using Gustafson's law, where the problem size grows with the number of processors rather than staying fixed.