Husni Munaya

Amdahl's Law

August 01, 2020

Let’s say that you want to speed up 75% of your system’s execution time by three times. What is the overall speedup of the whole system? There’s a formula to solve this problem. It’s called Amdahl’s law and can be formulated as follows.

Smax=1(1p)+psS{\scriptsize max} = \frac{1}{(1-p) + \frac{p}{s}}

Where

  • SmaxS{\scriptsize max} is the maximum speedup of the system
  • pp is part of the system that is improved
  • ss is the speedup of pp

If you speed up 75% if your system’s execution time by three times, the overall speedup of the whole system will be

Smax=1(10.75)+0.753=2S{\scriptsize max} = \frac{1}{(1-0.75) + \frac{0.75}{3}} = 2

Amdahl’s law has few important implications:

  1. As ss approaches infinity, ps\frac{p}{s} approaches zero. This means that no matter how far you optimize a system, the overall speedup is always limited by the part of the system that doesn’t benefit from the improvement (11p\frac{1}{1-p}).
  2. You should make the common case fast.