This is a great question about two fundamental concepts in parallel computing. Let me provide a comprehensive contrast of Amdahl's Law and Gustafson's Law.
Amdahl's Law
Basic Definition:
- Proposed by Gene Amdahl in 1967
- Addresses speedup when scaling a fixed-size problem to more processors
- Formula: S(p) = 1 / (f + (1-f)/p)
- Where S(p) is speedup with p processors
- f is the serial fraction (portion that cannot be parallelized)
- (1-f) is the parallelizable fraction
Key Assumptions:
- Fixed problem size
- Communication/synchronization overhead is minimal
- All processors are identical
Key Insight:
- As p → ∞, S(p) → 1/f
- Speedup is bounded by the serial fraction
- For example, if 10% of code is serial (f=0.1), maximum speedup = 10x regardless of processors
Implications:
- Pessimistic view of parallelization benefits
- Shows that serial bottlenecks severely limit scalability
- A small serial fraction can limit overall speedup dramatically
Gustafson's Law
Basic Definition:
- Proposed by John Gustafson in 1988
- Addresses speedup when problem size scales with processor count
- Formula: S(p) = p - f(p-1)
- Where S(p) is speedup with p processors
- f is the serial fraction
- This can also be written as: S(p) = p - (1-p)(1-f) ≈ p - f(p-1)
Key Assumptions:
- Problem size grows with processor count
- The amount of serial work remains relatively fixed
- Parallelizable work scales with number of processors
Key Insight:
-
As p → ∞, S(p) → p (linear or nearly linear speedup possible)
-
When problems scale up, the serial portion's relative impact shrinks
-
Near-linear speedup becomes achievable in practice
Implications:
- Optimistic perspective on parallel computing's viability
- Real-world applications often benefit from solving larger problems across more processors
- Efficiency remains practical with appropriately scaled workloads
Direct Contrasts
The fundamental difference lies in their assumptions: Amdahl's Law examines what happens when you throw more processors at a fixed problem, revealing that serial code creates an insurmountable ceiling. Gustafson's Law instead considers growing the problem alongside processor count, showing that the serial fraction becomes negligible relative to the expanding parallelizable work. Where Amdahl predicts diminishing returns, Gustafson demonstrates that parallel systems can maintain reasonable efficiency when workloads scale appropriately.
Practical Examples:
Sorting 1000 items with 10% serial overhead shows Amdahl's pessimism—even 100 processors only achieve 9.1x speedup. But if you process increasingly larger datasets with the same processor count, keeping serial work constant while parallelizable work grows, you get 90x speedup with 100 processors. The difference is whether the problem stays fixed or expands with your computational resources.
When Each Applies:
Amdahl's Law applies to strong scaling scenarios where you're optimizing a fixed workload. Gustafson's Law describes weak scaling, where you're solving progressively larger problems.
Why Both Matter:
These laws answer fundamentally different questions—one asks how much faster you can solve the same problem, the other asks what new problems become solvable. They're not contradictory but complementary perspectives on parallelization. Real systems typically experience both effects: some inherent scaling limits from serial code, but also the ability to tackle larger problems as resources increase.
Practical Limitations:
Amdahl's Law overlooks communication costs and assumes perfect load balancing, while Gustafson's Law requires that problems can meaningfully scale and doesn't fully capture communication complexity. Both can be refined to incorporate more realistic factors like overhead and memory constraints, but these extensions move beyond the simple formulations.
Amdahl's Law vs. Gustafson's Law
Core Contrast
| Dimension | Amdahl's Law | Gustafson's Law |
|---|
| Problem Size | Fixed | Scales with processor count |
| Speedup Formula | S(p) = 1 / (f + (1-f)/p) | S(p) = p - f(p-1) |
| Speedup Limit | Bounded: S_max = 1/f | Linear: S ≈ p |
| Scaling Type | Strong scaling | Weak scaling |
| Outlook | Pessimistic | Optimistic |
Key Differences Explained
Amdahl's Law: Fixed Problem
Scenario: Sort 1 million items
10% serial, 90% parallel
Processors | Speedup
4 | 2.5× (limited!)
10 | 5.2×
100 | 9.1× (approaches 1/0.1 = 10×)
∞ | 10× (hard ceiling)
The Bottleneck: Serial fraction f becomes more significant as p increases.
Gustafson's Law: Scaled Problem
Scenario: Process larger dataset as processors grow
10% overhead fixed, 90% grows with data
Processors | Problem Size | Speedup
4 | 4× | 3.7× (4 - 0.1×3)
10 | 10× | 9.1×
100 | 100× | 90.9×
∞ | ∞ | linear
The Insight: Absolute (not relative) serial work stays constant—parallelizable portion dominates.
Visual Comparison
Speedup
↑
| Gustafson (weak scaling)
90| /________________ (nearly linear)
| /
| /
10 |__/ ← Amdahl (strong scaling)
|/ (flattens out)
└─────────────────→ Processors
1 10 100
When Each Applies
Amdahl's Law
- Analyzing existing fixed workloads on more hardware
- Database queries on fixed dataset
- Real-time systems with predetermined problem size
- Identifying parallelization efficiency bottlenecks
Gustafson's Law
- Scientific simulations (weather, molecular dynamics)
- Big data processing where scale grows with compute
- Machine learning on larger datasets
- Understanding practical benefits of investing in HPC clusters
Why Both Are Valid
They answer different questions:
| Question | Answer |
|---|
| "How much faster if I buy 10× more cores for my current workload?" | Amdahl (often disappointing) |
| "What larger problems can I solve with 10× more cores?" | Gustafson (often encouraging) |
Practical Example
Rendering a 1-hour film (4 frames total)
- Amdahl view: 15% serial → max 6.7× speedup no matter how many render nodes
- Gustafson view: Render 40 hours of footage instead → 10 nodes achieves near 10× more output
Modern Considerations
Both laws make simplifying assumptions. Real systems also face:
- Communication overhead (grows with p)
- Memory bandwidth saturation
- Load imbalance
Modern scaling analysis combines both perspectives for realistic estimates.