DOC PREVIEW
Berkeley COMPSCI 152 - Lecture 9 – Performance

This preview shows page 1-2-3-24-25-26 out of 26 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26CS 152 L09 Performance () UC Regents Fall 2004 © UCB2004-09-28 Dave Patterson(www.cs.berkeley.edu/~patterson)John Lazzaro (www.cs.berkeley.edu/~lazzaro)www-inst.eecs.berkeley.edu/~cs152/CS152 – Computer Architecture andEngineeringLecture 9 – PerformanceCS 152 L09 Performance () UC Regents Fall 2004 © UCBLast Time: Microcode, Multi-CycleCS 152 L09 Performance () UC Regents Fall 2004 © UCBToday’s Lecture - PerformanceMeasurement: what, why, howThe performance equationHow energy limits performanceAmdahl’s lawUC Regents Fall 2004 © UCBCS 152 L09 Performance ()Performance Measurement(as seen by the customer)CS 152 L09 Performance () UC Regents Fall 2004 © UCBWho (sensibly) upgrades CPUs often?A professional who turns CPU cycles into money, and who is cycle-limited.Artist tool: animation, video special effects.CS 152 L09 Performance () UC Regents Fall 2004 © UCBHow to decide to buy a new machine?Measure After Effects “execution time” on a representative render “workload” “Night flight”City map and cloudscomputed“on the fly” with fractalsCPU intensive Trivial I/ONight FlightMovieGoesHereCS 152 L09 Performance () UC Regents Fall 2004 © UCB Interpreting Execution TimePerformance1Execution Time== 2.85 renders/hour1.5 GHz PB (Y) is N times faster than 1.25 GHz PB (X). N is ?N =Performance (Y)Execution Time (Y)Execution Time (X)Performance (X)== 1. 19PB 1.5 Ghz : 3. 4 renders/hour. PB 1.25 : 2.85 renders/hour.Does artist productivity really increase?Execution Time: 1265 secondsPowerBookG41.25 GHzCS 152 L09 Performance () UC Regents Fall 2004 © UCBExecution Time: Time for 1 job to complete 2 CPUs: Execution Time vs ThroughputThroughput: # jobs/hour completed (not serialized)Could G5 and Opteron have similar Throughput? Why?Assume G5 MP executiontime faster because AE doesnot use both Opteron CPUs.1.8xfaster.What does this imply?2 CPUs vs1 CPU,otherwisesimilarUC Regents Fall 2004 © UCBCS 152 L09 Performance ()Performance Measurement(as seen by a CPU designer)Q. Why do we care about After Effect’s performance?A. We want the CPU we are designing to run it well !CS 152 L09 Performance () UC Regents Fall 2004 © UCBStep 1: Analyze the right measurement!CPU Time:Time the CPU spends running program under measurement.Response Time:Total time: CPU Time + time spent waiting (for disk, I/O, ...).Guides CPU designGuides system designHow to measure CPU time?% time <program name>25.77u 0.72s 0:29.17 90.8% How do designersuse these two numbers?CS 152 L09 Performance () UC Regents Fall 2004 © UCBAdministrivia - Adjust Class Time ?We have permission to stay in thisroom past 12:30.A: Lecture from 11:10 to 12:30B: Lecture from 11:15 to 12:35C: Lecture from 11:20 to 12:40Does anyone have a class that starts 12:40?Class time options (all “sharp” time)CS 152 L09 Performance () UC Regents Fall 2004 © UCBAdministrivia - Mid-Term is Coming!Mid-term review session: Sunday 10/10, 7-9 PM, 306 Soda.Mid-term: Tuesday 10/12, 5:30-8:30 PM, 101 Morgan. No class on Tuesday.After exam: Pizza at LaVal’s, on us!CS 152 L09 Performance () UC Regents Fall 2004 © UCBAdministrivia - This Week’s DeadlinesHomework 2 due 9/29 (tomorrow)!283 Soda, in CS 152 box at 5 PMLab 2 Xilinx demo on Friday 10/1Lab 2 due Monday 10/4, 11:59 PMOn Tuesday 10/5, onto the Pipelining Lab!CS 152 L09 Performance () UC Regents Fall 2004 © UCB CPU time: Proportional to Instruction CountCPU timeProgramMachine InstructionsProgram∝Q. Static count?(lines of program printout)Or dynamic count? (trace of execution)Rationale: Every additional instruction you execute takes time.Q. What type of computer architect influences the number of instructions a given program needs?A. Instruction set architect.A. Dynamic.Q. Once ISA is set, who can influence instructioncount?A. Compiler writer,application developer.CS 152 L09 Performance () UC Regents Fall 2004 © UCB CPU time: Proportional to Clock PeriodQ. What ultimately limitsan architect’s ability to reduce clock period ?TimeProgramTimeOne Clock Period∝A. Clock-to-Q, setup times.Q. How can architects (not technologists) reduce clock period?A. Shorten the machine critical path.Rationale: We measure each instruction’sexecution time in “number of cycles”. By shortening the period for each cycle, we shorten execution time.CS 152 L09 Performance () UC Regents Fall 2004 © UCB Completing the performance equationSecondsProgram InstructionsProgram=SecondsCycleWe need all three terms, and only these terms, to compute CPU Time!When is it OK to compare clock rates?What factors make the CPI for a program differfrom the underlying CPIof a CPU implementation?Instruction mix variesCache behavior varies.Branch prediction varies.“CPI” -- The Average Number of Clock Cycles Per Instruction For the Program InstructionCyclesCS 152 L09 Performance () UC Regents Fall 2004 © UCB CPI as an analytical tool to guide designMachine CPI5 x 30 + 1 x 20 + 2 x 20 + 2 x 10 + 2 x 20100= 2.7 cycles/instructionProgramInstruction MixWhere program spends its timeQ. We lower machine multiply CPI, but program runs slower!What mistake(s) did we make?CS 152 L09 Performance () UC Regents Fall 2004 © UCB Amdahl’s Law (of Diminishing Returns)If enhancement “E” speeds up multiply, but other instructions are unchanged, what is the maximum speedup S? Where programspends its timeSmax =11 - (% affected / 100 %)11 - (50/100)= 2= Attributed to Gene Amdahl -- “Amdahl’s Law”What is the lesson of Amdahl’s Law? Must enhance computers in a balanced way!CS 152 L09 Performance () UC Regents Fall 2004 © UCB Peer Instruction: Amdahl’s LawProgramWeWishTo RunOn N CPUsThe program spends 30%of its time running code that can not be recoded to run in parallel.CPUs2 3 4 5∞SpeedupCompute speedup for N = 2, 3, 4, 5, and ∞.CS 152 L09 Performance () UC Regents Fall 2004 © UCB Peer Instruction: Amdahl’s LawProgramWeWishTo RunOn N CPUsS =11 - (30 % + (70% / N) ) / 100 %)The program spends 30%of its time in serial code.CPUs2 3 4 5∞Speedup1.54 1.85 2.1 2.3 3.3Compute speedup for N = 2, 3, 4, 5, and ∞.S(∞)2 3 # CPUsCS 152 L09 Performance () UC Regents Fall 2004 © UCB Final thoughts: Performance EquationSecondsProgram InstructionsProgram=SecondsCycle InstructionCyclesGoal is to


View Full Document

Berkeley COMPSCI 152 - Lecture 9 – Performance

Documents in this Course
Quiz 5

Quiz 5

9 pages

Memory

Memory

29 pages

Quiz 5

Quiz 5

15 pages

Memory

Memory

29 pages

Memory

Memory

35 pages

Memory

Memory

15 pages

Quiz

Quiz

6 pages

Midterm 1

Midterm 1

20 pages

Quiz

Quiz

12 pages

Memory

Memory

33 pages

Quiz

Quiz

6 pages

Homework

Homework

19 pages

Quiz

Quiz

5 pages

Memory

Memory

15 pages

Load more
Download Lecture 9 – Performance
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 9 – Performance and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 9 – Performance 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?