Comp Org Notes On Measuring Cpu Performance
Comp Org Notes On Measuring Cpu Performance
CPU PERFORMANCE
Computer Performance
Involves:
Short response time
High throughput (rate of processing
work)
Low utilization of computing resource(s)
High availability of the computing system
or application
Fast (or highly compact) data Computer Performance
compression and decompression
High bandwidth
Short data transmission time
Performance Factors
Latency: response time, execution time
o Good metrics for fixed amount of
work (minimize time)
Throughput: bandwidth, work per time
o Good metrics for fixed amount of To related the performance between two
time (maximize work) computers
quantitatively:
CPU Performance Equation
=25/10 = 2.5
Terms:
Clock cycle time (seconds per cycle)
Clock rate (cycles per second)
CPI (cycles per instruction) same # of instructions in the program.
CPU Time
Time for CPU to perform a task
Does not include waiting time (for IO) or
other programs
2 Divisions of CPU Time
1. User CPU Time–CPU time spent in Clock rate depends on the CPU Organization
the program design and the hardware implementation of
2. System CPU Time –CPU time spent VLSI
A computer machine instruction is composed
in the OS performing task in
of micro operations.
behalf of the program
Micro operation is a hardware operation
CPU Time Computation performed during one CPU clock cycle
Time to execute a given program: Examples: Register operations: shift, load,
o CPU time = CPU clock cycles x clock clear, increment
cycle time Operations: add, subtract, div,
since cycle time = 1/ clock rate mul
o CPU time = CPU clock cycles / clock
rate CPI Computation
CPI –average number of cycles per
CPU Time instruction
Each instruction type has it frequency
and number of cycles needed for its
execution
To compute for CPI:
CPI = ∑ CPI x Frequency
Example:
Example:
1. What is the CPU time if the CPU clock
rate is 1MHz and the time to execute the
program is 45,000,000 cycle?
Example:
CPU time = CPU clock cycles / clock rate Given: Benchmark has 100 instructions where:
= 45,000,000 / 1,000,000 = 45 25 instructions are loads/stores (each
seconds take 2 cycles)
50 instructions are adds (each takes 1
cycle)
2. Assume that 2 computers use the same
25 instructions are square root (each
ISA. Computer A has a clock cycle rate of takes 50 cycles)
Formula:
MIPS
PB/PB = TB/TA
TB = (9.5x106 x 3.0) / 300 x 106
TB = 0.095
TA (form problem A) = 0.125 seconds
MFLOP PB/PA = TA/TB = 0.125 / 0.095 = 1.32
MIPS RATING
Example Problems: