Measuring and Reporting Performance
Chapter 1
1
Outline
2
Prof. Iyad Jafar
Quantitative Principles of Computer Design
3
Prof. Iyad Jafar
Principles of Computer Design
4
Prof. Iyad Jafar
Measuring Execution Time
5
Prof. Iyad Jafar
Introduction
6
Relative Performance
Prof. Iyad Jafar
Measuring Execution Time
7
one clock cycle
Prof. Iyad Jafar
Measuring Execution Time
8
Prof. Iyad Jafar
The Performance Equation
9
Prof. Iyad Jafar
Example 1
10
Instruction Class | Instruction Count | Class CPI |
1 | 200 | 2 |
2 | 300 | 3 |
3 | 500 | 1 |
Effective CPI = (200x2+300x3+500x1)/1000 = 1.8
Time = 1000 x 1.8 / 1×109 = 1.8 us
Prof. Iyad Jafar
Example 2
11
TimeA = IC x 2 x 250 ps = 500 IC ps
TimeB = IC x 1.2 x 500 ps = 600 IC ps
PerformanceA TimeB 600 IC
PerformanceB TimeA 500 IC
-------------------- = ---------- = --------- = 1.2
Computer A is 1.2 faster than B
Prof. Iyad Jafar
Example 3
A compiler designer is trying to decide between two code sequences for a computer with CPI for different classes of instructions is given in the table. The two code sequences require the given instruction counts.
Which code will be faster to execute?
12
Class | A | B | C |
CPI for class | 1 | 2 | 3 |
IC in sequence 1 | 2 | 1 | 2 |
IC in sequence 2 | 4 | 1 | 1 |
Prof. Iyad Jafar
Determinants of Performance
13
HW or SW Component | Affects? | How? |
Algorithm | IC, CPI |
|
Programming Language | IC, CPI |
|
Compiler | IC, CPI |
|
ISA | IC, CPI, CC |
|
Processor Organization | CPI, CC |
|
Technology | CC |
|
The performance of a program depends on the algorithm, the language, the compiler, the architecture, and the actual hardware
Prof. Iyad Jafar
Example 4
14
Class | Frequency | CPI |
ALU | 50% | 1 |
Load | 20% | 5 |
Store | 10% | 3 |
Branch | 20% | 2 |
CPIk x F |
0.5 |
1.0 |
0.3 |
0.4 |
CPIk x F |
0.5 |
0.4 |
0.3 |
0.4 |
CPIk x F |
0.5 |
1.0 |
0.3 |
0.2 |
CPIk x F |
0.25 |
1.0 |
0.3 |
0.4 |
2.2 |
1.6 |
2.0 |
1.95 |
Effective CPI
Original
App1
App2
App3
Speed up
1.375 |
1.10 |
1.128 |
Prof. Iyad Jafar
Example 5
15
| | CPI | |||
Processor | CR (GHz) | A | B | C | D |
1 | 1.5 | 1 | 2 | 3 | 4 |
2 | 2 | 2 | 2 | 2 | 2 |
Prof. Iyad Jafar
Example 6
The information for some program that is executed on some processor is given in the table.
If the processor is modified such that the CPI for Class 2 instructions is reduced to 2, then would it be beneficial to adopt this modification if this modification requires increasing the clock cycle by 10%?
16
Classi | CPIi | Frequencyi |
1 | 2 | 0.3 |
2 | 5 | 0.2 |
3 | 3 | 0.5 |
Prof. Iyad Jafar
Measuring Performance
17
Prof. Iyad Jafar
Measuring Performance
18
Prof. Iyad Jafar
Measuring Performance
19
Prof. Iyad Jafar
Amdhal’s Law
20
Prof. Iyad Jafar
Amdahl's Law
21
Prof. Iyad Jafar
Amdahl's Law
22
Prof. Iyad Jafar
Example
23
Prof. Iyad Jafar
Reliability and Dependability
24
Prof. Iyad Jafar
System Operation
25
Service accomplishment
Service delivered�as specified
Service interruption
Deviation from�specified service
Failure
Restoration
Prof. Iyad Jafar
Reliability and Dependability
FIT = 109/MTTF
26
Prof. Iyad Jafar
Example
Assume independent failures and exponentially distributed life times
27
If a collection of modules has exponentially distributed lifetimes, the overall failure rate of the collection is the sum of the failure rates of the modules.
Prof. Iyad Jafar
Exercises
28
Prof. Iyad Jafar
Exercises
A program is compiled using three different compilers with the following instruction mix and CPI per instruction type. All processors run at 2.5 GHz and execute 10⁹ instructions.
29
Prof. Iyad Jafar
Exercises
A CPU designer can choose between two options:
You expect to run a workload of 2 billion instructions.
30
Prof. Iyad Jafar
Exercises
31
Prof. Iyad Jafar