Amdahl's Law vs Gustafson's Law: Key Differences
Both laws estimate how much faster a program gets when you add processors, but they rest on different assumptions. Amdahl's law fixes the problem size and asks how fast the same work can be finished, so the part that cannot be parallelized sets the upper limit on speedup. Gustafson's law fixes the run time and solves a larger problem as processors are added, so speedup grows nearly in proportion to the number of processors. The two do not contradict each other; they answer different questions.
| Aspect | Amdahl's law | Gustafson's law |
|---|---|---|
| What is fixed | Problem size (total amount of work) | Run time (amount of work per processor) |
| Question | How much faster can the same problem be solved? | How much larger a problem can be solved in the same time? |
| Formula (N is the number of processors) | S = 1 / ((1 − p) + p / N) | S = s + (1 − s) × N = N − s × (N − 1) |
| How the fraction is measured | p is the fraction of time taken by the parallelizable part when run on one processor | s is the fraction of time taken by the serial part when run in parallel on N processors |
| As N increases | Levels off at 1 / (1 − p) | Keeps growing nearly in proportion to N |
| Worked example | With p = 0.95, about 17× at N = 100; even with infinite N, the limit is 20× | With s = 0.05, about 95× at N = 100 |
| Corresponding scaling | Strong scaling | Weak scaling |
| Outlook | Pessimistic. A small serial part sets the upper limit | Optimistic. Parallelism pays off if the problem is made larger |
| Examples where it applies | When you want to process a fixed-size input quickly: processing a single image, interactive responses, etc. | Simulations with finer grids, or when you want to process larger data or models in the same time |
| Not included in either | Communication and synchronization overhead, load imbalance, insufficient memory bandwidth | Communication and synchronization overhead, load imbalance, insufficient memory bandwidth |
Figures are typical orders of magnitude and vary by process generation and product.