1 / 49

Lecture 1: Performance

Lecture 1: Performance. EEN 312: Processors: Hardware, Software, and Interfacing. Department of Electrical and Computer Engineering Spring 2013, Dr. Rozier (UM). PERFORMANCE TRENDS. Growth in Processor Performance since 1978. Logarithmic Scale!. Moore ’ s Law.

vidal
Télécharger la présentation

Lecture 1: Performance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 1: Performance EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2013, Dr. Rozier (UM)

  2. PERFORMANCE TRENDS

  3. Growth in Processor Performance since 1978. Logarithmic Scale!

  4. Moore’s Law • Gordon Moore – One of the founders of Intel • Famously predicted in 1960 that the transistor capacity of integrated circuits would double every 18-24 months. • Not really a law, but has largely held true. • Generally translates into increased performance, and decreased cost.

  5. Moore’s Law

  6. Exponential Growth

  7. How do we get to Performance? • Does more transistors really mean more performance? • Is it a one-to-one correlation? • How might transistors NOT correlate to increased performance?

  8. MEASURING PERFORMANCE

  9. A simple example • Say we have two computers. You know one is rated at 1GHz and another is rated at 800MHz. • Which computer has a higher performance?

  10. A simple example? • What do GHz and MHz even mean? • What else could differ about the machines? • What else could differ about the context of performance?

  11. The situation is a complex one!

  12. First, Some Measure Theory • What is a measure? Formally? • A way of assigning numbers to the subsets of some set, which can be said (intuitively) to be the size of the set. • Measures require measurable spaces, and measurable sets. • Not all sets are measurable!

  13. Measurable Sets/Spaces • One reason a space or set may be unmeasurable is if it is ill-defined.

  14. Which Plane has a Higher Performance?

  15. Defining Performance • We can define performance in several ways. • Response time • How long does it take to accomplish a task? • We send input to a black box, and measure how long it takes to get out output.

  16. Defining Performance • We can define performance in several ways. • Throughput • How much work gets done during a certain amount of time? • Watch a system, count the number of jobs finished during a certain amount of time.

  17. Throughput Example • What is the fastest way you can think to deliver a large amount of data? • Never underestimate the throughput of a Mack Truck loaded with hard drives! TRUCK YEAH!

  18. What’s the Response time of our Truck? TRUCK YEAH???

  19. Response time as Execution Time • Start a program, wait for it to return results.

  20. Comparing Performance • Given the performance or execution time of a computer (A) and a different computer (B) running the same program, we can compare performance.

  21. Comparing Performance • Relative performance

  22. Why is Relative Performance Important?

  23. So How Do We Measure Performance • First let’s define performance: • Execution time • What is our measurable space? • What is our measurable set?

  24. Measuring Execution Time • CPU execution time • Wall clock time • How might these differ?

  25. Measuring Execution Time • Clock cycles • Instruction count

  26. Clock Cycles • Clock period – duration of a clock cycle • Clock frequency – number of cycles per second Clock period Clock (cycles) Data transferand computation Update state

  27. CPU Time • We can improve performance by • Reducing the number of clock cycles • Increasing clock rate • Often there is a trade-off

  28. CPU Example • Computer A: 2 GHz clock, 10s CPU time • Computer B • Aim for 6s CPU time. If you increase clock speed, the number of cycles increase by 1.2x. Break Into Groups Find the necessary clock rate for Computer B

  29. CPU Example • Computer A: 2 GHz clock, 10s CPU time • Computer B • Aim for 6s CPU time. If you increase clock speed, the number of cycles increase by 1.2x.

  30. Instruction Count and CPI • Instruction count • How many instructions the program has • Depends on the ISA and compiler • CPI • Cycles per instruction • Determined by hardware

  31. CPI Example • Computer A: Cycle Time = 250ps, CPI = 2.0 • Computer B: Cycle Time = 500ps, CPI = 1.2 • Same ISA • Which is faster? By how much? Break Into Groups

  32. CPI Example • Computer A: Cycle Time = 250ps, CPI = 2.0 • Computer B: Cycle Time = 500ps, CPI = 1.2 • Same ISA • Which is faster? By how much? A is faster… …by this much

  33. CPI Detail • Sometimes different instructions take differing amounts of time. • Often we will want to weight by instruction proportion in a program. Relative frequency

  34. CPI Example • Have instruction classes A, B, and C. Two was to compile our code: Give the average CPI for each program

  35. CPI Example • Sequence 1: IC = 5 • Clock Cycles= 2×1 + 1×2 + 2×3= 10 • Avg. CPI = 10/5 = 2.0 • Sequence 2: IC = 6 • Clock Cycles= 4×1 + 1×2 + 1×3= 9 • Avg. CPI = 9/6 = 1.5

  36. Performance Summary • Performance depends on • Algorithm: affects IC, possibly CPI • Programming language: affects IC, CPI • Compiler: affects IC, CPI • Instruction set architecture: affects IC, CPI, Tc

  37. So Why Don’t We Have 1THz Computers?

  38. The Power Wall • In CMOS IC technology ×30 5V → 1V ×1000

  39. The Power Wall • Suppose a new CPU has • 85% of capacitive load of old CPU • 15% voltage and 15% frequency reduction • The power wall • We can’t reduce voltage further • We can’t remove more heat • How else can we improve performance?

  40. Multiprocessors • Multicore microprocessors • More than one processor per chip • Requires explicitly parallel programming • Compare with instruction level parallelism • Hardware executes multiple instructions at once • Hidden from the programmer • Hard to do • Programming for performance • Load balancing • Optimizing communication and synchronization

  41. Amdahl’s Law • Improving an aspect of a computer and expecting a proportional improvement in overall performance • Example: multiply accounts for 80s/100s • How much improvement in multiply performance to get 5× overall? • Break into Groups!

  42. Amdahl’s Law • Improving an aspect of a computer and expecting a proportional improvement in overall performance • Example: multiply accounts for 80s/100s • How much improvement in multiply performance to get 5× overall? • Can’t be done! • Corollary: make the common case fast

  43. PROBLEM SETS

  44. Consider the following processors, P1, P2, and P3 executing the same instruction set with clock rates and CPI as indicated • Which processor has the highest performance in terms of instructions per second? • If the processors each execute a program in 10s, find the number of cycles and the number of instructions • We are trying to reduce the execution time by 30% but this leads to an increase in CPI of 20%. What clock rate should we have to get this reduction?

  45. Consider a computer running code with four main routines, A, B, C, and D. • How much is the total time reduced if the time for Routine A is reduced by 20%? • How much is the time for Routine B reduced if the total time is reduced by 20%? • Can the total time be reduced by 20% by only reducing the time for Routine D?

  46. Consider a computer running code with four main routines, A, B, C, and D. • How much is the total time reduced if the time for Routine A is reduced by 20%? • How much is the time for Routine B reduced if the total time is reduced by 20%? • Can the total time be reduced by 20% by only reducing the time for Routine D?

  47. Consider a computer running code with four main routines, A, B, C, and D. • How much must we improve the CPI of Routine A if we want the program to run twice as fast? • How much must we improve the CPI of Routine C if we want the program to run twice as fast? • How much is the execution time improved if the CPI of routines A and B are reduced by 40%, and the CPI of routines C and D are reduced by 30%?

  48. WRAP UP

  49. For next time • Read Chapter 2, Sections 2.1 – 2.3 • Finish Lab 0 by next lab session.

More Related