Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos.

Similar presentations


Presentation on theme: "CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos."— Presentation transcript:

1 CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos

2 CSCE 212 2 Measuring Performance Basic problem: how can we tell if one processor is faster than another? Execution time is analogous to performance Execution time (per processor core) =

3 CSCE 212 3 Example A program runs in 10 seconds on computer A, which has a 4 GHz clock. We are designing computer B that must run the program in 6 seconds. We can increase clock rate but the computer will require 1.2 times as many clock cycles. What clock rate should be target for computer B?

4 CSCE 212 4 Performance Factors Execution time = instructions per program * cycles per instruction * seconds per cycle Problems: –Cycles per instruction depends on many factors i.e. instruction mix, I/O, memory Performance factors: –Algorithm  instruction count, CPI –Programming language  instruction count, CPI –Compiler  instruction count, CPI –ISA  instruction count, clock rate, CPI

5 CSCE 212 5 Performance Measures CPI = cycles per instruction –CPI provides one way of comparing two different implementations of the same instruction set architecture –CPI is tricky! Instructions from the same ISA require different number of cycles Depends on program Memory behavior affects CPI –CPI is usually defined for a particular program on a particular CPU

6 CSCE 212 6 CPI instruction class ABC CPI123 Code sequenceInstruction counts ABC 1212 2411

7 CSCE 212 7 Example Suppose we have two implementations of the same ISA. Computer A has a cycle time of 250 ps and a CPI of 2.0 for some program, and computer B has a clock cycle time of 500 ps and a CPI of 1.2 for the same program. Which computer is faster and by how much?

8 CSCE 212 8 Performance Measures Program execution time vs CPU execution time –Must account for other programs and I/O –User CPU time –CPU time spent executing a program System CPU time –Amount of CPU time the operating system spends on behalf of a program –Ex. system calls, such as I/O, synchronization, etc.

9 CSCE 212 9 Relative Performance Computer AComputer B Program 1 (seconds)110 Program 2 (seconds)1000100 Solutions: –Total execution time –Arithmetic mean –Weight arithmetic mean (based on workload for each program)

10 CSCE 212 10 MIPS Instructions per second MIPS is problematic –Does not take into account the capabilities of the instructions –MIPS varies between programs on the same computer! Depends on average CPI of the instruction mix –MIPS can vary inversely with performance

11 CSCE 212 11 Benchmarks Set of programs that are used to evaluate a machine’s performance SPEC CPU 2000 suite –12 integer and 14 floating-point –Measured as speedup relative to Sun Ultra 5_10@300 MHz –CINT2000 and CFP2000 is geometric mean of ratios

12 CSCE 212 12 Amdahl’s Law Basic idea: improve the common case Example: –Program runs in 100 s, multiplies accord for 80 s –I want a 5X overall speedup


Download ppt "CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos."

Similar presentations


Ads by Google