31. Amdahl's Law Flashcards
Before performing an experiment and collecting data it is helpful to make predictions. Describe one process for making and using predictions
One way to do this is to draw sketches of the graphs you expect to produce.
After collecting real results you can compare them against your predictions as a way of developing intuition about your system
(Predictions about simple cases are also good ways to validate models and simulators)
Why should we be wary of the premature use of summary statistics like means and medians?
Means and medians are single numbers that represent potentially massive data sets.
While these numbers can have deep explanatory power (when used correctly), they can be oversimplifications or lead to incorrect interpretations of the data.
Why are outliers special (and deserve special treatment)?
They may just be weird remnants of your measurement harness. But, they may have a lot more to tell you about your system and your data.
Either way, it’s important to understand them (and not blindly throw them out)
Is the slowest part of the code the part you should focus on first when trying to improve runtime?
Not necessarily. The slowest part of the code might not have much significance in the overall performance of a program? It could also be insanely hard to improve that slow code.
Between the significance of a block of code and the difficulty in optimizing that block, which do we likely know more about after experimentation?
Significance. It’s often easier to determine the significance of a block of code (like how many times that block is run in a program) than how difficult it will be to optimize it.
What is the “significance” of a block of code?
How much the code is contributing (in terms of total runtime and number of times its run) to the system.
What is the “difficulty” of a block of code when talking about optimization?
How difficult it would be to optimize a block of code. Programmer time is the resource of concern here.
What is Amdahl’s Law?
The impact of any effort to improve system performance is constrained by the performance of the parts of the system not targeted by the improvement.
What is an example of Amdahl’s Law IRL?
Imagine that we have the choice between:
- Reducing the execution time of foo from +5 min to 1 min
- Reducing the execution time of bar from +5 sec to 4 sec
Note: The improvement to foo is better both absolutely (4 minutes vs 1 second) and proportionally (80% vs 20%).
Note: None of that matters if foo is never called. Focus on what affects overall system the most, not the greatest overall local improvement
What is Challen’s version of Amdahl’s Law?
Ignore the thing that looks the worst and fix the thing that is doing the most damage.
What is the unfortunate corollary to Amdahl’s Law?
The more you improve one part of a system, the less likely it is that you are still working on the right problem
Why is designing a computer system different from designing an algorithm?
- The external interface (that is, the requirement) is less precisely defined, more complex, and more subject to change.
- The system has much more internal structure, and hence many internal interfaces
- The measure of success is much less clear.
What are the three goals of Lampson focuses on?
- Functionality (getting systems to work)
- Speed
- Fault-tolerance
What are the three parts of the design task Lampson identifies?
- Ensuring completeness
- Choosing interface
- Designing implementations