CH 02a-Computer Performance
CH 02a-Computer Performance
CH 02a-Computer Performance
TEST 1
• Decision making
– Which computer system has a better performance?
– Should a company improve its computing facilities?
– Should a company opt for new computer systems or upgrade existing
ones?
– Do we need a new machine, newer application version or new
operating system?
What is computer performance?
• Performance is usually a measure of how well a computer
performs a task.
• CPU time
– Measures only CPU work involving both user and
system time
– User CPU time, e.g. time spent executing codes in
user’s program.
• Elapse time
– Consider all jobs, including input/output disk and
memory accesses, etc
Metrics of computer performance
• Response time / execution time / latency
– a measure of the time period between the start and completion of
a task. E.g. Type ‘A’ on a computer keyboard. How fast does ‘A’
appear on the computer monitor?
– usually concerns computer user
– reduced response time is desirable
– When dealing with disk assess more appropriate to measure in
terms of average response time of the disk access because
• Throughput / bandwidth
– a measure of total amount of work done in a given time.
– normally used when discussing a computing job.
– usually concerns computer system administrators or managers
– increased throughput is desirable
Throughput Vs Response Time
• Do the following changes to a computer system increase
throughput, decrease response time, or both?
• The time for a complete clock cycle the length of a clock period.
1 1
−
Performance ExecTime
ExecTime ExecTime
X = Y =n= X Y 100
Performance ExecTime 1
Y X ExecTime
Y
• Speed-up
1
=
fraction _ enhanced
(1 − fraction _ enhanced ) +
speedup _ enhanced
Computer Performance Over Program
Execution
where
Ci = no of type i instruction,
CPIi = average no of clock cycles for instruction type i
n = total no of instructions
Millions Instructions per Second (MIPS)
No instructions frequency
MIPS rate = =
ExecTime * 106 CPI *106
Normally the second equation is used because a machine has fixed
clock rate.
Faster machines normally have higher MIPS rating, but this is not
always true as MIPS can sometimes vary inversely to performance.
How? For example, a program involving floating-point instructions
using software routines takes more time to execute than one using
optional hardware due to larger CPI, but has higher MIPS rating due
to simpler software instructions.
Conclusion: Computer Program Performance
• Different application are sensitive to different aspects of computer performance. Also,
applications running on servers depend much on the I/O performance relies on both
h/w and s/w. This means total elapsed time measurement is of interest.
• Execution time depends on how many instructions there are in a program, how many
clock cycles needed to execute certain instruction, and how clock cycles per second.
Ans:
Using performance ratio,
Perf A / Perf B = n
Perf A = 4 * Perf B
i/Exec A = 4 / Exec B
Exec B = 4 * Exec A
Exec A = 28s / 4
Exec A = 7s #
Self-test exercise 2:
Program Execution time
Program Computer A Computer B
1 2s 4s
2 5s 2s