Docsity

Performance - Computer Architecture - Slides | ECE 154, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE154
Computer Architecture
Lecture 7
Performance I
October 19, 2006
Ryan Kastner
Electrical and Computer Engineering
University of California, Santa Barbara
Evaluating Cost, Performance, and Cost/Perfo rmance
Key characteristics of six passenger aircraft: all figures are
approximate; some relate to a specific model/configuration of the
aircraft or are averages of cited range of values.
8087514 000145
DC-8-50
3502 2006 400130
Concorde
1809807 450375
Boeing 777
12088512 300250
Boeing 767
2009806 700470
Boeing 747
1208958 300250
Airbus A310
Price
($M)
Speed
(km/h)
Range
(km)
PassengersAircraft
Different Views of performance
Performance from the viewpoint of a passenger: Speed
Note, however, that flight time is but one part of total travel time.
Also, if the travel distance exceeds the range of a faster plane,
a slower plane may be better due to not needing a refueling stop
Performance from the viewpoint of an airline: Throughput
Measured in passenger-km per hour (relevant if ticket price were
proportional to distance traveled, which in reality is not)
Airbus A310 250 ×895 = 0.224 M passenger-km/hr
Boeing 747 470 ×980 = 0.461 M passenger-km/hr
Boeing 767 250 ×885 = 0.221 M passenger-km/hr
Boeing 777 375 ×980 = 0.368 M passenger-km/hr
Concorde 130 ×2200 = 0.286 M passenger-km/hr
DC-8-50 145 ×875 = 0.127 M passenger-km/hr
Performance from the viewpoint of FAA: Safety
Cost Effectiveness: Cost/Performance
Key characteristics of six passenger aircraft: all
figures are approximate; some relate to a specific
model/configuration of the aircraft or are averages
of cited range of values.
8087514 000145DC-8-50
3502 2006 400130
Concorde
1809807 450375B 777
12088512 300250B 767
2009806 700470B 747
1208958 300250A310
Price
($M)
Speed
(km/h)
Range
(km)
Passen-
gers
Aircraft Cost /
Performance
536
434
543
489
1224
630
Throughput
(M P km/hr)
0.224
0.461
0.221
0.368
0.286
0.127
Smaller
values
better
Larger
values
better
pf3
pf4
pf5
pf8

Partial preview of the text

Download Performance - Computer Architecture - Slides | ECE 154 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE

Computer Architecture

Lecture 7

Performance I

October 19, 2006 Ryan Kastner Electrical and Computer Engineering University of California, Santa Barbara

Evaluating Cost, Performance, and Cost/Performance

Key characteristics of six passenger aircraft: all figures are approximate; some relate to a specific model/configuration of the aircraft or are averages of cited range of values.

DC-8-50^145 14 000^87580

Concorde 130 6 400 2 200 350

Boeing 777 375 7 450 980 180

Boeing 767^250 12 300^885120

Boeing 747^470 6 700^980200

Airbus A310^250 8 300^895120

Price ($M)

Speed (km/h)

Range Aircraft Passengers (km)

Different Views of performance

Performance from the viewpoint of a passenger: Speed

Note, however, that flight time is but one part of total travel time. Also, if the travel distance exceeds the range of a faster plane, a slower plane may be better due to not needing a refueling stop

Performance from the viewpoint of an airline: Throughput

Measured in passenger-km per hour (relevant if ticket price were proportional to distance traveled, which in reality is not) Airbus A310 250 × 895 = 0.224 M passenger-km/hr Boeing 747 470 × 980 = 0.461 M passenger-km/hr Boeing 767 250 × 885 = 0.221 M passenger-km/hr Boeing 777 375 × 980 = 0.368 M passenger-km/hr Concorde 130 × 2200 = 0.286 M passenger-km/hr DC-8-50 145 × 875 = 0.127 M passenger-km/hr

Performance from the viewpoint of FAA: Safety

Cost Effectiveness: Cost/Performance

Key characteristics of six passenger aircraft: all figures are approximate; some relate to a specific model/configuration of the aircraft or are averages of cited range of values.

DC-8-50 145 14 000 875 80

Concorde 130 6 400 2 200 350

B 777 375 7 450 980 180

B 767 250 12 300 885 120

B 747 470 6 700 980 200

A310 250 8 300 895 120

Price ($M)

Speed (km/h)

Range (km)

Passen- gers

Aircraft Cost / Performance 536 434 543 489 1224 630

Throughput (M P km/hr)

Smaller values better

Larger values better

Who (sensibly) upgrades CPUs

often?

A professional who turns CPU cycles

into money, and who is cycle-limited.

Artist tool:

animation,

video special

effects.

How to decide to buy a new

machine?

Measure After Effects “execution time”

on a representative render “workload”

“Night flight”

City map and clouds computed “on the fly” with fractals

CPU intensive Trivial I/O

(still shot from the movie)

Interpreting Execution Time

Performance 1 Execution Time

= = 2.85 renders/hour

1.5 GHz PB (Y) is N times faster than 1.25 GHz PB (X). N is ?

N =

Performance (Y)

Execution Time (Y)

Execution Time (X) Performance (X)

= (^) = 1. 19

PB 1.5 Ghz : 3. 4 renders/hour. PB 1.25 : 2. renders/hour. Might make the difference in meeting a deadline ...

Execution Time: 1265 seconds

Power Book G 1.25 GHz

Execution Time: Time for 1 job to complete

2 CPUs: Execution Time vs

Throughput

Throughput: # of parallel jobs/hour completed

Could G5 and Opteron have similar Throughput? Why?

Assume G5 MP execution time faster because AE does not use both Opteron CPUs.

1.8x faster. Implies parallel code.

2 CPUs vs 1 CPU, otherwise similar

How Calculate the 3 Components?

™Clock Cycle Time: in specification of computer

(Clock Rate in advertisements)

™Instruction Count:

™Count instructions in loop of small program ™Use simulator to count instructions ™Hardware counter in spec. register (most CPUs)

™CPI:

™Calculate: Execution Time / Clock cycle time Instruction Count ™Hardware counter in special register (most CPUs)

Calculating CPI Another Way

™First calculate CPI for each individual

instruction (add, sub, and, etc.)

™Next calculate frequency of each individual

instruction

™Finally multiply these two for each

instruction and add them up to get final CPI

Example

Op Freqi CPI (^) i Prod (% Time) ALU 50% 1 .5 (33%) Load 20% 2 .4 (27%) Store 10% 2 .2 (13%) Branch 20% 2 .4 (27%)

  • What if Branch instructions twice as fast?

Instruction Mix (Where time spent)

CPI

CPU time = ClockCycleTime * Σ CPI * I

i = 1

n i i

CPI = Σ CPI * F where F = I

i = 1

n

i i i^ i Instruction Count

"instruction frequency"

Key idea to improve performance:

Invest resources where time is spent!

CPI = (CPU Time * Clock Rate) / Instruction Count = Clock Cycles / Instruction Count

“Average cycles per instruction”

CPI as an analytical tool to guide design

Machine CPI

5 x 30 + 1 x 20 + 2 x 20 + 2 x 10 + 2 x 20

= 2.7 cycles/instruction

Program Instruction Mix

Where program spends its time

Amdahl’s Law (of Diminishing Returns)

If enhancement “E” speeds up multiply, but other instructions are unchanged, what is the maximum speedup S?

Where program spends its time

S

max

1 - (% affected / 100 %)

1

Attributed to Gene Amdahl -- “Amdahl’s Law”

What is the lesson of Amdahl’s Law?

Must enhance computers in a balanced way!

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 Maximum benefit:

Speedupmaximum =

1 - Fractiontime (^) affected

In class exercise: Amdahl’s Law

Program We Wish To Run On N CPUs

The program spends 30% of its time running code that can not be recoded to run in parallel.

CPUs (^2 3 4 5) ∞

Speedup

Compute speedup for N = 2, 3, 4, 5, and ∞.

What Programs Measure for Comparison?

™Ideally run typical programs with typical

input before purchase,

or before even build machine

™Called a “workload”; For example: ™Engineer uses compiler, spreadsheet ™Author uses word processor, drawing program, compression software

™In some situations its hard to do

™Don’t have access to machine to “benchmark” before purchase ™Don’t know workload in future

Benchmarks

™Obviously, apparent speed of processor

depends on code used to test it

™Need industry standards so that different

processors can be fairly compared

™Companies exist that create these

benchmarks: “typical” code used to evaluate

systems

™Need to be changed every 2 or 3 years since

designers could target these standard

benchmarks

Example Standardized Workload Benchmarks

™Workstations: Standard Performance Evaluation Corporation (SPEC) ™SPEC95: 8 integer (gcc, compress, li, ijpeg, perl, ...) & 10 floating-point (FP) programs (hydro2d, mgrid, applu, turbo3d, ...) ™SPEC2000: 11 integer (gcc, bzip2, …) , 18 FP (mgrid, swim, ma3d, …) ™www.spec.org ™Separate average for integer and FP ™Benchmarks distributed in source code ™Company representatives select workload ™Compiler, machine designers target benchmarks, so try to change every 3 years

Performance Evaluation

™Good products created when have:

™Good benchmarks ™Good ways to summarize performance

™Given sales is a function of performance relative

to competition, should invest in improving product

as reported by performance summary?

™If benchmarks/summary inadequate, then choose

between improving product for real programs vs.

improving product to get more sales; Sales almost

always wins!

Final thoughts: Performance Equation

Seconds

Program

Instructions Program =

Seconds Instruction Cycle

Cycles

Goal is to optimize execution time, not individual equation terms.

The CPI of the program. Reflects the program’s instruction mix.

Machines are optimized with respect to program workloads.

Clock period. Optimize jointly with machine CPI.

Conclusion

™Latency v. Throughput

™Performance doesn’t depend on any single

factor: need to know Instruction Count, Clocks

Per Instruction and Clock Rate to get valid

estimations

™2 Definitions of times:

™User Time: time user needs to wait for program to execute (multitasking affects) ™CPU Time: time spent executing a single program: (no multitasking)

™Amdahl’s Law: law of diminishing returns