Datorteknik PerformanceAnalyse bild 1 Performance Performance – what is it: measures of performance The CPU Performance Equation: – Execution time as the measure – what affects execution time – examples Choosing good benchmarks? – choosing bad benchmarks? Amdahl's Law
38
Embed
Datorteknik PerformanceAnalyse bild 1 Performance –what is it: measures of performance The CPU Performance Equation: –Execution time as the measure –what.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Datorteknik PerformanceAnalyse bild 1
Performance Performance
– what is it: measures of performance
The CPU Performance Equation:– Execution time as the measure
– what affects execution time
– examples
Choosing good benchmarks?– choosing bad benchmarks?
Amdahl's Law
Datorteknik PerformanceAnalyse bild 2
Performance is Time
Time to do the task (Execution Time)– execution time, response time, latency
Tasks per unit time (sec, minute, ...)– throughput, bandwidth
Datorteknik PerformanceAnalyse bild 3
Performance as Response Time
Performance is most often measured as response time or execution time for some task.
“X is n times faster than Y” means
Performance(X) Execution Time(Y)
–––––––––––––– = –––––––––––––––– = n
Performance(Y) Execution Time(X)
ExampleExecution time of program P
X is 5 sec; Y is 10 sec.
X is 2 times faster than Y.
Datorteknik PerformanceAnalyse bild 4
What time to measure? Elapsed time, wall-clock time:
– actual time from start to completion
– depends on CPU, system, I/O, etc.
– often used in real benchmarks
– only suitable choice when I/O is included
CPU Time:– measure/analyze CPU performance only
– may be suitable when machine is timeshared
– possibly both user and system component
– User CPU time is our focus for first part of course
Elapsed time = CPU time + Idle time– usually and assuming time is accurately accounted for
Datorteknik PerformanceAnalyse bild 5
Metrics of performance Different performance metrics are appropriate at
different levels:
Compiler
LanguageProgramming
Application
DatapathControl
Function UnitsTransistors
ISA
Frames per secondOperations per second
(millions) of Instructions per second – MIPS(millions) of (F.P.) operations per second – MFLOP/s
Cycles per second (clock rate)
Cycles per Instruction
Datorteknik PerformanceAnalyse bild 6
Relating Processor Metrics CPU execution time per program
= CPU clock cycles/program X Clock cycle time
= CPU clock cycles/program ÷ Clock rate (frequency)
CPU clock cycles/program= Instructions/program X Clock cycles Per Instruction
Clock cycles Per Instruction (CPI) is an average measurement, it depends on :
– ISA, the implementation, and the program measured
– CPI = CPU clock cycles/program ÷ Instructions/program
– Also, Instructions per clock cycle or IPC = 1 / CPI
CPU execution time = Instructions X CPI X Clock cycle