0% found this document useful (0 votes)
5 views5 pages

Performance Measures

The document discusses performance measures for assessing computer systems, focusing on metrics such as CPU time, clock cycles, and instructions per cycle (CPI). It highlights the importance of understanding different performance metrics like MIPS and MFLOPS, and their implications for comparing computer performance. Additionally, it introduces Amdahl's law for evaluating speedup due to enhancements in performance.

Uploaded by

DOMINIC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Performance Measures

The document discusses performance measures for assessing computer systems, focusing on metrics such as CPU time, clock cycles, and instructions per cycle (CPI). It highlights the importance of understanding different performance metrics like MIPS and MFLOPS, and their implications for comparing computer performance. Additionally, it introduces Amdahl's law for evaluating speedup due to enhancements in performance.

Uploaded by

DOMINIC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

PDF Studio - PDF Editor for Mac, Windows, Linux. For Evaluation. https://www.qoppa.

com/pdfstudio

6 INTRODUCTION TO COMPUTER SYSTEMS

which in turn has led to a number of developments. Among these is the increase in
the number of devices in RAM memories, which in turn helps designers to trade off
memory size for speed. The improvement in the feature size provides golden oppor-
tunities for introducing improved design styles.

1.4. PERFORMANCE MEASURES

In this section, we consider the important issue of assessing the performance of a


computer. In particular, we focus our discussion on a number of performance
measures that are used to assess computers. Let us admit at the outset that there
are various facets to the performance of a computer. For example, a user of a
computer measures its performance based on the time taken to execute a given
job (program). On the other hand, a laboratory engineer measures the performance
of his system by the total amount of work done in a given time. While the user
considers the program execution time a measure for performance, the laboratory
engineer considers the throughput a more important measure for performance. A
metric for assessing the performance of a computer helps comparing alternative
designs.
Performance analysis should help answering questions such as how fast can a
program be executed using a given computer? In order to answer such a question,
we need to determine the time taken by a computer to execute a given job. We
define the clock cycle time as the time between two consecutive rising (trailing)
edges of a periodic clock signal (Fig. 1.1). Clock cycles allow counting unit compu-
tations, because the storage of computation results is synchronized with rising (trail-
ing) clock edges. The time required to execute a job by a computer is often expressed
in terms of clock cycles.
We denote the number of CPU clock cycles for executing a job to be the cycle
count (CC), the cycle time by CT, and the clock frequency by f ¼ 1/CT. The
time taken by the CPU to execute a job can be expressed as

CPU time ¼ CC  CT ¼ CC=f

It may be easier to count the number of instructions executed in a given program as


compared to counting the number of CPU clock cycles needed for executing that

Figure 1.1 Clock signal


PDF Studio - PDF Editor for Mac, Windows, Linux. For Evaluation. https://www.qoppa.com/pdfstudio

1.4. PERFORMANCE MEASURES 7

program. Therefore, the average number of clock cycles per instruction (CPI) has
been used as an alternate performance measure. The following equation shows
how to compute the CPI.

CPU clock cycles for the program


CPI ¼
Instruction count

CPU time ¼ Instruction count  CPI  Clock cycle time

Instruction count  CPI


¼
Clock rate

It is known that the instruction set of a given machine consists of a number of


instruction categories: ALU (simple assignment and arithmetic and logic instruc-
tions), load, store, branch, and so on. In the case that the CPI for each instruction
category is known, the overall CPI can be computed as
Pn
CPIi  Ii
CPI ¼ i¼1
Instruction count

where Ii is the number of times an instruction of type i is executed in the program and
CPIi is the average number of clock cycles needed to execute such instruction.

Example Consider computing the overall CPI for a machine A for which the
following performance measures were recorded when executing a set of benchmark
programs. Assume that the clock rate of the CPU is 200 MHz.

Instruction Percentage of No. of cycles


category occurrence per instruction
ALU 38 1
Load & store 15 3
Branch 42 4
Others 5 5

Assuming the execution of 100 instructions, the overall CPI can be computed as
Pn
CPIi  Ii 38  1 þ 15  3 þ 42  4 þ 5  5
CPIa ¼ i¼1
¼ ¼ 2:76
Instruction count 100

It should be noted that the CPI reflects the organization and the instruction set archi-
tecture of the processor while the instruction count reflects the instruction set archi-
tecture and compiler technology used. This shows the degree of interdependence
between the two performance parameters. Therefore, it is imperative that both the
PDF Studio - PDF Editor for Mac, Windows, Linux. For Evaluation. https://www.qoppa.com/pdfstudio

8 INTRODUCTION TO COMPUTER SYSTEMS

CPI and the instruction count are considered in assessing the merits of a given
computer or equivalently in comparing the performance of two machines.
A different performance measure that has been given a lot of attention in recent
years is MIPS (million instructions-per-second (the rate of instruction execution
per unit time)), which is defined as

Instruction count Clock rate


MIPS ¼ ¼
Execution time  106 CPI  106

Example Suppose that the same set of benchmark programs considered above
were executed on another machine, call it machine B, for which the following
measures were recorded.

Instruction Percentage of No. of cycles


category occurrence per instruction
ALU 35 1
Load & store 30 2
Branch 15 3
Others 20 5

What is the MIPS rating for the machine considered in the previous example
(machine A) and machine B assuming a clock rate of 200 MHz?

Pn
i¼1 CPIi  Ii 38  1 þ 15  3 þ 42  4 þ 5  5
CPIa ¼ ¼ ¼ 2:76
Instruction count 100

Clock rate 200  106


MIPSa ¼ ¼ ¼ 70:24
CPIa  106 2:76  106
Pn
CPIi  Ii 35  1 þ 30  2 þ 20  5 þ 15  3
CPIb ¼ i¼1
¼ ¼ 2:4
Instruction count 100

Clock rate 200  106


MIPSb ¼ ¼ ¼ 83:67
CPIa  106 2:4  106

Thus MIPSb . MIPSa .


It is interesting to note here that although MIPS has been used as a performance
measure for machines, one has to be careful in using it to compare machines
having different instruction sets. This is because MIPS does not track execution
time. Consider, for example, the following measurement made on two different
machines running a given set of benchmark programs.
PDF Studio - PDF Editor for Mac, Windows, Linux. For Evaluation. https://www.qoppa.com/pdfstudio

1.4. PERFORMANCE MEASURES 9

No. of No. of
Instruction instructions cycles per
category (in millions) instruction
Machine (A)
ALU 8 1
Load & store 4 3
Branch 2 4
Others 4 3
Machine (B)
ALU 10 1
Load & store 8 2
Branch 2 4
Others 4 3

Pn
CPIi  Ii (8  1 þ 4  3 þ 4  3 þ 2  4)  106
CPIa ¼ i¼1
¼ ffi 2:2
Instruction count (8 þ 4 þ 4 þ 2)  106

Clock rate 200  106


MIPSa ¼ ¼ ffi 90:9
CPIa  106 2:2  106

Instruction count  CPIa 18  106  2:2


CPUa ¼ ¼ ¼ 0:198 s
Clock rate 200  106
Pn
i¼1 CPIi  Ii (10  1 þ 8  2 þ 4  4 þ 2  4)  106
CPIb ¼ ¼ ¼ 2:1
Instruction count (10 þ 8 þ 4 þ 2)  106

Clock rate 200  106


MIPSb ¼ ¼ ¼ 95:2
CPIa  106 2:1  106

Instruction count  CPIa 20  106  2:1


CPUb ¼ ¼ ¼ 0:21 s
Clock rate 200  106

MIPSb . MIPSa and CPUb . CPUa

The example shows that although machine B has a higher MIPS compared to
machine A, it requires longer CPU time to execute the same set of benchmark
programs.
Million floating-point instructions per second, MFLOP (rate of floating-point
instruction execution per unit time) has also been used as a measure for machines’
performance. It is defined as

Number of floating-point operations in a program


MFLOPS ¼
Execution time  106
PDF Studio - PDF Editor for Mac, Windows, Linux. For Evaluation. https://www.qoppa.com/pdfstudio

10 INTRODUCTION TO COMPUTER SYSTEMS

While MIPS measures the rate of average instructions, MFLOPS is only defined for
the subset of floating-point instructions. An argument against MFLOPS is the fact
that the set of floating-point operations may not be consistent across machines
and therefore the actual floating-point operations will vary from machine to
machine. Yet another argument is the fact that the performance of a machine for
a given program as measured by MFLOPS cannot be generalized to provide a
single performance metric for that machine.
The performance of a machine regarding one particular program might not be
interesting to a broad audience. The use of arithmetic and geometric means are
the most popular ways to summarize performance regarding larger sets of programs
(e.g., benchmark suites). These are defined below.

1X n
Arithmetic mean ¼ Execution timei
n i¼1
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
n
Yn
Geometric mean ¼ Execution timei
i¼1

where execution timei is the execution time for the ith program and n is the total
number of programs in the set of benchmarks.
The following table shows an example for computing these metrics.

CPU time on CPU time on


Item computer A (s) computer B (s)
Program 1 50 10
Program 2 500 100
Program 3 5000 1000
Arithmetic mean 1835 370
Geometric mean 500 100

We conclude our coverage in this section with a discussion on what is known as the
Amdahl’s law for speedup (SUo) due to enhancement. In this case, we consider
speedup as a measure of how a machine performs after some enhancement relative
to its original performance. The following relationship formulates Amdahl’s law.

Performance after enhancement


SUo ¼
Performance before enhancement
Execution time before enhancement
Speedup ¼
Execution time after enhancement

Consider, for example, a possible enhancement to a machine that will reduce the
execution time for some benchmarks from 25 s to 15 s. We say that the speedup
resulting from such reduction is SUo ¼ 25=15 ¼ 1:67.

You might also like