15-447 Computer ArchitectureFall 2007 © September 19, 2007 Karem Sakallah CS-447– Computer Architecture.

Slides:



Advertisements
Similar presentations
CS1104: Computer Organisation School of Computing National University of Singapore.
Advertisements

TU/e Processor Design 5Z032 1 Processor Design 5Z032 The role of Performance Henk Corporaal Eindhoven University of Technology 2009.
1  1998 Morgan Kaufmann Publishers Chapter 2 Performance Text in blue is by N. Guydosh Updated 1/25/04*
100 Performance ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006.
Computer Organization and Architecture (AT70.01) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: Patterson.
Chapter 1 CSF 2009 Computer Performance. Defining Performance Which airplane has the best performance? Chapter 1 — Computer Abstractions and Technology.
CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos.
1 Introduction Rapidly changing field: –vacuum tube -> transistor -> IC -> VLSI (see section 1.4) –doubling every 1.5 years: memory capacity processor.
Chapter 4 Assessing and Understanding Performance Bo Cheng.
1 CSE SUNY New Paltz Chapter 2 Performance and Its Measurement.
Chapter 4 Assessing and Understanding Performance
Performance D. A. Patterson and J. L. Hennessey, Computer Organization & Design: The Hardware Software Interface, Morgan Kauffman, second edition 1998.
Computer ArchitectureFall 2007 © September 17, 2007 Karem Sakallah CS-447– Computer Architecture.
1 Chapter 4. 2 Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding underlying organizational motivation.
1  1998 Morgan Kaufmann Publishers and UCB Performance CEG3420 Computer Design Lecture 3.
Assessing and Understanding Performance B. Ramamurthy Chapter 4.
Chapter 4 Assessing and Understanding Performance
Fall 2001CS 4471 Chapter 2: Performance CS 447 Jason Bakos.
1 Chapter 4. 2 Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding underlying organizational motivation.
1 ECE3055 Computer Architecture and Operating Systems Lecture 2 Performance Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia.
06/27/2005 Performances of Computer Systems Presentation C CSE : Introduction to Computer Architecture Gojko Babić.
Computer Organization and Design Performance Montek Singh Mon, April 4, 2011 Lecture 13.
1 Computer Performance: Metrics, Measurement, & Evaluation.
1 CHAPTER 2 THE ROLE OF PERFORMANCE. 2 Performance Measure, Report, and Summarize Make intelligent choices Why is some hardware better than others for.
순천향대학교 정보기술공학부 이 상 정 1 4. Accessing and Understanding Performance.
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 1 Computer Abstractions and Technology Sections 1.5 – 1.11.
1 CPS4150 Chapter 4 Assessing and Understanding Performance.
Performance.  Measure, Report, and Summarize  Make intelligent choices  See through the marketing hype  Key to understanding underlying organizational.
10/19/2015Erkay Savas1 Performance Computer Architecture – CS401 Erkay Savas Sabanci University.
1 CS/EE 362 Hardware Fundamentals Lecture 9 (Chapter 2: Hennessy and Patterson) Winter Quarter 1998 Chris Myers.
1 Acknowledgements Class notes based upon Patterson & Hennessy: Book & Lecture Notes Patterson’s 1997 course notes (U.C. Berkeley CS 152, 1997) Tom Fountain.
Performance.
1 CS465 Performance Revisited (Chapter 1) Be able to compare performance of simple system configurations and understand the performance implications of.
1 CS/COE0447 Computer Organization & Assembly Language CHAPTER 4 Assessing and Understanding Performance.
Performance Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
CEN 316 Computer Organization and Design Assessing and Understanding Performance Mansour AL Zuair.
1 COMS 361 Computer Organization Title: Performance Date: 10/02/2004 Lecture Number: 3.
1  1998 Morgan Kaufmann Publishers How to measure, report, and summarize performance (suorituskyky, tehokkuus)? What factors determine the performance.
TEST 1 – Tuesday March 3 Lectures 1 - 8, Ch 1,2 HW Due Feb 24 –1.4.1 p.60 –1.4.4 p.60 –1.4.6 p.60 –1.5.2 p –1.5.4 p.61 –1.5.5 p.61.
September 10 Performance Read 3.1 through 3.4 for Wednesday Only 3 classes before 1 st Exam!
Performance – Last Lecture Bottom line performance measure is time Performance A = 1/Execution Time A Comparing Performance N = Performance A / Performance.
4. Performance 4.1 Introduction 4.2 CPU Performance and Its Factors
1  1998 Morgan Kaufmann Publishers Lectures for 2nd Edition Note: these lectures are often supplemented with other materials and also problems from the.
Chapter 4. Measure, Report, and Summarize Make intelligent choices See through the marketing hype Understanding underlying organizational aspects Why.
Lec2.1 Computer Architecture Chapter 2 The Role of Performance.
L12 – Performance 1 Comp 411 Computer Performance He said, to speed things up we need to squeeze the clock Study
EGRE 426 Computer Organization and Design Chapter 4.
Performance Computer Organization II 1 Computer Science Dept Va Tech January 2009 © McQuain & Ribbens Defining Performance Which airplane has.
Jan. 5, 2000Systems Architecture II1 Machine Organization (CS 570) Lecture 2: Performance Evaluation and Benchmarking * Jeremy R. Johnson Wed. Oct. 4,
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Computer Architecture CSE 3322 Web Site crystal.uta.edu/~jpatters/cse3322 Send to Pramod Kumar, with the names and s.
COD Ch. 1 Introduction + The Role of Performance.
June 20, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 1: Performance Evaluation and Benchmarking * Jeremy R. Johnson Wed.
BITS Pilani, Pilani Campus Today’s Agenda Role of Performance.
CPEN Digital System Design Assessing and Understanding CPU Performance © Logic and Computer Design Fundamentals, 4 rd Ed., Mano Prentice Hall © Computer.
Computer Organization
Lecture 2: Performance Evaluation
Performance Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
September 2 Performance Read 3.1 through 3.4 for Tuesday
Defining Performance Which airplane has the best performance?
Prof. Hsien-Hsin Sean Lee
CSCE 212 Chapter 4: Assessing and Understanding Performance
CS2100 Computer Organisation
Computer Performance He said, to speed things up we need to squeeze the clock.
Performances of Computer Systems
January 25 Did you get mail from Chun-Fa about assignment grades?
Computer Performance Read Chapter 4
Performance.
Computer Organization and Design Chapter 4
CS2100 Computer Organisation
Presentation transcript:

Computer ArchitectureFall 2007 © September 19, 2007 Karem Sakallah CS-447– Computer Architecture M,W 10-11:20am Lecture 7 Performance (Cont’d)

Computer ArchitectureFall 2007 © Today °Lecture & Discussion °Next Lecture: Review °Read the chapters & slides. °Practice the performance examples in the Patterson book. Done by now

Computer ArchitectureFall 2007 © Assessing & Understanding Performance This chapter discusses how to measure, report, and summarize performance of a computer.

Computer ArchitectureFall 2007 © Motivation It is often helpful to have some yardstick by which to compare systems During development to evaluate different algorithms or optimizations During purchasing to compare between product offerings …

Computer ArchitectureFall 2007 © °Measure, Report, and Summarize °Make intelligent choices °See through the marketing hype °Key to understanding underlying organizational motivation Performance

Computer ArchitectureFall 2007 © Performance Why is some hardware better than others for different programs? What factors of system performance are hardware related? (e.g., Do we need a new machine, or a new operating system?) How does the machine's instruction set affect performance?

Computer ArchitectureFall 2007 © Which of these airplanes has the best performance? Airplane PassengersRange (mi) Speed (mph) Boeing Boeing BAC/Sud Concorde Douglas DC ° How much faster is the Concorde compared to the 747? ° How much bigger is the 747 than the Douglas DC-8?

Computer ArchitectureFall 2007 © ° Response Time (latency) — How long does it take for my job to run? — How long does it take to execute a job? — How long must I wait for the database query? ° Throughput — How many jobs can the machine run at once? — What is the average execution rate? — How much work is getting done? Computer Performance

Computer ArchitectureFall 2007 © °Elapsed Time counts everything (disk and memory accesses, I/O, etc.) a useful number, but often not good for comparison purposes Execution Time

Computer ArchitectureFall 2007 © Execution Time °CPU time doesn't count I/O or time spent running other programs can be broken up into system time, and user time Our focus: user CPU time time spent executing the lines of code that are "in" our program

Computer ArchitectureFall 2007 © °For some program running on machine X, Performance X = 1 / Execution time X "X is n times faster than Y" Performance X / Performance Y = n Definition of Performance

Computer ArchitectureFall 2007 © Definition of Performance Problem: machine A runs a program in 20 seconds machine B runs the same program in 25 seconds

Computer ArchitectureFall 2007 © How to compare the performance? Total Execution Time : A Consistent Summary Measure Comparing and Summarizing Performance Computer AComputer B Program1(sec)110 Program2(sec) Total time (sec)

Computer ArchitectureFall 2007 © Clock Cycles °Instead of reporting execution time in seconds, we often use cycles °Clock “ticks” indicate when to start activities (one abstraction): time

Computer ArchitectureFall 2007 © Clock cycles °cycle time = time between ticks = seconds per cycle °clock rate (frequency) = cycles per second (1 Hz = 1 cycle/sec) A 4 Ghz clock has a 250ps cycle time

Computer ArchitectureFall 2007 © CPU Execution Time rateclockondscycle onds cycle Cycle SecondsCyclesSeconds CPU sec/ / Program cycles Program time)cycle(clock xprogram) afor cyclesclock (CPU program afor timeexecution    

Computer ArchitectureFall 2007 © So, to improve performance (everything else being equal) you can either increase or decrease? ________ the # of required cycles for a program, or ________ the clock cycle time or, said another way, ________ the clock rate. How to Improve Performance

Computer ArchitectureFall 2007 © So, to improve performance (everything else being equal) you can either increase or decrease? _decrease_ the # of required cycles for a program, or _decrease_ the clock cycle time or, said another way, _increase_ the clock rate. How to Improve Performance

Computer ArchitectureFall 2007 © Could assume that # of cycles equals # of instruction time 1st instruction2nd instruction3rd instruction4th 5th6th... How many cycles are required for a program? This assumption is incorrect, different instructions take different amounts of time on different machines.

Computer ArchitectureFall 2007 © °Multiplication takes more time than addition °Floating point operations take longer than integer ones °Accessing memory takes more time than accessing registers °Important point: changing the cycle time often changes the number of cycles required for various instructions time Different numbers of cycles for different instructions

Computer ArchitectureFall 2007 © Now that we understand cycles Components of PerformanceUnits of Measure CPU execution time for a program Seconds for the program Instruction countInstructions executed for the program Clock Cycles per Instruction (CPI) Average number of clock cycles per instruction Clock cycle timeSeconds per clock cycle

Computer ArchitectureFall 2007 © CPI CPU clock cycles = Instructions for a program x Average clock cycles per Instruction (CPI) CPU time = Instruction count x CPI x clock cycle time

Computer ArchitectureFall 2007 © 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.

Computer ArchitectureFall 2007 © CPI i : the average number of cycles per instructions for that instruction class C i : the count of the number of instructions of class i executed. n : the number of instruction classes. CPU Clock Cycles

Computer ArchitectureFall 2007 © Example °Instruction Classes: Add Multiply °Average Clock Cycles per Instruction: Add 1cc Mul 3cc °Program A executed: 10 Add instructions 5 Multiply instructions

Computer ArchitectureFall 2007 © Quiz An application using a desktop client and a remote server is limited by network performance. What happens to response time and throughput when: °An extra network channel is added °Networking software is upgraded to reduce communications delay °More memory is added to the desktop computer

Computer ArchitectureFall 2007 © Formula Summary °T: Execution Time (seconds) °C: Total Number of Cycles °f: Clock Frequency (cycles/second) °I: (Dynamic) Instruction Count I j : Count for Instructions of type j C j : Cycles per Instruction of type j T = C / f C = I 1 x C 1 + … + I k x C k I = I 1 + I 2 + … + I k CPI = C / I T = (I x CPI) / f

Computer ArchitectureFall 2007 © Performance Calculation Example: fact(4) fact: a.pushl %ebp# Setup b.movl %esp,%ebp# Setup c.movl $1,%eax# eax = 1 d.movl 8(%ebp),%edx# edx = x L11: e.imull %edx,%eax# result *= x f.decl %edx# x— g.cmpl $1,%edx# Compare x:1 h.jg L11# if > repeat i.movl %ebp,%esp# Finish j.popl %ebp# Finish k.ret# Finish f = 1GHz Inst TypeInstCycles 1imull5 2decl2 3Other1 Calculate: T, C, I, & CPI when fact is executed with input x = 4

Computer ArchitectureFall 2007 © Performance Calculation Example: fact(4) fact: a.pushl %ebp b.movl %esp,%ebp c.movl $1,%eax d.movl 8(%ebp),%edx L11: e.imull %edx,%eax f.decl %edx g.cmpl $1,%ed h.jg L11 i.movl %ebp,%esp j.popl %ebp k.ret InstCountCycles a b c d e f g h i j k Total Inst TypeInstCycles 1imull5 2decl2 3Other1

Computer ArchitectureFall 2007 © °Performance best determined by running a real application Use programs typical of expected workload Or, typical of expected class of applications ex: compilers/editors, scientific applications, graphics °Small benchmarks nice for architects and designers easy to standardize can be abused Benchmarks

Computer ArchitectureFall 2007 © Benchmarks (2) °SPEC (Standard Performance Evaluation Corporation) companies have agreed on a set of real programs and inputs valuable indicator of performance (and compiler technology) can still be abused

Computer ArchitectureFall 2007 © Standard Performance Evaluation Corporation SPEC is supported by a number of computer vendors to create standard sets of benchmarks for modern computer systems. The SPEC benchmark sets include CPU performance, graphics, High-performance computing, Object-oriented computing, Java applications, Client-server models, Mail systems, File systems, and Web servers.

Computer ArchitectureFall 2007 © SPEC ‘89 °Compiler “enhancements” and performance

Computer ArchitectureFall 2007 © SPEC CPU Benchmarks CINT2000 : the SPEC ratio for the integer benchmark sets CFP2000 : the SPEC ratio for the floating-point benchmark sets.

Computer ArchitectureFall 2007 © SPEC 2000 Does doubling the clock rate double the performance? Can a machine with a slower clock rate have better performance?

Computer ArchitectureFall 2007 © SPEC 2000 Does doubling the clock rate double the performance? Can a machine with a slower clock rate have better performance?

Computer ArchitectureFall 2007 © Execution Time After Improvement = Execution Time Unaffected + ( Execution Time Affected / Amount of Improvement ) Amdahl's Law

Computer ArchitectureFall 2007 © Example °Application execution time = 20sec 12 seconds are spent performing add operations °If we improve the add operation to run twice as fast, how much faster will the application run?

Computer ArchitectureFall 2007 © Amdahl’s Law °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?"

Computer ArchitectureFall 2007 © Execution time after improvement Amdahl's Law

Computer ArchitectureFall 2007 © MIPS (million instructions per second) Example Code from Instruction Counts (in billions) for each instruction set A (1 CPI)B (2 CPI)C (3 CPI) Compiler 1511 Compiler Clock rate = 4GHz A,B,C : Instruction Classes Which code sequence will execute faster according to MIPS? According to execution time?

Computer ArchitectureFall 2007 © CPU clock cycles1 = (5 x 1+1 x 2+1 x 3) x 10 9 = 10 x 10 9 CPU clock cycles2 = (10 x 1+1 x 2+1 x 3) x 10 9 = 15 x 10 9 Execution time & MIPS  seconds time2 9 9     Execution seconds time1 9 9    Execution

Computer ArchitectureFall 2007 © Execution time & MIPS (2)

Computer ArchitectureFall 2007 © Performance Evaluation °Performance depends on Hardware architecture Software environment °Meaning of performance depends on viewpoint User: time System Manager: throughput

Computer ArchitectureFall 2007 © Performance Evaluation °Kinds of Performance Graphics Network Transactional Multi-user system I/O Scientific/Engineering codes

Computer ArchitectureFall 2007 © Example on the MIPS R10K Prof run at: Tue Apr 28 15:50: Command line: prof suboptim.ideal.m : Total number of cycles s: Total execution time : Total number of instructions executed 1.405: Ratio of cycles / instruction 195: Clock rate in MHz R10000: Target processor modelled cycles(%) cum % secs instrns calls procedure (56.71) pdot (43.26) init 31767( 0.03) vsum 1069( 0.00) fflush : : : : : :