Working through an example of Amdahl's Law with respect to percentage speedup

basil picture basil · Sep 5, 2013 · Viewed 8.5k times · Source

I am reading through "Computer Architechture: A Quantitative Approach 5th ed" and am trying to grasp Amdahl's law, when it comes to speeding up portions of the system i.e. speed up a certain percentage of the system by a certain percentage . It is easy to understand when you are talking about speeding up a system by a certain factor e.g. a system that is 10 times faster.

To give a concrete example:

You have a system, where a certain sub-system accounts for 70% of the execution time and you wish to develop a speedup which will improve the latency of this sub-system by 50%.

From the book, Amdahl's Law is listed as:

SpeedupOverall = 1/((1-FractionEnhanced)+(FractionEnhanced/SpeedupEnhanced))

I gather from the explanation of the Fractional Enhancement ("The fraction of the computation time in the original computer that can be converted to take advantage of the enhancement"), that: FractionEnhanced = 70% or 0.7.

My question here is how to reflect the speedup. The book lists it as "The improvement gained by the enhanced execution mode, that is, how much faster the task would run if the enhanced mode were used for the entire program". The book says that this would be the time that the original mode over the improvement time; in this case 70/50, or 1.4. However, where my confusion comes in is with this website, where by examining the java applet code, it seems that speedup enhanced would be 1 + the percentage speedup, or 1.5. Maybe I am overthinking this as well, but I am also thinking how it could also be .7/(0.7 - 0.7*0.5), or 2 (since, 70%*50% is the actual latency reduction, in terms of the actual sub-sbstem, right?).

Working the math out, we get the following answers:

  1. For SpeedupEnhanced = 70/50 = 1.4: SpeedupOverall = 1/((1-0.7)+ .7/1.4) = 1.25

  2. For SpeedupEnhanced = 1+0.5 = 1.5: SpeedupOverall = 1/((1-0.7)+ .7/1.5) = 1.3043

  3. For SpeedupEnhanced = 0.7/(0.7-0.7*0.5) = 2: SpeedupOverall = 1/((1-0.7)+.7/2) = 1.54

Which one would be the correct speedup here? The second seems to make sense to me, but the book seems to imply that the first is correct. Any help by way of references or explanations as to how to grasp this type of speedup would be greatly appreciated.

Answer

zam picture zam · Sep 5, 2013

The third answer (1.54x total speedup) is a correct one, because "speedup enhanced" is a non-dimensional value characterizing only enhanced part execution time change (in "x" units). Note that speedup enhanced is simply equal to 70/(70*0.5) in your case.

Overall there are lots of possible confusions wrt amdahl law and gustafson law interpretation. Surprisingly, good starting reading is wikipedia page about amdahl law. It will particularly remap you to more traditional interpretation which makes an emphasize on parallel computations and number of processors instead of "enhanced speedup" notion. Deeper and exhaustive reading could be found on reference page of professor Gustafson, who "invented" alternate "optimistical law". After studying all the materials, you will find that the notion of "speedup" is even more interesting and unambigous.