Docsity

Exploring Computer Performance: Instruction Count, CPI, and Clock Rate, Apuntes de Ingeniería Infórmatica

Toggle sidebar
bg1
EC14-15 Chapter 1.1 Dept. of Comp. Arch., UMA, 2014
EC 14-15
Computer Organization
Fall 2014
Chapter 1: Measuring &
Understanding Performance
Mª Angeles González Navarro
www.ac.uma.es/~angeles
[Adapted from Mary Jane Irwin’s slides (PSU) based on Computer
Organization and Design, 4th Edition, Patterson & Hennessy, © 2009, MK]
EC14-15 Chapter 1.2 Dept. of Comp. Arch., UMA, 2014
The Computer Revolution
! Progress in computer technology
● Underpinned by Moore’s Law
! Makes novel applications feasible
● Computers in automobiles
● Cell phones
● Human genome project
● World Wide Web
● Search Engines
! Computers are pervasive
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Vista previa parcial del texto

¡Descarga Exploring Computer Performance: Instruction Count, CPI, and Clock Rate y más Apuntes en PDF de Ingeniería Infórmatica solo en Docsity!

EC14-15 Chapter 1.1 (^) Dept. of Comp. Arch., UMA, 2014

EC 14-

Computer Organization

Fall 2014

Chapter 1: Measuring &

Understanding Performance

Mª Angeles González Navarro

www.ac.uma.es/~angeles

[email protected]

[Adapted from Mary Jane Irwin’s slides (PSU) based on Computer Organization and Design, 4th^ Edition , Patterson & Hennessy, © 2009, MK]

The Computer Revolution

! Progress in computer technology

● Underpinned by Moore’s Law

! Makes novel applications feasible

● Computers in automobiles

● Cell phones

● Human genome project

● World Wide Web

● Search Engines

! Computers are pervasive

EC14-15 Chapter 1.3 (^) Dept. of Comp. Arch., UMA, 2014 Classes of Computers ! Desktop computers

● Designed to deliver good performance to a single user at low

cost usually executing 3rd^ party software, usually incorporating a

graphics display, a keyboard, and a mouse

! Servers

● Used to run larger programs for multiple, simultaneous users

typically accessed only via a network and that places a greater

emphasis on dependability and (often) security

! Supercomputers

● A high performance, high cost class of servers with hundreds to

thousands of processors, terabytes of memory and petabytes of

storage that are used for high-end scientific and engineering

applications

! Embedded computers (processors)

● A computer inside another device used for running one

predetermined application

The Processor Market embedded growth >> desktop growth ! Where else are embedded processors found?

EC14-15 Chapter 1.7 (^) Dept. of Comp. Arch., UMA, 2014 The Processor Market embedded growth >> desktop growth Embedded Processor Characteristics The largest class of computers spanning the widest range of applications and performance ! Often have minimum performance requirements. Example? ! Often have stringent limitations on cost. Example? ! Often have stringent limitations on power consumption. Example? ! Often have low tolerance for failure. Example?

EC14-15 Chapter 1.9 (^) Dept. of Comp. Arch., UMA, 2014 Servers and supercomputers ! Servers and supercomputing market

● Google: porting the search engine for ARM and PowerPC

● AMD Seattle Server-on-a-Chip based on Cortex-A57 (v8)

● E4’s EK003 Servers: X-Gene ARM A57 (8 cores) + K

● Mont Blanc project: supercomputer made of ARM

  • Once commodity processors took over
  • Be prepared for when mobile processors do so Supercomputers (top500, Jun 2014 ) ! http://www.top500.org/lists/2014/

EC14-15 Chapter 1.13 (^) Dept. of Comp. Arch., UMA, 2014 Below the Program ! System software

● Operating system – supervising program that interfaces the

user’s program with the hardware (e.g., Linux, MacOS,

Windows)

  • Handles basic input and output operations
  • Allocates storage and memory
  • Schedules tasks & Provides for protected sharing among multiple applications

● Compiler – translate programs written in a high-level language

(e.g., C, Java) into instructions that the hardware can execute

Systems software

Applications software

Hardware

Written in high-level language Below the Program, Con’t ! High-level language program (in C) swap (int v[], int k) (int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; ) ! Assembly language program (for MIPS) swap: sll $2, $5, 2 add $2, $4, $ lw $15, 0($2) lw $16, 4($2) sw $16, 0($2) sw $15, 4($2) jr $ ! Machine (object, binary) code (for MIPS) 000000 00000 00101 0001000010000000 000000 00100 00010 0001000000100000

... C compiler assembler one-to-many one-to-one

EC14-15 Chapter 1.15 (^) Dept. of Comp. Arch., UMA, 2014 Advantages of Higher-Level Languages? ! Higher-level languages ! As a result, very little programming is done today at the assembler level 

● Allow the programmer to think in a more natural language and

for their intended use (Fortran for scientific computation,

Cobol for business programming, Lisp for symbol

manipulation, Java for web programming, …)

● Improve programmer productivity – more understandable

code that is easier to debug and validate

● Improve program maintainability

● Allow programs to be independent of the computer on which

they are developed (compilers and assemblers can translate

high-level language programs to the binary instructions of any

machine)

● Emergence of optimizing compilers that produce very efficient

assembly code optimized for the target machine

Under the Covers ! Same components for all kinds of computer

● Five classic components of a computer – input, output, memory,

datapath, and control

! datapath + control = processor (CPU) ! Input/output includes

User-interface devices

Display, keyboard,

mouse

Storage devices

Hard disk, CD/DVD,

flash

Network adapters

For communicating

with other

computers

EC14-15 Chapter 1.19 (^) Dept. of Comp. Arch., UMA, 2014 Processors for desktops and laptops

! Desktops (35 – 130W) and laptops (15– 57 W):

http://techguru3d.com/4th-gen-intel-haswell-processors- http://www.techspot.com/photos/article/770-amd-a8-7600-kaveri/ architecture-and-lineup/ Intel Haswell AMD APU Kaveri ! Haxwell (22 nm)

● 2-20 MB L3 Cache

● > 1400 millions of TRTs

● GPU with 20-40 EU

! Kaveri (28 nm)

● 2-4 cores

● 4 MB L2 (resizable)

● GPU with 8-512 EU

A Safe Place for Data ! Volatile main memory

● Loses instructions and data when power off

! Non-volatile secondary memory

● Magnetic disk

● Flash memory

● Optical disk (CDROM, DVD)

EC14-15 Chapter 1.21 (^) Dept. of Comp. Arch., UMA, 2014 Networks ! Communication and resource sharing ! Local area network (LAN): Ethernet

● Within a building

! Wide area network (WAN): the Internet ! Wireless network: WiFi, Bluetooth Communicating to the Outside World: Cluster Networking This online section describes the networking hardware and soft ware used to connect the nodes of cluster together. As there are whole books and courses just on networking, this section only introduces the main terms and concepts. While our example is networking, the techniques we describe apply to storage controllers and other I/O devices as well. Ethernet has dominated local area networks for decades, so it is not surprising that clusters primarily rely on Ethernet as the cluster interconnect. It became commercially popular at 10 Megabits per second link speed in the 1980s, but today 1 Gigabit per second Ethernet is standard and 10 Gigabit per second is being deployed in datacenters. Figure 6.9.1 shows a network interface card (NIC) for 10 Gigabit Ethernet. Computers offer high-speed links to plug in fast I/O devices like this NIC. While there used to be separate chips to connect the microprocessor to the memory and high-speed I/O devices, thanks to Moore’s Law these functions have been absorbed into the main chip in recent offerings like Intel’s Sandy Bridge. A popular high- speed link today is PCIe , which stands for Peripheral Component Interconnect Express. It is called a link in that the basic building block, called a serial lane, consists of just four wires: two for receiving data and two for transmitting data. This small number contrasts with an earlier version of PCI that consisted of 64

FIGURE 6.9.1 The NetFPGA 10-Gigabit Ethernet card (see http://netfpga.org/), which connects up to four 10-Gigabit/sec Ethernet links. It is an FPGA-based open platform for network research and classroom experimentation. The DMA engine and the four “MAC chips” in Figure 6.9.2 are just portions of the Xilinx Virtex FPGA in the middle of the board. The four PHY chips in Figure 6.9.2 are the four black squares just to the right of the four white rectangles on the left edge of the board, which is where the Ethernet cables are plugged in. NetFPGA 10 Gigabit Ethernet card Abstractions ! Abstraction helps us deal with complexity

● Hide lower-level detail

! Instruction set architecture (ISA)

● The hardware/software interface

! Application binary interface

● The ISA plus system software interface

! Implementation

● The details underlying and interface

The BIG Picture

EC14-15 Chapter 1.25 (^) Dept. of Comp. Arch., UMA, 2014 Courtesy, Intel ® 2014: Quad Core Haswell with 1.4B transistors Moore’s Law feature size & die size ! In 1965, Intel’s Gordon Moore predicted that the number of transistors that can be integrated on single chip would double about every two years Technology Scaling Road Map (ITRS) Year 2006 2008 2010 2012 2014 Feature size (nm) 65 45 32 22 14 Intg. Capacity (BT) 4 6 16 32 50 ! Fun facts about 45nm transistors

● 30 million can fit on the head of a pin

● You could fit more than 2,000 across the width of a human

hair

● If car prices had fallen at the same rate as the price of a

single transistor has since 1968, a new car today would cost

about 1 cent

EC14-15 Chapter 1.27 (^) Dept. of Comp. Arch., UMA, 2014 Another Example of Moore’s Law Impact 16K

64K 256K

1M

4M

16M

64M

128M

256M

512M

1G

DRAM capacity growth over 3 decades But What Happened to Clock Rates and Why? Power&(Was)&* ! Clock rates hit a “power wall”

EC14-15 Chapter 1.31 (^) Dept. of Comp. Arch., UMA, 2014 The Sea Change: multiprocessors

! The power challenge has forced a change in the design of

microprocessors

● Since 2002 the rate of improvement in the response time of programs on desktop computers has slowed from a factor of 1.5 per year to less than a factor of 1.2 per year

! As of 2006 all desktop and server companies are shipping

microprocessors with multiple processors – cores – per chip

Product AMD Kaveri Intel Haswell Samsung Exynos Octa Qualcomm Snapdragon Cores per chip

2-4 + GPU 4 + GPU 4 + 4 4 + GPU +DSP

Clock rate ~4 GHz ~3.0 GHz 1.3-1.8 GHz 2.3 GHz Power ~100 W ~15-100W < 10 W < 10 W

! Plan of record is to double the number of cores per chip per

generation (about every two years)

The sea change: multiprocessors ! Multicore microprocessors

● More than one processor per chip

! Requires explicitly parallel programming

● Compare with instruction level parallelism

  • Hardware executes multiple instructions at once
  • Hidden from the programmer

● Hard to do

  • Programming for performance
  • Load balancing
  • Optimizing communication and synchronization

EC14-15 Chapter 1.33 (^) Dept. of Comp. Arch., UMA, 2014 Performance Metrics ! Purchasing perspective

● given a collection of machines, which has the

  • best performance?
  • least cost?
  • best cost/performance? ! Design perspective

● faced with design options, which has the

  • best performance improvement?
  • least cost?
  • best cost/performance? ! Both require

● basis for comparison

● metric for evaluation

! Our goal is to understand what factors in the architecture contribute to overall system performance and the relative importance (and cost) of these factors Throughput versus Response Time ! Response time (execution time) – the time between the start and the completion of a task

● Important to individual users

! Throughput (bandwidth) – the total amount of work done in a given unit time

● Important to data center managers

! Will need different performance metrics as well as a different set of applications to benchmark embedded and desktop computers, which are more focused on response time, versus servers, which are more focused on throughput ! How are response time and throughput affected by

● Replacing the processor with a faster version?

● Adding more processors?

Well focus on response time for now…

EC14-15 Chapter 1.37 (^) Dept. of Comp. Arch., UMA, 2014 Relative Performance Example ! If computer A runs a program in 10 seconds and computer B runs the same program in 15 seconds, how much faster is A than B? We know that A is n times faster than B if performanceA execution_timeB -------------------- = --------------------- = n performanceB execution_timeA 15 ------ = 1. 10 The performance ratio is So A is 1.5 times faster than B Measuring Execution Time ! Elapsed time

● Total response time= Wall clock Time = Elapsed Time

  • it includes all aspects to complete a task
  • Processing, I/O operations, OS overhead, idle time

● Determines system performance

! Productivity

● Throughput: the total amount of work done in a given unit time

EC14-15 Chapter 1.39 (^) Dept. of Comp. Arch., UMA, 2014 Measuring Execution Time ! CPU time

● Time spent processing a given job

  • Discounts I/O time, other jobs’ shares

● Comprises user CPU time and system CPU time

● Different programs are affected differently by CPU and system

performance

! Example: ‘time’ in Unix: 90.7u 12.9s 2:39 65% ! Our goal: user CPU time + system CPU time user CPU time system CPU time Elapsed time (^) CPU utiliz.: (90.7 + 12.9) / (2*60 + 39) I/O and other processes Review: Machine Clock Rate ! Clock rate (clock cycles per second in MHz or GHz) is inverse of clock cycle time (clock period) CC = 1 / CR one clock period 10 nsec clock cycle => 100 MHz clock rate 5 nsec clock cycle => 200 MHz clock rate 2 nsec clock cycle => 500 MHz clock rate 1 nsec (10-9) clock cycle => 1 GHz (10^9 ) clock rate 500 psec clock cycle => 2 GHz clock rate 250 psec clock cycle => 4 GHz clock rate 200 psec clock cycle => 5 GHz clock rate