Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 COMS 361 Computer Organization Title: Performance Date: 10/02/2004 Lecture Number: 3.

Similar presentations


Presentation on theme: "1 COMS 361 Computer Organization Title: Performance Date: 10/02/2004 Lecture Number: 3."— Presentation transcript:

1 1 COMS 361 Computer Organization Title: Performance Date: 10/02/2004 Lecture Number: 3

2 2 Announcements Homework 1 –Due next Tuesday 9/07/04

3 3 Review Computer System Organization Instruction Set Architecture (ISA) –Important from the programmers point of view –Allows families of processors Hardware Set Architecture (HSA) –Defines operational components and their interconnections –An implementation of an ISA Computer Organization –The implementation of an HSA

4 4 Outline Trends Performance –Measures –Comparisons

5 5 VLSI Trends: Moore’s Law In 1965, Gordon Moore predicted that transistors would continue to shrink, allowing: –Doubled transistor density every 24 months –Doubled performance every 18 months History has proven Moore right But, is the end in sight? –Physical limitations –Economic limitations Gordon Moore Intel Co-Founder and Chairmain Emeritus

6 6 Microprocessor Trends (Log Scale)

7 7 Microprocessor Trends (Intel)

8 8 Microprocessor Trends Alpha (R.I.P) P4N, G5 I2M

9 9 Microprocessor Trends (Log Scale) Alpha (R.I.P) P4N, G5 G4 I2M

10 10 DRAM Memory Trends (Log Scale)

11 11 Performance Trends Vax 11/780

12 12 Summary - Technology Trends Processor –Logic capacityincreases ~ 30% per year –Clock frequencyincreases ~ 20% per year –Cost per functiondecreases ~20% per year Memory –DRAM capacity: increases ~ 60% per year (4x every 3 years) –Speed: increases ~ 10% per year –Cost per bit: decreases ~25% per year Disk –Storage capacityincreases ~60% per year

13 13 Performance Measure, Report, and Summarize –Understand major factors of performance –Software performance is a function of Which instructions are used Execution time of the instructions used

14 14 Performance Performance measurement can be difficult –Complex software –Hardware performance enhancements –Different applications may perform differently on the same hardware Graphics application Computational Database Impossible to analytically compute a systems performance

15 15 Performance An important attribute of a system –Purchasers –Designers –Sales people Stretch the truth Performance claims may be meaningless for your application Focus –Why software performs as it does –How does the instruction set affect performance –What hardware features are responsible for improved performance

16 16 Performance: A Matter of Perspective What does this mean? –One computer performs better than another? Subtle question Difficult to answer without an accurate meaning of the term performance Example of a performance issue

17 17 Performance: A Matter of Perspective Which plane has the best performance? –Concord: fastest –DC-8: longest range –747: largest capacity Airplane Passengers Range (mi) Speed (mph) Boeing 737-100 101 630 598 Boeing 747 470 4150 610 BAC/Sud Concorde 132 4000 1350 Douglas DC-8-50 146 8720 544

18 18 Performance: A Matter of Perspective Consider speed as a performance measure –Speed is still not precise enough –Concord: fastest plane for a individual –747: fastest plane for transporting 450 people Same program running on two computers –First machine done is the fastest, right? –Shared system: The most tasks completed in the least amount of time has the better performance –Response time: individual user –Throughput: system manager

19 19 Performance Equation Selfish motivation: –Focus on response time Often faster response time means more throughput –Maximize performance by minimizing response time –Performance of machine X is better than the performance of machine Y if:

20 20 Performance Equation Performance x > Performance y Means the Execution time(x) < Execution (y) How much better one machine wrt another –relative performance measure of two machines –If X is n times faster than Y, the execution time on Y is n times longer than on X

21 21 Measuring Performance Time to execute a program is our measure Which time? –Obvious measures: Wall-clock time, response time, or elapsed time The total time for task completion Time-sharing (common) –Elapsed time –Time to complete our task CPU time –The time the CPU spends on our task User time (time executing the instructions in our program) System time (OS things: opening files, networking, …)

22 22 Measuring Performance Use the time command to determine –user time –system time –elapsed time Combine user and system time for a macroscopic measure of performance Designers –How fast can the hardware perform basic functions Moving data, adding, multiplying –Most computers have a constant speed clock that determines when events happen Clock –Ticks, cycles, period, rate, … –Heartbeat of the processor

23 23 Measuring Performance Clock rate –Measured as the number of clock cycles per unit time t 1 clock cycle clock period (measured in time) or 0.25 ns, 250 ps 4 GHz

24 24 Orders of Magnitude thousandths10 -3 milli, m millionths10 -6 micro, u billionths10 -9 nano, n trillionths10 -12 pico, p Disk access: ms Memory access: us Clock cycle time: ns, ps

25 25 Orders of Magnitude thousands10 3 kilo, K millions10 6 mega, M billions10 9 giga, G trillions10 12 tera, T Size of L1 cache: k Size of Main memory: M, G Size of a disk drive: G Size of a disk farm: T

26 26 Orders of Magnitude Scientific UnitsComputer Science Units 10 3 = 1,000thousandskilo, K2 10 = 1024 10 6 = 1,000,000millionsmega, M2 20 = 1,048,576 10 9 = 1,000,000,000billionsgiga, G2 30 = 1,073,741,824 10 12 = 1,000,000,000,000trillionstera, T2 40 = 1,099,511,627,776

27 27 Clock/execution time Relation between clock rate and execution time –Tells what happens to execution time if the rate changes Increase performance –Reduce the number of clocks to execute the program –Reduce the clock period Increase the clock rate

28 28 Example Our favorite program runs in 10 seconds on computer A, which has a 400 Mhz clock. We are trying to help a computer designer build a new machine B, that will run this program in 6 seconds. The designer can use new (or perhaps more expensive) technology to substantially increase the clock rate, but has informed us that this increase will affect the rest of the CPU design, causing machine B to require 1.2 times as many clock cycles as machine A for the same program. What clock rate should we tell the designer to target? Don't Panic, can easily work this out from basic principles

29 29 Example A given program will require –some number of instructions (machine instructions) –some number of cycles –some number of seconds We have a vocabulary that relates these quantities: –cycle time (seconds per cycle) –clock rate (cycles per second) –CPI (cycles per instruction) a floating point intensive application might have a higher CPI –MIPS (millions of instructions per second) this would be higher for a program using simple instructions

30 30 Performance Performance is determined by execution time Do any of the other variables equal performance? –# of cycles to execute program? –# of instructions in program? –# of cycles per second? –average # of cycles per instruction? –average # of instructions per second? Common pitfall: thinking one of the variables is indicative of performance when it really isn’t

31 31 Suppose we have two implementations of the same instruction set Architecture (ISA). For some program, Machine A has a clock cycle time of 10 ns. and a CPI of 2.0 Machine B has a clock cycle time of 20 ns. and a CPI of 1.2 CPI Example

32 32 What machine is faster for this program, and by how much? If two machines have the same ISA which of our quantities (e.g., clock rate, CPI, execution time, # of instructions, MIPS) will always be identical? CPI Example

33 33 A compiler designer is trying to decide between two code sequences for a particular machine. Based on the hardware implementation, there are three different classes of instructions: Class A, Class B, and Class C, and they require one, two, and three cycles (respectively) The first code sequence has 5 instructions: –2 of A, 1 of B, and 2 of C The second sequence has 6 instructions: –4 of A, 1 of B, and 1 of C # of Instructions Example

34 34 Which sequence will be faster? How much? What is the CPI for each sequence? # of Instructions Example

35 35 Two different compilers are being tested for a 100 MHz. machine with three different classes of instructions: Class A, Class B, and Class C, which require one, two, and three cycles (respectively). Both compilers are used to produce code for a large piece of software. The first compiler's code uses –5 million Class A instructions –1 million Class B instructions –1 million Class C instructions MIPS example

36 36 The second compiler's code uses –10 million Class A instructions –1 million Class B instructions –1 million Class C instructions Which sequence will be faster according to MIPS? Which sequence will be faster according to execution time? MIPS example

37 37 Performance best determined by running a real application –Use programs typical of expected workload –Or, typical of expected class of applications e.g., compilers/editors, scientific applications, graphics, etc. Small benchmarks –nice for architects and designers –easy to standardize –can be abused Benchmarks

38 38 SPEC (System Performance Evaluation Cooperative) –companies have agreed on a set of real program and inputs –can still be abused (Intel’s “other” bug) –valuable indicator of performance (and compiler technology) Benchmarks

39 39 SPEC ‘89 Compiler “enhancements” and performance

40 40 SPEC ‘95

41 41 SPEC ‘95 Does doubling the clock rate double the performance? Can a machine with a slower clock rate have better performance?

42 42 Execution Time After Improvement = Execution Time Unaffected +( Execution Time Affected / Amount of Improvement ) Example: "Suppose a program runs in 100 seconds on a machine, with multiply responsible for 80 seconds of this time. How much do we have to improve the speed of multiplication if we want the program to run 4 times faster?" How about making it 5 times faster? Principle: Make the common case fast Amdahl's Law

43 43 Suppose we enhance a machine making all floating-point instructions run five times faster. If the execution time of some benchmark before the floating-point enhancement is 10 seconds, what will the speedup be if half of the 10 seconds is spent executing floating-point instructions? We are looking for a benchmark to show off the new floating-point unit described above, and want the overall benchmark to show a speedup of 3. One benchmark we are considering runs for 100 seconds with the old floating- point hardware. How much of the execution time would floating-point instructions have to account for in this program in order to yield our desired speedup on this benchmark? Example

44 44 Performance is specific to a particular program/s –Total execution time is a consistent summary of performance For a given architecture performance increases come from: –increases in clock rate (without adverse CPI affects) –improvements in processor organization that lower CPI –compiler enhancements that lower CPI and/or instruction count Pitfall: expecting improvement in one aspect of a machine’s performance to affect the total performance You should not always believe everything you read! Read carefully! (see newspaper articles, e.g., Exercise 2.37) Remember


Download ppt "1 COMS 361 Computer Organization Title: Performance Date: 10/02/2004 Lecture Number: 3."

Similar presentations


Ads by Google