EEM 486: Computer Architecture. Lecture 4. Performance



Similar documents
Chapter 2. Why is some hardware better than others for different programs?

Lecture 3: Evaluating Computer Architectures. Software & Hardware: The Virtuous Cycle?

CPU Performance Evaluation: Cycles Per Instruction (CPI) Most computers run synchronously utilizing a CPU clock running at a constant clock rate:

CPU Performance. Lecture 8 CAP

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

Unit 4: Performance & Benchmarking. Performance Metrics. This Unit. CIS 501: Computer Architecture. Performance: Latency vs.

Performance evaluation

Types of Workloads. Raj Jain. Washington University in St. Louis

on an system with an infinite number of processors. Calculate the speedup of

! Metrics! Latency and throughput. ! Reporting performance! Benchmarking and averaging. ! CPU performance equation & performance trends

CSEE W4824 Computer Architecture Fall 2012

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Quantitative Computer Architecture

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

Instruction Set Architecture (ISA) Design. Classification Categories

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1

Choosing a Computer for Running SLX, P3D, and P5

Week 1 out-of-class notes, discussions and sample problems

Central Processing Unit (CPU)

Introduction to Microprocessors

Processor Architectures

Computer Architecture

Achieving Nanosecond Latency Between Applications with IPC Shared Memory Messaging

Pipelining Review and Its Limitations

System Models for Distributed and Cloud Computing

CISC, RISC, and DSP Microprocessors

Computer Architectures

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Oracle Database Reliability, Performance and scalability on Intel Xeon platforms Mitch Shults, Intel Corporation October 2011

Performance Metrics and Scalability Analysis. Performance Metrics and Scalability Analysis

EC 362 Problem Set #2

64-Bit versus 32-Bit CPUs in Scientific Computing

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Computer Organization. and Instruction Execution. August 22

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Performance metrics for parallel systems

EE361: Digital Computer Organization Course Syllabus

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

CHAPTER 4 MARIE: An Introduction to a Simple Computer

An examination of the dual-core capability of the new HP xw4300 Workstation

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Operating System Impact on SMT Architecture

Business opportunities from IOT and Big Data. Joachim Aertebjerg Director Enterprise Solution Sales Intel EMEA

<Insert Picture Here> T4: A Highly Threaded Server-on-a-Chip with Native Support for Heterogeneous Computing

Introducción. Diseño de sistemas digitales.1

Chapter 2 Logic Gates and Introduction to Computer Architecture

2: Computer Performance

Performance Characterization of SPEC CPU2006 Integer Benchmarks on x Architecture

Parallel Algorithm Engineering

PROBLEMS. which was discussed in Section

LSN 2 Computer Processors

Full Drive Encryption with Samsung Solid State Drives

Intel Pentium 4 Processor on 90nm Technology

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture?

CS 147: Computer Systems Performance Analysis

Lattice QCD Performance. on Multi core Linux Servers

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Maximize Performance and Scalability of RADIOSS* Structural Analysis Software on Intel Xeon Processor E7 v2 Family-Based Platforms

Chapter 5 Instructor's Manual

Introduction to RISC Processor. ni logic Pvt. Ltd., Pune

Bindel, Spring 2010 Applications of Parallel Computers (CS 5220) Week 1: Wednesday, Jan 27

Computer Architecture TDTS10

Compiler-Assisted Binary Parsing

How To Understand The Design Of A Microprocessor

Big Data Performance Growth on the Rise

On the Importance of Thread Placement on Multicore Architectures

Parallelism and Cloud Computing

Virtuoso and Database Scalability

Generations of the computer. processors.

Performance Impacts of Non-blocking Caches in Out-of-order Processors

The Foundation for Better Business Intelligence


The Central Processing Unit:

OBJECTIVE ANALYSIS WHITE PAPER MATCH FLASH. TO THE PROCESSOR Why Multithreading Requires Parallelized Flash ATCHING

picojava TM : A Hardware Implementation of the Java Virtual Machine

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

Instruction Set Architecture (ISA)

WHITE PAPER FUJITSU PRIMERGY SERVERS PERFORMANCE REPORT PRIMERGY BX620 S6

Intel 8086 architecture

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

ClearPath MCP Software Series Compatibility Guide

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

Communicating with devices

İSTANBUL AYDIN UNIVERSITY

Why Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat

In the Beginning The first ISA appears on the IBM System 360 In the good old days

Comparing major cloud-service providers: virtual processor performance. A Cloud Report by Danny Gee, and Kenny Li

361 Computer Architecture Lecture 14: Cache Memory

Web Application s Performance Testing

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Performance monitoring of the software frameworks for LHC experiments

Performance Monitoring of the Software Frameworks for LHC Experiments

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

Windows Server Performance Monitoring

Transcription:

EEM 486: Computer Architecture Lecture 4 Performance EEM 486 Performance Purchasing perspective Given a collection of machines, which has the» Best performance?» Least cost?» Best performance / cost? Design perspective Faced with design options, which has the» Best performance improvement?» Least cost?» Best performance / cost? Both require basis for comparison metric for evaluation Our goal: understand cost & performance implication of architectural choices Lec 4.2 1

Which airplane has the best performance? Plane DC to Paris Speed Passengers Throughput (p x mph) Boeing 747 6.5 hours 610 mph 470 286,700 Concorde 3 hours 1350 mph 132 178,200 Performance measure: Speed (cruising speed, range, capacity) Which is the fastest plane? the one with the highest cruising speed the one with the highest throughput OR Lec 4.3 Which airplane has the best performance? Time of Concorde vs. Boeing 747? Concord is 1350 mph / 610 mph = 2.2 times faster = 6.5 hours / 3 hours Throughput of Concorde vs. Boeing 747? Concord is 178,200 pmph / 286,700 pmph = 0.62 times faster Boeing is 286,700 pmph / 178,200 pmph = 1.60 times faster Concord is 2.2 times (120%) faster in terms of flying time Boeing is 1.6 times (60%) faster in terms of throughput Lec 4.4 2

Computer Performance Performance measure: TIME Two notions of computer performance: 1. Execution time 2. Throughput Execution (or Response) Time: Time to complete a given task users want smaller response times Throughput:Total amount of work done in a given time admins want higher throughput Q: If we upgrade a machine with a new processor what do we increase? Q: If we add a new machine to the lab what do we increase? Lec 4.5 User CPU Time 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 Lec 4.6 3

Definitions Performance is in units of things-per-second bigger is better!!! If we are primarily concerned with execution time performance X 1 = execution time X "X is n times faster than Y" means performance performance X n = = Y execution time execution time Y X Q: machine A runs a program in 20 seconds machine B runs the same program in 25 seconds Lec 4.7 Clock Cycles Clock ticks indicate when to start activities cycle time = time between ticks = seconds per cycle clock rate (frequency) = cycles per second (1 Hz = 1 cycle/sec) A 200 Mhz clock has a 1 200 10 6 109 = 5 nanoseconds cycle time time Lec 4.8 4

How many cycles are required for a program? Could assume that # of cycles = # of instructions 1st instruction 2nd instruction 3rd instruction 4th 5th 6th... time This assumption is incorrect, different instructions take different amounts of time Multiplication takes more time than addition Floating point operations take longer than integer ones Accessing memory takes more time than accessing registers Lec 4.9 CPU Time A given program will require some number of instructions (machine instructions) some number of cycles some number of seconds CPU Time = User CPU time for a program CPU Time = CPU clock cycles for a program x Clock cycle time CPU clock cycles for a program = -------------------------------------- Clock rate Lec 4.10 5

Example Our favorite 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 (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? Lec 4.11 CPI CPI (clock cycles per instruction): average number of clock cycles per instr CPU clock cycles for a program = Instruction count x CPI CPU Time = CPU clock cycles for a program x Clock cycle time = Instruction count x CPIx Clock cycle time Instruction count x CPI = ------------------------------ Clock rate Lec 4.12 6

CPI Given that n : number of instruction classes CPI i: average number of cycles per instr for instr class i I : number of instructions of class i i CPU Clock Cycles = n i= 1 CPI i I i CPI = = = CPU Time Clock Rate Instruction Count CPU Clock Cycles Instruction Count n CPIi Ii Instruction Count i= 1 Lec 4.13 Example 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 instrs: 2 of A, 1 of B, and 2 of C The second sequence has 6 instrs: 4 of A, 1 of B, and 1 of C. Which sequence will be faster? How much? What is the CPI for each sequence? Lec 4.14 7

Aspects of CPU Performance CPU time = Seconds Instructions Cycles Seconds = x x Program Program Instruction Cycle Program instr count CPI clock rate x Compiler x x Instr. Set x x Organization x x Technology x Lec 4.15 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. Lec 4.16 8

CPI Example 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? Q: If two machines have the same ISA which of our quantities (e.g., clock rate, CPI, execution time, # of instructions) will always be identical? Lec 4.17 # of Instructions Example 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 instrs: 2 of A, 1 of B, and 2 of C The second sequence has 6 instrs: 4 of A, 1 of B, and 1 of C. Which sequence will be faster? How much? What is the CPI for each sequence? Lec 4.18 9

Benchmarks 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 program and inputs valuable indicator of performance (and compiler technology) can still be abused Lec 4.19 Benchmark Games An embarrassed Intel Corp. acknowledged Friday that a bug in a software program known as a compiler had led the company to overstate the speed of its microprocessor chips on an industry benchmark by 10 percent. However, industry analysts said the coding error was a sad commentary on a common industry practice of cheating on standardized performance tests The error was pointed out to Intel two days ago by a competitor, Motorola came in a test known as SPECint92 Intel acknowledged that it had optimized its compiler to improve its test scores. The company had also said that it did not like the practice but felt to compelled to make the optimizations because its competitors were doing the same thing At the heart of Intel s problem is the practice of tuning compiler programs to recognize certain computing problems in the test and then substituting special handwritten pieces of code Saturday, January 6, 1996 New York Times Lec 4.20 10

SPEC 89 Compiler enhancements and performance 800 700 600 SPEC performance ratio 500 400 300 200 100 0 gcc espresso spice doduc nasa7 li eqntott matrix300 fpppp tomcatv Benchmark Compiler Enhanced compiler Lec 4.21 SPEC95 Eighteen application benchmarks (with inputs) reflecting a technical computing workload Eight integer go, m88ksim, gcc, compress, li, ijpeg, perl, vortex Ten floating-point intensive tomcatv, swim, su2cor, hydro2d, mgrid, applu, turb3d, apsi, fppp, wave5 Must run with standard compiler flags eliminate special undocumented incantations that may not even generate working code for real programs Lec 4.22 11

SPEC CPU2000 Lec 4.23 SPEC 2000 Does doubling the clock rate double the performance? 1400 1200 1000 800 Pentium 4 CFP2000 Pentium 4 CINT2000 600 400 200 Pentium III CINT2000 Pentium III CFP2000 0 500 1000 1500 2000 2500 3000 3500 Clock rate in MHz Lec 4.24 12

SPEC 2000 Can a machine with a slower clock rate have better performance? 1.6 1.4 Pentium M @ 1.6/0.6 GHz Pentium 4-M @ 2.4/1.2 GHz Pentium III-M @ 1.2/0.8 GHz 1.2 1.0 0.8 0.6 0.4 0.2 0.0 SPECINT2000 SPECFP2000 SPECINT2000 SPECFP2000 SPECINT2000 SPECFP2000 Always on/maximum clock Laptop mode/adaptive clock Benchmark and power mode Minimum power/minimum clock Lec 4.25 Alternative Metrics Instruction Count MIPS = ------------------------- Execution Time x 10 6 MIPS can vary inversely with performance! Number of floating point operations in a program MFLOPS = -------------------------------------------------------- Execution Time x 10 6 FP operations perfromed may vary across computers! Lec 4.26 13

MIPS example 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 1 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? Lec 4.27 Amdahl's Law Speedup due to enhancement E: ExTime w/o E Performance w/ E Speedup (E) = -------------------- = ----------------------- ExTime w/ E Performance w/o E Suppose that enhancement E accelerates a fraction F of the task by a factor S and the remainder of the task is unaffected then, ExTime (with E) = ((1-F) + F/S) x ExTime (without E) 1 Speedup (E) = --------------- (1-F) + F/S Lec 4.28 14

Example (RISC Processor) Op Freq Cycles CPI(i) % Time ALU 50% 1.5 23% Load 20% 5 1.0 45% Store 10% 3.3 14% Branch 20% 2.4 18% 2.2 Typical Mix How much faster would the machine be if a better data cache reduced the average load time to 2 cycles? (S= 1/(0.55+ 0.45/2.5)) How does this compare with using branch prediction to shave a cycle off the branch time? (S= 1/(0.82+ 0.18/2)) What if two ALU instructions could be executed at once? Lec 4.29 Summary Performance is specific to a particular program/s Best Metric: Time to execute the program 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 CPI Inst. Count Cycle Time Pitfall: expecting improvement in one aspect of a machine s performance to affect the total performance Lec 4.30 15