Defining Performance. Performance 1. Which airplane has the best performance? Computer Organization II Ribbens & McQuain.

Similar documents
Defining Performance. Performance. Which airplane has the best performance? Boeing 777. Boeing 777. Boeing 747. Boeing 747

Computer Performance. Reread Chapter Quiz on Friday. Study Session Wed Night FB 009, 5pm-6:30pm

Measure, Report, and Summarize Make intelligent choices See through the marketing hype Key to understanding effects of underlying architecture

IC220 Slide Set #5B: Performance (Chapter 1: 1.6, )

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 1. Computer Abstractions and Technology

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 1. Computer Abstractions and Technology

Chapter 1. Computer Abstractions and Technology. Lesson 2: Understanding Performance

The bottom line: Performance. Measuring and Discussing Computer System Performance. Our definition of Performance. How to measure Execution Time?

Performance evaluation. Performance evaluation. CS/COE0447: Computer Organization. It s an everyday process

Performance, Power, Die Yield. CS301 Prof Szajda

The Computer Revolution. Classes of Computers. Chapter 1

What is Good Performance. Benchmark at Home and Office. Benchmark at Home and Office. Program with 2 threads Home program.

Response Time and Throughput

Chapter 1. Computer Abstractions and Technology. Adapted by Paulo Lopes, IST

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 1. Computer Abstractions and Technology

Chapter 1. The Computer Revolution

TDT4255 Computer Design. Lecture 1. Magnus Jahre

Performance. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

ECE369: Fundamentals of Computer Architecture

Computer Organization & Assembly Language Programming (CSE 2312)

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Course web site: teaching/courses/car. Piazza discussion forum:

COSC3330 Computer Architecture Lecture 7. Datapath and Performance

CO Computer Architecture and Programming Languages CAPL. Lecture 15

An Introduction to Parallel Architectures

1.6 Computer Performance

Performance COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

ECE 486/586. Computer Architecture. Lecture # 3

EECS2021. EECS2021 Computer Organization. EECS2021 Computer Organization. Morgan Kaufmann Publishers September 14, 2016

ECE C61 Computer Architecture Lecture 2 performance. Prof. Alok N. Choudhary.

Which is the best? Measuring & Improving Performance (if planes were computers...) An architecture example

The Role of Performance

EECS2021E EECS2021E. The Computer Revolution. Morgan Kaufmann Publishers September 12, Chapter 1 Computer Abstractions and Technology 1

MEASURING COMPUTER TIME. A computer faster than another? Necessity of evaluation computer performance

Rechnerstrukturen

Designing for Performance. Patrick Happ Raul Feitosa

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Lecture 2: Computer Performance. Assist.Prof.Dr. Gürhan Küçük Advanced Computer Architectures CSE 533

Computer and Information Sciences College / Computer Science Department CS 207 D. Computer Architecture

CSE2021 Computer Organization. Computer Abstractions and Technology

Copyright 2012, Elsevier Inc. All rights reserved.

Quiz for Chapter 1 Computer Abstractions and Technology

Chapter 1. and Technology

CPE300: Digital System Architecture and Design

ECE331: Hardware Organization and Design

TDT 4260 lecture 2 spring semester 2015

CpE 442 Introduction to Computer Architecture. The Role of Performance

Transistors and Wires

Computer Architecture A Quantitative Approach, Fifth Edition. Chapter 1. Copyright 2012, Elsevier Inc. All rights reserved. Computer Technology

CSCI 402: Computer Architectures. Computer Abstractions and Technology (4) Fengguang Song Department of Computer & Information Science IUPUI.

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition. Chapter 1. Computer Abstractions and Technology

EECS4201 Computer Architecture

Performance Analysis

COMPUTER ORGANIZATION AND DESIGN

Fundamentals of Quantitative Design and Analysis

Chapter 1. Computer Abstractions and Technology

CSE 141 Summer 2016 Homework 2

Lecture 3: Evaluating Computer Architectures. How to design something:

Performance of computer systems

Chapter 1. Instructor: Josep Torrellas CS433. Copyright Josep Torrellas 1999, 2001, 2002,

EIE/ENE 334 Microprocessors

Computer Architecture

Computer Architecture. Minas E. Spetsakis Dept. Of Computer Science and Engineering (Class notes based on Hennessy & Patterson)

CMSC 611: Advanced Computer Architecture

Engineering 9859 CoE Fundamentals Computer Architecture

Computer Performance Evaluation: Cycles Per Instruction (CPI)

Overview of Today s Lecture: Cost & Price, Performance { 1+ Administrative Matters Finish Lecture1 Cost and Price Add/Drop - See me after class

Computer System. Performance

Three major components of Embedded Systems

Outline Marquette University

Performance, Cost and Amdahl s s Law. Arquitectura de Computadoras

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds?

CMSC 611: Advanced Computer Architecture

CS3350B Computer Architecture CPU Performance and Profiling

Pipelining. CS701 High Performance Computing

CS 110 Computer Architecture

Computer Architecture. What is it?

Computer Architecture. Chapter 1 Part 2 Performance Measures

This Unit. CIS 501 Computer Architecture. As You Get Settled. Readings. Metrics Latency and throughput. Reporting performance

Page 1. Program Performance Metrics. Program Performance Metrics. Amdahl s Law. 1 seq seq 1

Lecture - 4. Measurement. Dr. Soner Onder CS 4431 Michigan Technological University 9/29/2009 1

Evaluating Computers: Bigger, better, faster, more?

Performance. February 12, Howard Huang 1

Chapter 1. Computer Abstractions and Technology. Jiang Jiang

CS61C - Machine Structures. Week 6 - Performance. Oct 3, 2003 John Wawrzynek.

Computer Organization and Design: The Hardware/Software Interface by Patterson and Hennessy

Performance. CS 3410 Computer System Organization & Programming. [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon]

Computer Performance. Relative Performance. Ways to measure Performance. Computer Architecture ELEC /1/17. Dr. Hayden Kwok-Hay So

Instructor Information

Assessing and Understanding Performance

Review: latency vs. throughput

Chapter 1: Fundamentals of Quantitative Design and Analysis

LECTURE 1. Introduction

Fundamentals of Computer Design

Reporting Performance Results

Chapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance

Syllabus. Chapter 1. Course Goals. Course Information. Course Goals. Course Information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

CS430 Computer Architecture

Transcription:

Defining Performance Performance 1 Which airplane has the best performance? Boeing 777 Boeing 777 Boeing 747 BAC/Sud Concorde Douglas DC-8-50 Boeing 747 BAC/Sud Concorde Douglas DC- 8-50 0 100 200 300 400 500 Passenger Capacity 0 2000 4000 6000 8000 10000 Cruising Range (miles) Boeing 777 Boeing 777 Boeing 747 BAC/Sud Concorde Douglas DC-8-50 Boeing 747 BAC/Sud Concorde Douglas DC- 8-50 0 500 1000 1500 Cruising Speed (mph) 0 100000 200000 300000 400000 Passengers x mph

Computer Performance: TIME, TIME, TIME Performance 2 Response Time (latency): how long it takes to complete a task Throughput: total # of tasks completed per unit time For now, we will focus on response time and define Performance 1 Execution Time

Execution Time Performance 3 Elapsed 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

Relative Performance 1 Performance Execution Time Performance 4 Relative Performance Performance Performance X Execution Time Execution Time Y Y X (aka speedup) Example: time taken to run a program 10s on A, 15s on B Execution Time B / Execution Time A = 15s / 10s = 1.5 So A is 1.5 times as fast as B (and B is 2/3 as fast as A)

CPU Clocking Performance 5 Operation of digital hardware elements is governed by a constant-rate clock. Clock (cycles) Data transfer and computation Update state Clock period Clock period: duration of a clock cycle e.g., 250ps = 0.25ns = 250 10 12 s Clock frequency (rate): cycles per second e.g., 4.0GHz = 4000MHz = 4.0 10 9 Hz 1 Clock Cycle Time Clock Rate

CPU Time Performance 6 CPU Time CPU Clock Cycles Clock Cycle Time CPU Clock Cycles Clock Rate Performance improved by Reducing number of clock cycles Increasing clock rate Hardware designer must often trade off clock rate against cycle count

CPU Time Example Performance 7 Computer A: 2GHz clock, 10s CPU time (to execute a particular program) Designing Computer B Aim for 6s CPU time (to execute the same program) Can increase clock rate, but that requires a 20% increase in clock cycles How fast must Computer B clock be? Clock Rate B Clock Cycles B 1.2 Clock Cycles CPU Time 6s B A Clock Cycles CPU Time Clock Rate A A A 10s 2GHz 2010 9 Clock Rate B 9 9 1.2 2010 2410 4GHz 6s 6s

1st instruction 2nd instruction 3rd instruction 4th 5th 6th... How many cycles are required for a program? Performance 8 Could assume that number of cycles equals number of instructions: time This assumption is incorrect, - different instructions may take different numbers of cycles on same machine - same instruction may take different number of cycles on different machines Why? hint: remember that these are machine instructions, not lines of C code

Now that we understand cycles Performance 9 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) 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

Performance Performance 10 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 these variables (alone) is indicative of performance, when none really is

CPI Example Performance 11 Computer A: Cycle Time = 250ps, CPI = 2.0 Computer B: Cycle Time = 500ps, CPI = 1.2 Same ISA Which is faster, and by how much? CPU Time Instruction Count CPI Cycle Time A A A I2.0 250ps I500ps A is faster CPU Time Instruction Count CPI Cycle Time B B B I1.2500ps I600ps CPU TimeB I600ps CPU Time I500ps A 1.2 by this much

CPI in More Detail Performance 12 If different instruction classes take different numbers of cycles Clock Cycles n i1 (CPI Instruction Count i i) Weighted average CPI CPI Clock Cycles Instruction Count n i1 CPI i Instruction Counti Instruction Count Relative frequency

CPI Example Performance 13 Alternative compiled code sequences using instructions in classes A, B, C Class A B C CPI for class 1 2 3 IC in sequence 1 2 1 2 IC in sequence 2 4 1 1 Sequence 1: A B C A C - IC = 5 - Clock Cycles = 2 1 + 1 2 + 2 3 = 10 - Avg. CPI = 10/5 = 2.0 Sequence 2: A B A A C A - IC = 6 - Clock Cycles = 4 1 + 1 2 + 1 3 = 9 - Avg. CPI = 9/6 = 1.5

# of Instructions Example Performance 14 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 one, two, and three 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?

MIPS example Performance 15 Two different compilers are being tested for a 4 GHz. machine with three different classes of instructions: Class A, Class B, and Class C, which require one, two, and three cycles (respectively). Both compilers are used to produce code for a large piece of software. The first compiler's code uses 5 million Class A instructions, 1 million Class B instructions, and 2 million Class C instructions. The second compiler's code uses 10 million Class A instructions, 1 million Class B instructions, and 1 million Class C instructions. Which sequence will be faster according to MIPS? Which sequence will be faster according to execution time?

Amdahl's Law Performance 16 Execution Time After Improvement = Execution Time Unaffected + ( Execution Time Affected / Amount of Improvement ) Example: Suppose a program runs in 100 seconds on a machine, with multiply instructions 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? Principle: Make the common case fast

Example 1 Performance 17 Suppose we enhance a machine making all floating-point instructions run five times faster. If the execution time of some benchmark program 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?

Example 2 Performance 18 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 (i.e., take 1/3 as long to run). One benchmark we are considering runs for 90 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?

Remember Performance 19 Performance is specific to a particular program/s - Total execution time is a consistent summary of performance For a given architecture performance increases come from: - increases in clock rate (if that yields no adverse CPI affects) - improvements in processor organization that lower CPI - compiler enhancements that lower CPI (different distribution of instructions) and/or instruction count - algorithm/language choices that affect instruction count and/or instruction distribution Pitfall: expecting improvement in one aspect of a machine s performance to affect the total performance

Performance Summary Performance 20 CPU Time Instructions Clock cycles Seconds Program Instruction Clock cycle Performance depends on Algorithm: affects IC, possibly CPI Programming language: affects IC, CPI Compiler: affects IC, CPI Instruction set architecture: affects IC, CPI, T c

Benchmarks Performance 21 benchmark A program or collection of programs selected for use in comparing computer performance Kinds of benchmarks: Kernels (e.g. matrix multiply) Toy programs (e.g. sorting) Synthetic benchmarks (e.g. Dhrystone) Benchmark suites (e.g. SPEC06fp, TPC-C) A benchmark can be used to isolate different aspects of hardware performance.

SPEC Integer Benchmarks Performance 22 FIGURE 1.18 SPECINTC2006 benchmarks running on a 2.66 GHz Intel Core i7 920. As the equation on page 35 explains, execution time is the product of the three factors in this table: instruction count in billions, clocks per instruction (CPI), and clock cycle time in nanoseconds. SPECratio is simply the reference time, which is supplied by SPEC, divided by the measured execution time. The single number quoted as SPECINTC2006 is the geometric mean of the SPECratios.

Single-processor Evolution Performance 23 Move to multi-processor