What if Amdahl's Law Says Your Program is Perfect?

If Amdahl's law says your program scales perfectly, this might or might not be cause for celebration. Why the possibility of no celebration?

Keep in mind that Amdahl's law measures only scalability, not performance. It is therefore possible to “game” Amdahl's law by artificially slowing down the parallel portions of your kernel or application, a practice that Linus Torvalds has repeatedly decried.

Of course, there does not and never will exist a metric that cannot be gamed, but adding an efficiency metric can at least force the gamers to work a bit harder. The most straightforward efficiency metric compares the parallel program's performance to that of the optimal corresponding sequential program, for example:

e = Pp / (N Ps)

Here, Pp is the performance of the parallel program running on N CPUs and Ps is the performance of the optimal sequential program. In other words, if you want perfect efficiency e of 1, then your parallel program needs to run N times faster on N CPUs than the optimal sequential program runs on a single CPU.

If you think carefully about this equation, you should see the need to reduce synchronization overhead, as discussed earlier.