Computer Organization and Architecture (AT70.01) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: Patterson.

Slides:



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

CS2100 Computer Organisation Performance (AY2014/2015) Semester 2.
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*
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.
Computer ArchitectureFall 2007 © September 19, 2007 Karem Sakallah CS-447– Computer Architecture.
Chapter 4 Assessing and Understanding Performance
Fall 2001CS 4471 Chapter 2: Performance CS 447 Jason Bakos.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 10 - Performance.
1 Chapter 4. 2 Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding underlying organizational motivation.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Performance Feb 2005.
1 ECE3055 Computer Architecture and Operating Systems Lecture 2 Performance Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia.
CMSC 611: Advanced Computer Architecture Benchmarking Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Computer Organization and Design Performance Montek Singh Mon, April 4, 2011 Lecture 13.
1 Computer Performance: Metrics, Measurement, & Evaluation.
Where Has This Performance Improvement Come From? Technology –More transistors per chip –Faster logic Machine Organization/Implementation –Deeper pipelines.
1 Embedded Systems Computer Architecture. Embedded Systems2 Memory Hierarchy Registers Cache RAM Disk L2 Cache Speed (faster) Cost (cheaper per-byte)
순천향대학교 정보기술공학부 이 상 정 1 4. Accessing and Understanding Performance.
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.
Performance.
1 CS465 Performance Revisited (Chapter 1) Be able to compare performance of simple system configurations and understand the performance implications of.
Performance – Last Lecture Bottom line performance measure is time Performance A = 1/Execution Time A Comparing Performance N = Performance A / 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.
Performance 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.
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.
CMSC 611: Advanced Computer Architecture Performance & Benchmarks Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some.
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 CSE 3322 Web Site crystal.uta.edu/~jpatters/cse3322 Send to Pramod Kumar, with the names and s.
BITS Pilani, Pilani Campus Today’s Agenda Role of Performance.
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
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.
COMS 361 Computer Organization
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 Organization and Architecture (AT70.01) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: Patterson & Hennessy COD book website (copyright Morgan Kaufmann) adapted and supplemented

COD Ch. 2 The Role of Performance

Performance is the key to understanding underlying motivation for the hardware and its organization Measure, report, and summarize performance to enable users to make intelligent choices see through the marketing hype! 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? Performance

Airplane Passengers Range (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 Boeing 747 than the Douglas DC-8? So which of these airplanes has the best performance?! What do we measure? Define performance….

Response Time (elapsed time, latency): how long does it take for my job to run? how long does it take to execute (start to finish) my 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? If we upgrade a machine with a new processor what do we increase? If we add a new machine to the lab what do we increase? Computer Performance: TIME, TIME, TIME!!! Individual user concerns… Systems manager concerns…

Elapsed Time counts everything (disk and memory accesses, waiting for I/O, running other programs, etc.) from start to finish a useful number, but often not good for comparison purposes elapsed time = CPU time + wait time (I/O, other programs, etc.) CPU time doesn't count waiting for I/O or time spent running other programs can be divided into user CPU time and system CPU time (OS calls) CPU time = user CPU time + system CPU time  elapsed time = user CPU time + system CPU time + wait time Our focus: user CPU time (CPU execution time or, simply, execution time) time spent executing the lines of code that are in our program Execution Time

For some program running on machine X: Performance X = 1 / Execution time X X is n times faster than Y means: Performance X / Performance Y = n Definition of Performance

Clock Cycles Instead of reporting execution time in seconds, we often use cycles. In modern computers hardware events progress cycle by cycle: in other words, each event, e.g., multiplication, addition, etc., is a sequence of cycles Clock ticks indicate start and end of cycles: cycle time = time between ticks = seconds per cycle clock rate (frequency) = cycles per second (1 Hz. = 1 cycle/sec, 1 MHz. = 10 6 cycles/sec) Example: A 200 Mhz. clock has a cycle time time cycle tick

Performance Equation I So, to improve performance one can either: reduce the number of cycles for a program, or reduce the clock cycle time, or, equivalently, increase the clock rate CPU execution time CPU clock cycles Clock cycle time for a program =  equivalently

Could assume that # of cycles = # of instructions time 1st instruction2nd instruction3rd instruction4th 5th6th... How many cycles are required for a program? This assumption is incorrect! Because: Different instructions take different amounts of time (cycles) Why…?

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 because it means changing the hardware design. More later… time How many cycles are required for a program?

Our favorite program runs in 10 seconds on computer A, which has a 400Mhz. 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? 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) (average) CPI (cycles per instruction) a floating point intensive application might have a higher average CPI MIPS (millions of instructions per second) this would be higher for a program using simple instructions Terminology

Performance Measure Performance is determined by execution time Do any of these 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

Performance Equation II CPU execution time Instruction count average CPI Clock cycle time for a program Derive the above equation from Performance Equation I = 

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 Which 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 I

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 1, 2 and 3 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. Which sequence will be faster? How much? What is the CPI for each sequence? CPI Example II

Two different compilers are being tested for a 500 MHz. machine with three different classes of instructions: Class A, Class B, and Class C, which require 1, 2 and 3 cycles (respectively). Both compilers are used to produce code for a large piece of software. Compiler 1 generates code with 5 billion Class A instructions, 1 billion Class B instructions, and 1 billion Class C instructions. Compiler 2 generates code with 10 billion Class A instructions, 1 billion Class B instructions, and 1 billion Class C instructions. Which sequence will be faster according to MIPS? Which sequence will be faster according to execution time? MIPS Example

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! Benchmark suites Perfect Club: set of application codes Livermore Loops: 24 loop kernels Linpack: linear algebra package SPEC: mix of code from industry organization Benchmarks

SPEC (System Performance Evaluation Corporation) Sponsored by industry but independent and self-managed – trusted by code developers and machine vendors Clear guides for testing, see Regular updates (benchmarks are dropped and new ones added periodically according to relevance) Specialized benchmarks for particular classes of applications Can still be abused…, by selective optimization!

SPEC History First Round: SPEC CPU89 10 programs yielding a single number Second Round: SPEC CPU92 SPEC CINT92 (6 integer programs) and SPEC CFP92 (14 floating point programs) compiler flags can be set differently for different programs Third Round: SPEC CPU95 new set of programs: SPEC CINT95 (8 integer programs) and SPEC CFP95 (10 floating point) single flag setting for all programs Fourth Round: SPEC CPU2000 new set of programs: SPEC CINT2000 (12 integer programs) and SPEC CFP2000 (14 floating point) single flag setting for all programs programs in C, C++, Fortran 77, and Fortran 90

CINT2000 (Integer component of SPEC CPU2000) Program LanguageWhat It Is 164.gzip CCompression 175.vprCFPGA Circuit Placement and Routing 176.gccCC Programming Language Compiler 181.mcfCCombinatorial Optimization 186.crafty CGame Playing: Chess 197.parserCWord Processing 252.eonC++Computer Visualization 253.perlbmkCPERL Programming Language 254.gapC Group Theory, Interpreter 255.vortexCObject-oriented Database 256.bzip2 CCompression 300.twolf CPlace and Route Simulator

CFP2000 (Floating point component of SPEC CPU2000) Program LanguageWhat It Is 168.wupwiseFortran 77Physics / Quantum Chromodynamics 171.swimFortran 77Shallow Water Modeling 172.mgrid Fortran 77 Multi-grid Solver: 3D Potential Field 173.applu Fortran 77 Parabolic / Elliptic Differential Equations 177.mesa C 3-D Graphics Library 178.galgelFortran 90Computational Fluid Dynamics 179.art CImage Recognition / Neural Networks 183.equakeCSeismic Wave Propagation Simulation 187.facerecFortran 90Image Processing: Face Recognition 188.ammpCComputational Chemistry 189.lucas Fortran 90 Number Theory / Primality Testing 191.fma3dFortran 90Finite-element Crash Simulation 200.sixtrackFortran 77High Energy Physics Accelerator Design 301.apsi Fortran 77 Meteorology: Pollutant Distribution

SPEC CPU2000 reporting Refer SPEC website for documentationwww.spec.org Single number result – geometric mean of normalized ratios for each code in the suite Report precise description of machine Report compiler flag setting

Specialized SPEC Benchmarks I/O Network Graphics Java Web server Transaction processing (databases)

Amdahl's Law Execution Time After Improvement = Execution Time Unaffected + ( Execution Time Affected / Rate 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? Design Principle: Make the common case fast Improved part of code

Suppose we enhance a machine making all floating-point instructions run five times faster. 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? Examples

Performance is specific to a particular program 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!! Summary