Professional Documents
Culture Documents
Module 8 - Performance Measurement _ Analysis
Module 8 - Performance Measurement _ Analysis
Module 8 - Performance Measurement _ Analysis
SECR2033
Computer Organization
and Architecture
Lecture slides prepared by “Computer Organization and Architecture”, 9/e, by William Stallings, 2013.
Module 8
Performance Measurement
and Analysis
Objectives:
q To understand the key performance issues that relate to
computer design.
q Explain the reasons for the move to multicore organization, and
understand the trade-off between cache and processor
resources on a single chip.
q To summarize some of the issues in computer performance
assessment.
q To discuss the benchmarks in general.
2
m @ Jun 2023 1
SECR2033 Computer Organization & Architecture 07/06/2023
Module 8
Performance Measurement
and Analysis
8.1 Introduction
8.2 Defining Performance
8.3 Basic Measures of Computer Performance
8.4 Comparing Performance
8.5 Benchmarking
8.6 Summary
8.1 Introduction 8
m @ Jun 2023 2
SECR2033 Computer Organization & Architecture 07/06/2023
8
n Assessing the performance of computers can be quite
challenging, together with the wide range of performance
improvement techniques employed by hardware designers,
have made performance assessment much more difficult.
n To understand the issues of assessing performance:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.28. 5
Module 8
Performance Measurement
and Analysis
8.1 Introduction
q Overview
8.2 Defining Performance
q Throughput and
8.3 Basic Measures of Computer Performance
Response Time
8.4 Comparing Performance
q Relative Performance
8.5 Benchmarks
q Performance Metrics
8.6 Summary
m @ Jun 2023 3
SECR2033 Computer Organization & Architecture 07/06/2023
8
Overview
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.29. 7
Which of these
airplanes has the
The rate at which the airplane
transports passengers, which is the 8
best performance? capacity times the cruising speed.
286,700
1350
8720
m @ Jun 2023 4
SECR2033 Computer Organization & Architecture 07/06/2023
8
n Let’s suppose we define performance in terms of speed.
n Two possible definitions.
8
Throughput & Response Time
m @ Jun 2023 5
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 1:
Solution :
m @ Jun 2023 6
SECR2033 Computer Organization & Architecture 07/06/2023
8
Relative Performance
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.30. 13
8
n This means that for two computers X and The execution
Y, if the performance of X is greater than time on Y is
the performance of Y, we have: longer than X,
if X is faster
than Y.
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.31. 14
m @ Jun 2023 7
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 2:
Solution : A is therefore
_____ times
We know that A is n times as fast as B if: as fast as B.
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.31. 15
8
Performance Metrics
CPI : _______________________________
16
m @ Jun 2023 8
SECR2033 Computer Organization & Architecture 07/06/2023
Module 8
Performance Measurement
and Analysis
8.1 Introduction
8.2 Defining Performance
q Overview
8.3 Basic Measures of
q Clock Speed
Computer
Performance q Instruction Execution Rate
8.4 Comparing Performance q CPU Performance
8.5 Benchmarks q Classic CPU – Instruction
8.6 Summary Count
17
8
Overview
William Stallings (2016). Computer Organization and Architecture: Designing for Performance (10th Edition). United States: Pearson Education Limited, p.56. 18
m @ Jun 2023 9
SECR2033 Computer Organization & Architecture 07/06/2023
8
Clock Speed
8
Instruction Execution Rate
William Stallings (2016). Computer Organization and Architecture: Designing for Performance (10th Edition). United States: Pearson Education Limited, p.58. 20
m @ Jun 2023 10
SECR2033 Computer Organization & Architecture 07/06/2023
8
n However, on any given processor, the number of clock cycles
required varies for different types of instructions, such as load,
store, branch, and so on.
n Let CPIi be the number of cycles required for instruction type i,
and Ii be the number of executed instructions of type i for a
given program. Then we can calculate an overall CPI as :
Note: Ic is number of
instruction executions, not the
number of instructions in the
object code of the program.
William Stallings (2016). Computer Organization and Architecture: Designing for Performance (10th Edition). United States: Pearson Education Limited, p.58. 21
8
CPI (Cycles Per Instruction)
n We can express the MIPS rate in terms of the clock rate and
CPI as follows:
T à Processor time
William Stallings (2016). Computer Organization and Architecture: Designing for Performance (10th Edition). United States: Pearson Education Limited, p.58. 22
m @ Jun 2023 11
SECR2033 Computer Organization & Architecture 07/06/2023
8
CPI (Cycles Per Instruction)
Example 3:
8
Solution : CPI (Cycles Per Instruction)
MIPS (Millions of Instructions Per Second)
William Stallings (2016). Computer Organization and Architecture: Designing for Performance (10th Edition). United States: Pearson Education Limited, p.59. 24
m @ Jun 2023 12
SECR2033 Computer Organization & Architecture 07/06/2023
8
CPU Performance
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.33. 25
8
n A simple formula relates the most
basic metrics (clock cycles and clock
cycle time) to CPU time for a program:
m @ Jun 2023 13
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 4: Improving performance
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.34. 27
8
Solution : Improving performance
(Method 1)
n Let’s first find the number of clock cycles required for the
program on A:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.34. 28
m @ Jun 2023 14
SECR2033 Computer Organization & Architecture 07/06/2023
8
n CPU time for B can be found using this equation:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.34. 29
8
Solution : Improving performance
(Method 2)
Computer A: Computer B:
Execution timeA = 10 seconds Execution timeB = 6 seconds
Clock rateA = 2 GHz = 2 109 Hz
n Let’s first find the number of clock cycles required for the
program on A:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.34. 30
m @ Jun 2023 15
SECR2033 Computer Organization & Architecture 07/06/2023
8
n Clock rate for B can be found using this equation with 1.2 times
more clock cycle than A:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.34. 31
8
CPI (Cycles Per Instruction)
Instruction Performance
m @ Jun 2023 16
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 5: Using performance equation
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.35. 33
8
Solution : Using performance equation
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.36. 34
m @ Jun 2023 17
SECR2033 Computer Organization & Architecture 07/06/2023
8
n The CPU time for computer B:
Computer A is ___
times as fast as
computer B for
this program.
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.36. 35
8
CPI (Cycles Per Instruction)
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.36. 36
m @ Jun 2023 18
SECR2033 Computer Organization & Architecture 07/06/2023
(b) Get the CPU clock cycle for each code sequence using the
equation:
Code
sequence 2
executes the
instructions
faster.
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.37. 38
m @ Jun 2023 19
SECR2033 Computer Organization & Architecture 07/06/2023
8
(c) The CPI values for each code sequence can be computed by:
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.37. 39
40
m @ Jun 2023 20
SECR2033 Computer Organization & Architecture 07/06/2023
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.38. 41
Patterson, D.A. and Hennessy, J.L. (2014). Computer Organization and Design: The Hardware/Software Interface (5th Edition). United States: Elsevier, p.38. 42
m @ Jun 2023 21
SECR2033 Computer Organization & Architecture 07/06/2023
Module 8
Performance Measurement
and Analysis
8.1 Introduction
8.2 Defining Performance
8.3 Basic Measures of Computer
Performance
8.4 Comparing Performance q Overview
8.5 Benchmarks q Average Performance
8.6 Summary
43
8
Overview
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.453. 44
m @ Jun 2023 22
SECR2033 Computer Organization & Architecture 07/06/2023
8
n In comparing the performance of two systems, we measure the
__________ that it takes for each system to perform the same
amount of work.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.453. 45
46
m @ Jun 2023 23
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 7:
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.453. 47
Car A is _____
times as fast as
8
Solution : Car B.
Car A is ____%
faster than Car B.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.453. 48
m @ Jun 2023 24
SECR2033 Computer Organization & Architecture 07/06/2023
8
Average Performance
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.453. 49
8
(a) The Arithmetic Mean
m @ Jun 2023 25
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 8:
The
performance
differences are
hidden by the
simple average.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.454. 51
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.454-455. 52
m @ Jun 2023 26
SECR2033 Computer Organization & Architecture 07/06/2023
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.454-455. 53
8
n However, workloads can change over time.
Example 10:
System A
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.455. 54
m @ Jun 2023 27
SECR2033 Computer Organization & Architecture 07/06/2023
8
(b) The Geometric Mean
( ___________________________ )
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.456. 55
8
n Unlike the arithmetic means, the geometric mean does not give
us a real expectation of system performance. It serves only as
a tool for comparison.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.456. 56
m @ Jun 2023 28
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 11: System A and System C normalized to System B.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.456. 57
8
n The geometric means for System A and System C normalized to
System B are calculated as follows:
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.456. 58
m @ Jun 2023 29
SECR2033 Computer Organization & Architecture 07/06/2023
8
Example 12: System A and System B normalized to System C.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.457. 59
8
n The geometric means for System A and System B normalized to
System C are calculated as follows:
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.457. 60
m @ Jun 2023 30
SECR2033 Computer Organization & Architecture 07/06/2023
8
... (Properties)
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.457. 61
System à A B C
8
... (Properties)
62
m @ Jun 2023 31
SECR2033 Computer Organization & Architecture 07/06/2023
63
Self-test
8
Get the ratio of the geometric means for system B to A.
64
m @ Jun 2023 32
SECR2033 Computer Organization & Architecture 07/06/2023
8
... (Problem with Geometric Mean)
n The inherent problem with using the geometric mean to
demonstrate machine performance is that all execution times
contribute equally to the result.
n So shortening the execution time of a small program by 10%
has the same effect as shortening the execution time of a large
program by 10%.
n Shorter programs are generally easier to optimize, but in the
real world, we want to shorten the execution time of longer
programs.
66
m @ Jun 2023 33
SECR2033 Computer Organization & Architecture 07/06/2023
Module 8
Performance Measurement
and Analysis
q System Simulation
67
8
Overview
n Good benchmarks:
q enable to cut through advertising hype and statistical tricks.
q identify the systems that provide good performance at the
most reasonable cost.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.461. 68
m @ Jun 2023 34
SECR2033 Computer Organization & Architecture 07/06/2023
8
ISA (Instruction Set Architecture)
MIPS (Millions of Instructions Per Second)
Example 13:
q Saying that System A (1.4 GHz) is faster than System B (900
MHz) is valid only when the ISAs of System A and B are
identical.
q With different ISAs, it is possible that both of these systems
could obtain identical results within the same amount of wall
clock time.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.462. 69
8
FLOPS (Floating-point Operations Per Second)
n The FLOPS metric is even more difficult than the MIPS metric
because there is no agreement as to what constitutes a
floating-point operation.
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.463. 70
m @ Jun 2023 35
SECR2033 Computer Organization & Architecture 07/06/2023
8
(b) Synthetic Benchmarks
(Whetstone, Linpack, Dhrystone)
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.464. 71
8
(c) SPEC Benchmarks
(Standard Performance Evaluation Corporation)
m @ Jun 2023 36
SECR2033 Computer Organization & Architecture 07/06/2023
8
(d) TPC Benchmarks
( ___________________________ )
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.469. 73
8
(e) System Simulation
Linda Null and Julia Lobur (2003). The Essentials of Computer Organization and Architecture. United States: Jones and Bartlett Publishers. p.476. 74
m @ Jun 2023 37
SECR2033 Computer Organization & Architecture 07/06/2023
8.6 Summary 8
q The most well respected of these are the SPEC and TPC
benchmarks.
75
76
m @ Jun 2023 38