Lec 3
Lec 3
DESIGN
EVALUATION
2
Performance Evaluation Concepts
• Computer performance evaluation is based on:
– Throughput
– Execution time
• Processor performance evaluation
– Based on execution time of a program:
PerformanceX = 1/ Execution timeX
Relative performance: n = PerformanceX / PerformanceY
n > 1 => X is n times faster than Y
• Terminology
– Improve performance = increase performance
– Improve execution time = decrease execution time
Example
• Impact on throughput and Execution time
of:
– Using a faster processor
• Decrease in Execution time
• Increase in throughput
– Adding more processors to a system
• Increase in throughput
• Decrease in Execution time if the program parts can
run in parallel (if overhead is low)
CPU Performance
• CPU performance is measured in terms of time!
Compiler
ISA
Microarchitecture
Hardware
Compiler
ISA
Microarchitecture
Hardware
Compiler
ISA
Microarchitecture
Hardware
Example: Two cases - F1: 25% improved 2X, F2: 50% improved 2X
50 percent n.i. F2
Time →
1
Speedup =
(1 - fraction enhanced) + (fraction enhanced/factor of improvement)
Example
• A program runs in 10 seconds
• What is the speedup after a faster floating
point unit is incorporated?
Speedup
Speedup = 1.9
5
(1 – Fraction FP) + FractionFP 1.8
4 5 1.7
1.6
3 1.5 1
Speedup =
2
1.4 0.5
1.3 0.5 + FP factor of improvement
1 1.2
Fraction of FP 1.1 FP Unit im provem ent
0 1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Example
• A program runs in 10 seconds
• What is the speedup after a faster floating
point unit is incorporated?
Speedup
Speedup = 1.9
5
(1 – Fraction FP) + FractionFP 1.8
4 5 1.7
1.6
3 1.5 1
Speedup =
2
1.4 0.5
1.3 0.5 + FP factor of improvement
1 1.2
Fraction of FP 1.1 FP Unit im provem ent
0 1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Amdahl’s Law - example
• A program runs in 100 seconds on a computer, with
multiply operations responsible for 80 seconds of this time
• How much do I have to improve the speed of
multiplication, if I want my program to run 5 times faster?
• Timeimproved = Timeunaffected + Timeaffected/(Improvement
Factor)
• 20 s = 20 s + 80 s / n
• 0 = 80 s / n
• There is no amount by which we can improve multiply to
achieve a fivefold increase in performance!
19
Amdahl’s Law
• On a large system, suppose we can upgrade a
CPU to make it 50% faster for $10,000 or
upgrade its disk drives for $7,000 to make them
150% faster.
• Processes spend 70% of their time running in the
CPU and 30% of their time waiting for disk
service.
• An upgrade of which component would offer the
greater benefit for the lesser cost?
• The processor option offers a 30% speedup: