1  1998 Morgan Kaufmann Publishers How to measure, report, and summarize performance (suorituskyky, tehokkuus)? What factors determine the performance.

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*
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.
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.
Copyright © 1998 Wanda Kunkle Computer Organization 1 Chapter 2.1 Introduction.
Chapter 4 Assessing and Understanding Performance
Fall 2001CS 4471 Chapter 2: Performance CS 447 Jason Bakos.
Lecture 3: Computer Performance
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.
Computer Organization and Design Performance Montek Singh Mon, April 4, 2011 Lecture 13.
1 Computer Performance: Metrics, Measurement, & Evaluation.
1 Embedded Systems Computer Architecture. Embedded Systems2 Memory Hierarchy Registers Cache RAM Disk L2 Cache Speed (faster) Cost (cheaper per-byte)
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.
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.
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.
Performance Computer Organization II 1 Computer Science Dept Va Tech January 2009 © McQuain & Ribbens Defining Performance Which airplane has.
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.
CSE 340 Computer Architecture Summer 2016 Understanding Performance.
COD Ch. 1 Introduction + The Role of Performance.
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
Computer Architecture & Operations I
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?
Computer Architecture & Operations I
Prof. Hsien-Hsin Sean Lee
Morgan Kaufmann Publishers
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.
Performance Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
January 25 Did you get mail from Chun-Fa about assignment grades?
Computer Performance Read Chapter 4
Performance.
Chapter 2: Performance CS 447 Jason Bakos Fall 2001 CS 447.
Computer Organization and Design Chapter 4
CS2100 Computer Organisation
Presentation transcript:

1  1998 Morgan Kaufmann Publishers How to measure, report, and summarize performance (suorituskyky, tehokkuus)? What factors determine the performance of a computer? Critical to purchase and design decisions –best performance? –least cost? –best performance/cost? Questions: 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

2  1998 Morgan Kaufmann Publishers Response Time (execution time) (vasteaika, laskenta-aika) — The time between the start and completion of a task Throughput (tuotos) — The total amount of work done in a given time Q: If we replace the processor with a faster one, what do we change? A: Decrease response time and increase throughput Q: If we add an additional processor to a system, what do we change? A: Increase throughput Computer Performance

3  1998 Morgan Kaufmann Publishers For some program running on machine X, Performance X = 1 / Execution time X "X is n times faster than Y" n = Performance X / Performance Y = Execution time Y / Execution time X Problem: Machine A runs a program in 10 seconds and machine B in 15 seconds. How much faster is A than B? Answer: n = Performance A / Performance B = Execution time B /Execution time A = 15/10 = 1.5 A is 1.5 times faster than B. Book's Definition of Performance

4  1998 Morgan Kaufmann Publishers Elapsed Time (kulunut/käytetty aika), wall-clock time or response time –counts everything (disk and memory accesses, I/O, etc.) –a useful number, but often not good for comparison purposes 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 Execution Time

5  1998 Morgan Kaufmann Publishers Clock Cycles Instead of reporting execution time in seconds, we often use cycles Execution time = # of clock cycles cycle time Clock “ticks” indicate when to start activities (one abstraction): cycle time (period) = time between ticks = seconds per cycle clock rate (frequency) = cycles per second (1 Hz = 1 cycle/sec) A 200 MHz clock has a cycle time time seconds program  cycles program  seconds cycle 200  10 6 Hz 1 = 5 ns

6  1998 Morgan Kaufmann Publishers So, to improve performance (everything else being equal) you can either –reduce the # of required clock cycles for a program or –decrease the clock period or, said another way, increase the clock frequency. How to Improve Performance

7  1998 Morgan Kaufmann Publishers 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 (more later) e.g. memory operations spend time, not cycles Another point: the same instruction might require a different number of cycles on a different machine circuits have been implemented in different ways time Different numbers of cycles for different instructions

8  1998 Morgan Kaufmann Publishers A 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 technology to substantially increase the clock rate, but 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. What clock rate should we tell the designer to target?” Clock cycles A = 10 s * 400 MHz = 4 * 10 9 cycles Clock cycles B = 1.2 * 4 * 10 9 cycles = 4.8 * 10 9 cycles Execution time = # of clock cycles * cycle time Clock rate B = Clock cycles B / Execution time B = 4.8 * 10 9 cycles / 6 s = 800 MHz Example

9  1998 Morgan Kaufmann Publishers 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) AVERAGE VALUE! 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 Now that we understand cycles

10  1998 Morgan Kaufmann Publishers Performance Performance is determined by execution time Related variables –# 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.

11  1998 Morgan Kaufmann Publishers 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? Time per instruction: for A 2.0 * 10 ns = 20 ns for B 1.2 * 20 ns = 24 ns A is 24/20 = 1.2 times faster 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?Answer: # of instructions CPI Example

12  1998 Morgan Kaufmann Publishers A compiler designer has two alternatives for a certain code sequence.There are three different classes of instructions: A, B, and C, and they require one, two, and three cycles, respectively. The first 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? What are the CPI values? Sequence 1: 2 * 1+1 * 2+2 * 3 = 10 cycles; CPI 1 = 10 / 5 = 2 Sequence 2: 4 * 1+1 * 2+1 * 3 = 9 cycles; CPI 2 = 9 / 6 = 1.5 Sequence 2 is faster. # of Instructions Example

13  1998 Morgan Kaufmann Publishers MIPS Million Instructions Per Second MIPS = instruction count/(execution time * 10 6 ) Depends on –clock frequency –cycles/instruction (may vary even on a single machine) MIPS is easy to understand but –does not take into account the capabilities of the instructions; the instruction counts of different instruction sets differ –varies between programs even on the same computer –can vary inversely with performance!

14  1998 Morgan Kaufmann Publishers Two compilers are being tested for a 100 MHz machine with three different classes of instructions: A, B, and C, which require one, two, and three cycles, respectively. Compiler 1: Compiled code uses 5 million Class A, 1 million Class B, and 1 million Class C instructions. Compiler 2: Compiled code uses 10 million Class A, 1 million Class B, and 1 million Class C instructions. Which sequence will be faster according to MIPS? Which sequence will be faster according to execution time? MIPS example

15  1998 Morgan Kaufmann Publishers Cycles and instructions 1: 10 million cycles, 7 million instructions 2: 15 million cycles, 12 million instructions Execution time = Clock cycles/Clock rate Execution time 1 = 10 * 10 6 / 100 * 10 6 = 0.1 s Execution time 2 = 15 * 10 6 / 100 * 10 6 = 0.15 s MIPS = Instruction count/(Execution time * 10 6 ) MIPS 1 = 7 * 10 6 / 0.1 * 10 6 = 70Explanation: Compiler 2 MIPS 2 = 12 * 10 6 / 0.15 * 10 6 = 80uses more single cycle instructions MIPS example

16  1998 Morgan Kaufmann Publishers 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 SPEC (System Performance Evaluation Cooperative) –companies have agreed on a set of real programs and inputs –can still be abused –valuable indicator of performance (and compiler technology) Benchmarks

17  1998 Morgan Kaufmann Publishers SPEC ‘95

18  1998 Morgan Kaufmann Publishers SPEC ‘89 Compiler effects on performance depend on applications.

19  1998 Morgan Kaufmann Publishers SPEC ‘95 Organisational enhancements enhance performance. Doubling the clock rate does not double the performance.

20  1998 Morgan Kaufmann Publishers Version 1 Execution Time After Improvement = Execution Time Unaffected + Execution Time Affected / Amount of Improvement Version 2 Speedup = Performance after improvement / Performance before improvement = Execution time before improvement / Execution time after improvement Amdahl's Law

21  1998 Morgan Kaufmann Publishers Before: After: Execution time:before n + a after n + a/p Principle: Make the common case fast Amdahl's Law su na n a p    n n a a/p

22  1998 Morgan Kaufmann Publishers 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?" 100 s/4 = 80 s/n + 20 s 5 s = 80s/n n= 80 s/ 5 s = 16 Amdahl's Law

23  1998 Morgan Kaufmann Publishers Example: A benchmark program spends half of the time executing floating point instructions. We improve the performance of the floating point unit by a factor of four. What is the speedup? Time before 10s (supposition) Time after = 5s + 5s/4 = 6.25 s Speedup = 10/6.25 = 1.6 Amdahl's Law