Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 2: Measuring Performance Topics: 1. Performance:

Similar presentations


Presentation on theme: "CSE2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 2: Measuring Performance Topics: 1. Performance:"— Presentation transcript:

1 CSE2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 2: Measuring Performance Topics: 1. Performance: Definition 2. Performance Metrics: CPU Execution Time and Throughput 3. Benchmarks: SPEC’95 4. Alternative Performance Metrics: MIPS and FLOPS Patterson: Sections 1.4 – 1.9.

2 2 Analogy with Commercial Airplanes — To know which of the four planes exhibits the best performance, we need to define a criteria for measuring “performance”. Performance Criteria:Winner: SpeedBAC/Scud Concorde CapacityBoeing 747 RangeDouglas DC-8-50 ThroughputAirbus A3xx Airplane Passenger Capacity Cruising range (miles) Cruising speed (mph) Passenger throughput (passengers × mph) Boeing 7773754630610 375 × 610 = 228,750 Boeing 7474704150610 470 × 610 = 286,700 BAC/Scud Concorde13240001350 132 × 1350 = 178,200 Douglas DC-8-501468720544146 × 544 = 79,424 What does it mean do say that one computer is better than another?

3 3 Computer Performance (1) — Performance of a computer is based on the following criteria: 1.Response/Execution Time: Elapsed time between the start and the end of one task. 2.Throughput: Total number of tasks finished in a given interval of time. — An IT manager will be interested in having a higher overall throughput while a computer user will like to have a lower execution time for his task. — Using execution time as the criteria, the performance of a machine X is defined as — Performance ratio (n) between two machines X and Y is defined as

4 4 Computer Performance (2) Activity 1: If machine X runs a program in 30 seconds and machine Y runs the same program in 45 seconds, how much faster is X than Y? Activity 2: Discuss which of the following two options is suited to enhance performance from a user’s perspective: (a) Upgrading a machine to a faster CPU (b) Adding additional processors to the machine s.t. multiple processors are used for different tasks. Repeat for an IT manager?

5 5 What is Execution Time (1)? 1.Elapsed Time/Response Time/Wall Clock Time: is defined as the clock time it takes from the start to the end of a program or a task — Since computer is a timeshared machine (running several programs simultaneously), the elapsed time will be dependent on the number and complexity of other programs running on the machine. 2.CPU Time: is the execution time that the CPU spends on completing a task — CPU time does not include time spent on running other programs or waiting for the I/O to become free. — CPU time can be further broken down into: (a) User CPU time: CPU time spent to execute the measured program (b) System CPU time: CPU time spent in the operating system performing tasks on behalf of the measured program 3.Command time in Unix can be used to determine the elapsed time and CPU time for a particular program Syntax: time Result:

6 6 What is Execution Time (2)? 4.Performance based on User CPU time is called the CPU performance 5.Performance based on System time is called the system performance 6.Vendors specify the speed of a computer in terms of clock cycles. For example, a 1GHz Pentium is generally believed to be faster than a 500MHz Pentium. We define the clock cycles formally next. Multiples defined:

7 7 Clock (1) — All events in a computer are synchronized to the clock signal — Clock signal is therefore received by every HW component in a computer — Clock cycle time: is defined as the duration of 1 cycle of the clock signal — Clock cycle rate: is the inverse of the clock cycle time. — CPU execution time is therefore defined as Binary 0 Binary 1 Leading edge 1 cycle Trailing edge Clock Signal

8 8 Clock (2) — Timing Programs generally return the average number of clock cycle needed per instruction (denoted by CPI) Activity 3: For a CPU, instructions from a high-level language are classified in 3 classes Two SW implementations with the following instruction counts are being considered Which implementation executes the higher number of instructions? Which runs faster? What is the CPI count for each implementation? Instruction ClassABC CPI for the instruction class123 Instruction counts per instruction class ABC Implementation 1212 Implementation 2411

9 9 Performance Comparison (1) To compare performance between two computers, 1.Select a set of programs that represent the workload 2.Run these programs on each computer 3.Compare the average execution time of each computer 4.At time the geometric mean is used. Activity 4: Based on the arithmetic and geometric means execution time, which of the two computer is faster? Execution TimeComputer AComputer B Program 1210 Program 2100105 Program 31000100 Program 42575

10 10 Performance Comparison: Benchmarks (2) — Benchmarks: are standard programs chosen to compare performance between different computers. — Benchmarks are generally chosen from the applications that a user would typically use the computer to execute. — Benchmarks can be classified in three categories: 1.Real applications reflecting the expected workload, e.g., multimedia, computer visualization, database, or macromedia director applications 2.Small benchmarks are specialized code segments with a mixture of different types of instructions 3.Benchmark suites containing a standard set of real programs and applications. A commonly used suite is SPEC (System Performance Evaluation Cooperative) with different versions available, e.g., SPEC89, SPEC’92, SPEC’95, SPEChpc96, SPEC CPU2006 and SPECINTC2006 suites.

11 11 Performance Comparison: SPEC Suite (2) — SPEC’95 suite has a total of 18 programs (integer and floating point). However, SPEC CPU2000 has a total of 32 programs — SPEC ratio for a program is defined as the ratio of the execution time of the program on a Sun Ultra 5/10(300 MHz processor) to the execution time on the measured machine. — CINT2000 is the geometric mean of the SPEC ratios obtained from the integer programs. The geometric mean is defined as — CFP2000 is the geometric mean of the SPEC ratios from the floating-point programs Activity 5: Complete the following table to predict the performance of machines A and B Time on A (seconds) Time on B (seconds) Normalized to ANormalized to B ABAB Program 1525 Program 212525 Arithmetic Mean Geometric Mean

12 12 Performance Comparison: CINT2006 for Opteron X4 2356 (3) NameDescriptionInstruct. Count ×10 9 CPIClock Cycle time (ns) Exec time (s) Reference time (s) SPECratio = Ref. time / Ex. time perlInterpreted string processing2,1180.750.406379,77715.3 bzip2Block-sorting compression2,3890.850.408179,65011.8 gccGNU C Compiler1,0501.720.47248,05011.1 mcfCombinatorial optimization33610.000.401,3459,1206.8 goGo game (AI)1,6581.090.4072110,49014.6 hmmerSearch gene sequence2,7830.800.408909,33010.5 sjengChess game (AI)2,1760.960.483712,10014.5 libquantumQuantum computer simulation1,6231.610.401,04720,72019.8 h264avcVideo compression3,1020.800.4099322,13022.3 omnetppDiscrete event simulation5872.940.406906,2509.1 astarGames/path finding1,0821.790.407737,0209.1 xalancbmkXML parsing1,0582.700.401,1436,9006.0 Geometric mean11.7 High cache miss rates

13 13 Improving Performance Performance of a CPU can be improved by: 1.Increasing the clock rate (decreasing the clock cycle time) 2.Enhancements in the Compiler to decrease the instruction count in a program 3.Improvement in the CPU to decrease the clock cycle per instruction (CPI) Unfortunately factors (1 – 3) are not independent. For example, if you increase the clock frequency then the CPI may also increase.

14 14 Power Trends (1) — One way of enhancing performance is to increase clock rate (implying a reduction in clock cycle time). — A consequence of increasing clock rate is an increase in power dissipation.

15 15 Power Trends (2) — Dynamic power dissipation is computed from the expression — In the previous figure, note that when clock rates have increased by a factor of 1000 (25 to 2667), the power dissipation only increased by a factor of 20 (4.9 to 95). — The above is largely a consequence of the operating voltage in CMOS technology going down from 5V to 1V. Activity: What is the impact on dynamic power dissipation if a new processor reduces the capacitive load, voltage, and clock frequency all by a factor of 15%?

16 16 Uniprocessor Performance Constrained by power, instruction-level parallelism, memory latency

17 17 SPEC Power Benchmark — SPECpower reports power consumption of servers at different workloads, divided by 10% increments, over a period of time. Target Load %Perform. (ssj_ops/sec)Average Power (Watts) 100%231,867295 90%211,282286 80%185,803275 70%163,427265 60%140,160256 50%118,324246 40%920,35233 30%70,500222 20%47,126206 10%23,066180 0%0141 Overall sum1,283,5902,605 ∑ssj_ops/ ∑power493

18 18 PITFALL: Amdahl’s Law (1)  Improving an aspect of a computer and expecting a proportional improvement in overall performance  Suppose a program runs in 100s on a computer with multiply operations responsible for 80% of the time. How much should the speed of multiplication be improved to make the program run twice faster? Five times faster? Solution: For 2 times faster, the speed of multiplication should be improved by a factor of 8/3. Five times faster is not possible.

19 19 PITFALL: MIPS as a Performance Metric (2) Do not use MIPS (million instructions per second) as a performance metric Activity 6: For a CPU, instructions from a high-level language are classified in 3 classes Two SW implementations with the following instruction counts are being considered Assuming that the clock rate is 500 MHz, which code sequence will be run faster based on (a) MIPS and (b) execution time. Instruction ClassABC CPI for the instruction class123 Instruction counts (in billions) for each instruction class ABC Implementation 1511 Implementation 21011

20 20 PITFALLS: Do Not’s (3) 4.Do not use MFLOPS (Million Floating point operations per second) as a performance metric 5.Do not use PEAK Performance as a performance metric Example: I860: @50MHz: 100MFLOPS and 150 MOPS MIPS @R3000: 16MFLOPS and 33 MOPS Running SPEC benchmarks, R3000 was 15% faster in execution time based on the geometric mean

21 21 PITFALLS: Do Not’s (4) 4.Do not use synthetic benchmarks (vendor created) to predict performance — Commonly used synthetic benchmarks are Whetstone and Dhrystone — Whetstone was based on Algol in an engineering environment and later converted to Fortran — Dhrystone was written in Ada for systems programming environments and later converted to C — Such synthetic benchmarks do not reflect the applications typically run by a user 5.Do not use the arithmetic mean of execution time to predict performance. Geometric means provide better estimates.


Download ppt "CSE2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 2: Measuring Performance Topics: 1. Performance:"

Similar presentations


Ads by Google