Download presentation
Presentation is loading. Please wait.
Published byBenedict Parsons Modified over 8 years ago
1
Performance
2
Moore's Law
4
Moore's Law Related Curves
5
The Complete System Performance depends on much besides CPU:
6
Terminology
8
CPU Time Execution Time:
9
CPU Time Execution Time:
10
Clock GHz = billions of cycles / second
11
Clock Different subsystems, different clocks Pentium IIi7
12
Limiting Circuits Increasing clock may outpace time required by some circuits:
13
Limiting Circuits Processor designers can compensate by making instruction step take multiple cycles:
14
Clock Speedup Potentially counter productive results:
15
Clock Speedup Potentially counter productive results:
16
GHz Myth Different processors = different work/clock Ramping up clock in same processor may not help
17
MIPS MIPS = Millions of Instructions Per Second
18
CPI Different instructions = different #clock cycles
19
CPI Finding average cycles per instruction: – Clock cycles/instruction weighted by frequency
20
CPI Determining time spent doing different types using frequency & CPI: Average: 1.75
21
MIPS Flaws Compiler A: 2 million 1-cycle + 1 million 2-cycle = 3 million instruction over 4 million cycles Compiler B: 1.5 million 1-cycle + 1.2 million 2-cycle = 2.7 million instructions over 3.9 million cycles Faster program
22
MIPS Flaws Compiler A: = 3 million instruction & 4 million cycles 3 / 4 =.75 instruction per cycle Compiler B: = 2.7 million instructions & 3.9 million cycles 2.7 / 3.9 =.69 instructions per cycle Faster program Worse IPS
23
GHz Myth What work does an instruction do? Assume same execution time for A & B – A's MIPS score is 50% higher
24
MIPS MIPS can't compare different architectures
25
Measurement Reliable performance measurement must measure all three factors
26
Amdahl's Law
27
Gene Amdahl
28
Amdahl's Law Applied to parallel processing: Applied to computer systems: – Which chunk of work should we optimize?
29
Speed up A program used to take 20 minutes to run. Now it takes 15. What is the speedup? 1.33 times or 33%
30
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system
31
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor
32
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part
33
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff
34
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up
35
Example On a large system, suppose we can 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. What would the expected speedup be?
36
…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 f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up Example 150% increase = 250%
37
…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 Speed up is ~ 22% Example
38
On a large system, suppose we can 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. Or we could spend $10,000 to upgrade the CPU to be 50% faster…
39
…upgrade its cpu to run 50% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up Example
40
…upgrade its cpu to run 50% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service Speed up is ~ 30% Example
41
Choices Disks : 22% speedup for $7,000 ~ $318 per % CPU : 30% speedup for $10,000 ~ $333 per %
42
Non IO Protein String Matching Code 4 days execution time on current machine 20% of time doing integer instructions 35% percent of time doing I/O – Which is the better tradeoff? Compiler optimization that reduces number of integer instructions by 25% Hardware optimization that reduces the latency of each IO operations from 6us to 5us.
43
Non Hardware Reduce instructions by 25% = (1/.75) = 1.33 speedup 20% of time doing integer instructions 35% percent of time doing I/O
44
Non Hardware Reduce IO from 6us to 5us = (6/5) = 1.2 speedup 20% of time doing integer instructions 35% percent of time doing I/O
45
Non Hardware Reduce instructions by 25% Reduce IO from 6us to 5us = 20% speedup (6/5)
46
Limitations of Amdahl's Law Amdahl's Law doesn't take into account interactions – Speeding up one part of process may change the % of time it is limiting factor
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.