Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Performance Computer Engineering Department.

Similar presentations


Presentation on theme: "Computer Performance Computer Engineering Department."— Presentation transcript:

1 Computer Performance Computer Engineering Department

2 What is Performance? Performance can be judged from several perspectives and with several metrics!  Purchasing perspective - given a collection of machines, which has the  best performance?  lowest cost?  best performance/cost ratio?

3  Design perspective - faced with design options, which has the  best performance improvement?  least cost?  best performance improvement/cost of improvement?  Our goal is to understand cost & performance implications of computer architectural choices What is Performance?

4 PlaneDC to ParisSpeedPassengers Throughput (p x mph) Boeing 7476.5 hours610 mph470286,700Airbus 3807.08 hours560 mph555310,800 Which has higher performance – a Boeing 747 or a Airbus 380? Two notions of Performance

5  Time of A380 vs. Boeing 747? A380 is 560 mph / 610 mph =.91 times slower  Throughput of A380 vs. Boeing 747 ? A380 is 310,800 pmph / 286,700 pmph = 1.08 “times faster”  A380 is 8% faster in terms of throughput  Boeing is 9%” faster in terms of flying time

6  Server Performance is units of things-per-second (throughput)  bigger number is better  If we say “X is n times faster than Y it means Performance(X)/Performance(Y) = n  Embedded systems: hard real-time constraint and soft real time constraint  Desktop systems we focus on the execution time for a single job  We are primarily concerned with response time Execution time (X) = ______1_________ Performance (X) - smaller number is better Definitions

7  Relative performance compares one computer vs. another.  Performance A = Execution time B = n Performance B Execution time A  If we look at response time to execute an application and Computer A finishes faster we can say  “Computer A is 3 times faster than Computer B” which means Execution time B = 3 or Performance A = 3 Execution time A Performance B  Or Performance A = 3 (Performance B)  However, one application does not run exclusevly on the CPU… Comparing Performance

8 CPU Performance  The elapsed time or “execution time” groups times needed to perform the application while the CPU is multiplexing between tasks.  The Execution time = CPU time + Access time + Overhead  Example  CPU time is 10 sec for the program + 2 sec system time, and the total elapsed time is 40 sec  then CPU time is 12/40 or 33% of the execution time.  the rest (66%) is spent for Input/Output (I/O) and other programs.

9 CPU Performance  For a hardware designer, the bottom line is CPU time  CPU time = Seconds which can also be written as Program  CPU time = # Clock cycles for a program Clock frequency (GHz)  The #clock cycles for a program depends on its size (how many instructions is has – or Instruction Count ), as well as on the average number of clock cycles it takes to execute a single instruction (or CPI ).

10 Average Cycles Per Instruction  Programs have different kinds of instructions.  Some (like those involving memory access lw, sw) take more cycles to execute.  Others, like add are faster, and take less cycles to execute.  We look at the Instruction Frequency F i = Number of instruction of type i Program Instruction Count  Note – F i is program dependent! (will influence MIPS) Then CPI = Σ CPI i x F i i=1 n

11 CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle instr. count CPIclock rate Program Compiler Instr. Set Arch. Organization Technology CPU Performance

12 CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle CPU time= Seconds= Instructions x Cycles x Seconds Program Program Instruction Cycle instr. count CPIclock rate Program X X Compiler X X Instr. Set X X Arch. Organization X X Technology X CPU Performance

13 Million Instructions Per Second (MIPS)  Another way to measure performance  It is defining speed of execution – faster machines have higher MIPS  We define it as MIPS = Instruction Count x 10 -6 Execution time (sec)  Example Two 5 GHz computers with the same architecture use different compilers. They have Instruction Class CPI i A 2 B 1 C 4

14 Million Instructions Per Second (MIPS) The compilers affect the Instruction Count for each class Code from Instruction Count C i for each Class (10 9 ) A B C Compiler 1 5 1 2 Compiler 2 10 1 2 The # CPU cycles= Σ CPI i x C i (how many in instruction of class i are in the program) So # CPU cycles for Machine 1 = (5x2+1x1+2x4) 10 9 = 19 x10 9 and # CPU cycles for Machine 2 = (10x2+1x1+2x4) 10 9 = 29 x 10 9 The Execution time for Machine 1 = #CPU cycles/clock frequency = (19 x 10 9 )/5 x10 9 = 3.8 sec The Execution time for Machine 2 = (29 x 10 9 )/5x10 9 = 5.8 sec

15 Million Instructions Per Second (MIPS) So Machine 1 has better performance (it takes less time to execute the program). MIPS as measure of performance= Instruction Count x10 -6 Execution time MIPS for Machine “1” = (5+1+2) 10 9 = 2,100 MIPS 3.8 x10 6 MIPS for Machine “2 “= (10+1+2) 10 9 = 2,241 MIPS 5.8 x10 6 So Machine 2 has higher MIPS! – MIPS depends on the Instruction Count (which depends on the compiler) – there will be different MIPS on a single machine – less used these days.

16 The End


Download ppt "Computer Performance Computer Engineering Department."

Similar presentations


Ads by Google