Your Equation

Library / Computer / CMP-02

Computer

Amdahl’s law

Overall speed-up when only part of a job is accelerated.

Ref
CMP-02
Rev
v1
Field
Computer
Result
S [×]

S overall speed-up, p the fraction of the original execution time that is sped up (0 to 1) and s the speed-up factor of that part. Same workload, no extra overhead.

If you speed up only part of a job, the rest still takes its original time. The part you cannot accelerate sets a ceiling on the overall gain.

Calculator

Solve for
×
0.10.99
×
1.51,000
  • Ceiling as s → ∞2.5 ×
  • Time saved52.5 %

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Overall speed-up (×) current value 2.105 ×
pFraction acceleratedKey driver
1.17.48
sSpeed-up of that part
1.252.5
  • Even with infinite resources, the speed-up cannot exceed 1/(1 − p). A job that is 90% parallel is capped at 10×.
  • Optimising the biggest share of the run time pays more than optimising a small part by a huge factor.
  • Real systems add overheads (communication, synchronisation) that make the result lower than this ideal.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (×)Local stepChange in result
p Fraction accelerated0.1 to 0.99 1.0967.4776.381+undefined%—
s Speed-up of that part1.5 to 1,000 ×1.252.4961.246+10%+1.46 %

Sweep of Speed-up of that part

Speed-up of that part (×)Overall speed-up (×)
1.51.25
3.3811.732
7.6222.089
17.182.299
38.732.407
87.32.458
196.82.481
443.62.492
1,0002.496

Sweep one variable

Overall speed-up (×)Hover, touch, or use the arrow keys on the chart
1.21.41.61.822.22.4 210502001000 Speed-up of that part (×), log scale now 2.105

Variables and how each one contributes

S

Overall speed-up

Result · ×

What the equation gives you. Everything else feeds it.

p

Fraction accelerated

· typical 0.1 to 0.99

Share of the original run time that benefits. The dominant driver: raising p from 0.6 to 0.9 changes the ceiling from 2.5× to 10×.

s

Speed-up of that part

× · typical 1.5 to 1,000

How much faster the accelerated part runs (e.g. number of cores). Shows strong diminishing returns beyond a modest value.

Worked example with the values above

  1. Unaccelerated share: 1 − p = 0.4. Accelerated share: p/s = 0.6 / 8 = 0.075.
  2. New time relative to old: 0.475.
  3. S = 1 / 0.475 = 2.105 ×.

Assumptions and limits

  • Fixed workload and fixed problem size.
  • No extra overhead for the accelerated part.
  • Fraction p measured on the original execution time.

Common mistakes

  • Defining p as a fraction of the new time.
  • Expecting linear scaling with the number of cores.
  • Using the instruction fraction instead of the time fraction.

Statistics and uncertainty

The accelerated fraction p is usually measured by profiling and carries ±5–10% uncertainty, which matters a lot near p = 1 because the ceiling 1/(1 − p) is very sensitive: a change from 0.95 to 0.90 halves the ceiling from 20× to 10×.

Where it is used

  • Deciding whether an accelerator or extra cores are worthwhile.
  • Signal-processing chain upgrades.
  • Hardware and software co-design.

Maths you need

  • Fractions: p is a share of the time
  • Reciprocals: speed-up is old time over new time

Related formulas

Practise this formula