0% found this document useful (0 votes)
63 views13 pages

COMPORGA - Module 2

This document discusses computer performance and factors that affect it. It defines several key performance metrics including: - CPU time, which measures how long the CPU spends processing instructions - Clock cycles per instruction (CPI), which measures the average number of clock cycles needed per instruction - Million instructions per second (MIPS), which measures the number of instructions a CPU can process in one second. The document provides examples of calculating these performance metrics based on information like clock rate, number of instructions, and number of clock cycles needed for different instruction types. It aims to help understand how to measure and evaluate computer performance.

Uploaded by

Happy Feet
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)
63 views13 pages

COMPORGA - Module 2

This document discusses computer performance and factors that affect it. It defines several key performance metrics including: - CPU time, which measures how long the CPU spends processing instructions - Clock cycles per instruction (CPI), which measures the average number of clock cycles needed per instruction - Million instructions per second (MIPS), which measures the number of instructions a CPU can process in one second. The document provides examples of calculating these performance metrics based on information like clock rate, number of instructions, and number of clock cycles needed for different instruction types. It aims to help understand how to measure and evaluate computer performance.

Uploaded by

Happy Feet
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/ 13

CEA - Computer Engineering

COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

MODULE 2: COMPUTER
PERFORMANCE
TOPIC: Learning Objective
• In this module, we will discuss the important issue of ● To factors affecting
assessing the performance of a computer. In
computer performance
particular, we focus our discussion on a number of
performances. ● To understand factors
influencing the Success of
MODULE STRUCTURE: Computer Architecture
Design
I. Computer Performance
a. Factors Affecting Computer Performance ● To compute computer
b. Computer Performance Parameters/Measures performance
i. Relative Performance
ii. CPU time Resources Needed
iii. Clock Cycles Per Instruction
● Access to the Internet
iv. Million Instruction Per Second
v. Million floating-point instructions-per-second ● Computer or mobile
vi. Amdhal’s Law device
c. Measuring Performance Tool
d. Factors Influencing the Success of Computer
architecture

1
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

I. COMPUTER PERFORMANCE

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?

Computer performance can be described based on user type

• User: Interested in reducing the execution time (response time) of a task.


• Computer center administrator: The computer center manager may say a
computer is faster when it completes more jobs in an hour

a. Factors Affecting Computer Performance


1. The Speed of the CPU
- The speed of the CPU is also known as the clock speed of the CPU.
- The clock speed of the CPU is the frequency of which the processor
executes instructions or the frequency by which data is processed by the
CPU.
- It is measured in millions of cycles per second or megahertz (MHz)
1MHz = 1million cycle/sec

2. The Size of the RAM


- RAM has the capability of storing data that the computer is currently using
- Large RAM size will mean a faster computer performance

3. The Speed of the Hard Disk


- The hard disk speed is defined as the rate at which material and content
can be read and written on it
- The higher the speed of the hard disk the faster the performance of the
computer

4. The Space of the Hard Disk


- The bigger the space on the hard disk will result to faster performance of the
computer.
- The hard disk is filled with data this will use most of the memory leaving less
memory for the operations of the processor

5. Multiple Application Running on the Computer


- Multi-tasking tends to slow down the performance of the computer

2
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

- This means that the more applications that are running the slower the
computer will perform.

6. Type of Graphic Card


- quality of pictures and animations
- if a machine processes many graphics with weak graphic card it will
perform slower.
- the more powerful the graphic card is the faster the performance of the
computer.

7. Defragmenting Files
• Files that are broken or it takes long to read them will mean that the
computer will have to defragment them first.

b. Computer Performance Parameters/Measures


• TIME is the measure of computer performance
– The computer that performs the same amount of work in the least time is the
fastest.
– Program execution time is measured in seconds per program

But, since with multiprogramming the CPU works on another program while
waiting for I/O…

CPUtime - the time CPU is computing (not including extra-time; e.g. time waiting
for I/O or running other programs)

• LATENCY/RESPONSE TIME (clocks from input to corresponding output)


- How long does it take for my program to run?
- How long must I wait after typing return for the result?
- The sooner the better
• THROUGHPUT (How many results per clock)
- How many results can be processed per second?
- What is the average execution rate of my program?
- How much work is getting done?
- The more the better

If we upgrade a machine with a new processor what do we improve?


If we add a new machine to the lab what do we increase?

3
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

i. Relative Performance
- compare computer performances

Ex. If machine A runs a program in 10 seconds and machine B runs the same
program in 15 seconds. How many times machine A faster than machine B?

Ex. Machine x runs a program in 20 seconds. Its relative performance towards


machine y is .67. What can you conclude about the performance of machine
x to machine y?

4
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

ii. CPU time

CPU TIME is the measurement of the length of time that data is being worked on
by the processor. It used as an indicator of how much processing is required for
a process or how CPU intensive a process or program is.
Clock Rate (Clock Frequency)
- The speed at which a microprocessor executes instructions
- usually measured in MHz (megahertz, or millions of pulses per second) or GHz
(gigahertz, or billions of pulses per second).
Clock Cycle Time (Clock Period)
- Time CPU spend per cycle

Cycle Count
- Number of cycles in one instruction

EX. CPU clock rate is 1 Megahertz. Program takes 4.5 million cycles to execute.
Compute for the CPU Clock Cycle Time and CPU time?

Other Solution:

EX. CPU clock frequency is 500 MHz. Program takes 45 million cycles to execute.
What’s the CPU time?

5
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

EX. Consider having a program that runs in 50 s on computer A, which has a 500
MHz clock. We would like to run the same program on another machine, B, in 20
s. If machine B requires 2.5 times as many clock cycles as machine A for the
same program, what clock rate must machine B have in MHz?

iii. Clock Cycles Per Instruction (CPI)

CPI = average clock cycles per instruction


- CPI is an average of all the instructions executed in a program
- CPI is useful in comparing two different implementations of the same
architecture

EX. A benchmark has 100 instructions:


– 25 instructions are loads/stores (each takes 2 cycles)
– 50 instructions are adds (each takes 1 cycle)
– 25 instructions are square root (each takes 5 cycles)

Solve the CPI

6
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

Solve the CPUTime if the clock rate is 5Mhz

iv. Million Instruction Per Second (MIPS)


- rate of instruction execution per unit time

EX. Suppose that a set of benchmark programs with a total of 200 instruction
and a clock rate of 200MHz has the following measures:

Step 1: Get the specific no. of instruction per category

Step 2: Get the CPI

Step 3: Solve for MIPS

7
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

MIPS can be used to as a performance measure but not enough to be used in


to compare machines having different instruction sets

EX.

8
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

v. Million floating-point instructions-per-second (MFLOPs)

- measure of the speed of computers used to perform floating-point


calculation
- cannot be generalized to provide a single performance metric

vi. Amdhal’s Law

- formula which gives the theoretical speedup in latency of the execution


of a task at a fixed workload that can be expected of a system whose
resources are improved
- formula used to find the maximum improvement possible by just
improving a particular part of a system
- named after computer scientist Gene Amdahl(a computer architect from
IBM and Amdahl corporation)

Speedup – a measure of how a machine performs after enhancement relative to


its original performance

Fraction enhanced – The fraction of the computation time in the original


computer that can be converted to take advantage of the enhancement.

For example- if 10 seconds of the execution time of a program that takes


40 seconds in total can use an enhancement, the fraction is 10/40. This obtained
value is Fraction Enhanced.

Fraction enhanced is always less than 1.

Speedup enhanced – The improvement gained by the enhanced execution


mode; that is, how much faster the task would run if the enhanced mode were
used for the entire program.

9
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

For example – If the enhanced mode takes, say 3 seconds for a portion of
the program, while it is 6 seconds in the original mode, the improvement is 6/3.
This value is Speedup enhanced.

Speedup Enhanced is always greater than 1.

c. Measuring Performance Tool

PC performance monitoring software

- Monitoring the performance of a systems and its processes is essential to


debug processes, effectively manage system resources, making system
decisions, and evaluating and examining systems

10
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

WINDOWS TASK MANAGER PERFORMACE TOOL

- basic monitoring tools from windows

SPECCY

- developed by Piriform
- focuses on CPU and GPU
temperature
- Compatible in most computer
sensors
- Open-source

OPEN HARDWARE MONITOR


- monitors temperature sensors,
fan speeds, voltages, load and
clock speeds of a computer.
- Plain and simple interface
- Open-source

11
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

CPU-Z

- scans system for internal hardware configurations


- Prevents compatibility issues on the system

• MONITY (MAC)

- General system monitoring in the Notification Center


- Monitors systems stats, memory, battery, and disk usage
- Data is easily accessible from anywhere in OS X
- Easy to rearrange panels and customize the appearance
- Detailed space usage for each disk
- Battery information for Bluetooth devices
- Detailed breakdown of memory usage

12
CEA - Computer Engineering
COMPORGA – COMPUTER ORGANIZATION AND ARCHITECTURE

d. Factors Influencing the Success of Computer architecture


• Reliability - A system A always outperforms a system B ⇔ the performance
metric indicates that A always outperforms B.
• Repeatability - The same value of the metric is measured each time the
same experiments is performed.
• Consistency - Units of the metrics and its precise definition are the same
across different systems and different configurations of the same system.
• Linearity - the value of the metric should be linearly proportional to the
actual performance of the machine.
• Easiness of measurement - If a metric is hard to measure, it is unlikely anyone
will actually use it. Moreover, it is more likely to be incorrectly determined.
Independence - Metrics should not be defined to favor particular systems

Task 2.1 Computer Performance

Solve the following: (Show complete solution, box your final answer)

1. If machine A runs a program in 20 seconds and machine B runs the same


program in 25 seconds. Find the relative performance of the two machines in
percentage?
2. CPU clock rate is 2 gigahertz. Program takes 500 million cycles to execute.
Compute for the CPU Clock Cycle Time and CPU time?
3. Suppose a program (or a program task) takes 1 billion instructions to execute on
a processor running at 2 GHz. Suppose also that 50% of the instructions execute
in 3 clock cycles, 30% execute in 4 clock cycles, and 20% execute in 5 clock
cycles. What is the CPI and CPU time for the program?
4. Suppose we have two implementations:
Machine A has a clock cycle time of 10 ns. and a CPI of 2.0. Machine B has a
clock cycle time of 20 ns. and a CPI of 1.2. Which machine is faster for this
program, and by how much in percentage?
5. Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600MHz.
Computer B has a CPI of 2.5 and can be run at a clock rate of 750 Mhz. We
have a particular program we wish to run. When compiled for computer A, this
program has exactly 100,000 instructions. How many instructions would the
program need to have when compiled for Computer B, in order for the two
computers to have exactly the same execution time for this program?

13

You might also like