ENGS 116 Lecture 2 1 Performance and Quantitative Principles Vincent H. Berk September 26 th , 2008 Reading for today: Chapter 1.1 - 1.4, Amdahl article Reading for Monday: Chapter 1.5 – 1.11, Mazor article Homework for Wednesday: 1.1, 1.3, 1.6, 1.7, 1.13
21
Embed
ENGS 116 Lecture 21 Performance and Quantitative Principles Vincent H. Berk September 26 th, 2008 Reading for today: Chapter 1.1 - 1.4, Amdahl article.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ENGS 116 Lecture 2 1
Performance and Quantitative Principles
Vincent H. Berk
September 26th, 2008
Reading for today: Chapter 1.1 - 1.4, Amdahl article
Reading for Monday: Chapter 1.5 – 1.11, Mazor article
Homework for Wednesday: 1.1, 1.3, 1.6, 1.7, 1.13
ENGS 116 Lecture 2 2
Review
Task of Computer Designers
– Determine which attributes are important for a new machine
– Design a machine to maximize performance without violating cost/power/functionality constraints
3 Components of “Architecture”
– Instruction set design
– Organization
– Hardware
ENGS 116 Lecture 2 3
Benchmarking Games
Different configurations used to run the same workload on two systems.
Compiler customized to optimize the workload.
Workload arbitrarily picked to skew results.
Test specification written to be biased toward one machine.
ENGS 116 Lecture 2 4
Design benchmarks for:
Industrial and design
Consumer Electronics
Networking, routers
Office applications
Telecommunications
Weapon systems
ENGS 116 Lecture 2 5
Execution time
Weighted arithmetic mean: sum over execution time of all programs run, times their relative frequencies
Normalized execution time: take a reference machine, set it to 1, then compute normalized execution times for others based on this machine
Geometric mean of normalized execution time (reference computer becomes irrelevant, ratios can arbitrarily be compared)
ENGS 116 Lecture 2 6
Amdahl’s Law
Execution time after improvement =
unaffected timeExec.
timprovemen ofAmount
timprovemenby affected timeExec.+
Speedup = Execution time before improvementExecution time after improvement
Make the common case fast
ENGS 116 Lecture 2 7
Speedup due to enhancement E:
Suppose that enhancement E accelerates a fraction F of the task by a factor S, and the remainder of the task is unaffected:
ExTime (E) =
Speedup (E) =
Amdahl’s Law
Speedup(E) = ExTime w/o E
ExTime w/ E Performance w/ E
Performance w/o E
ENGS 116 Lecture 2 8
Amdahl’s Law
enhanced
enhancedenhancedoldnew Speedup
FractionFraction1ExTimeExTime +)(=
enhanced
enhancedenhanced
new
old overall
SpeedupFraction
Fraction1
1
ExTime
ExTimeSpeedup
+)(==
ENGS 116 Lecture 2 9
Amdahl’s Law
Example: Floating point instructions improved to run 2X, but only 10% of actual instructions are FP
ExTimenew=
Speedupoverall=
ENGS 116 Lecture 2 10
Corollary: Make The Common Case Fast All instructions require an instruction fetch, only a fraction require a
data fetch/store.
– Optimize instruction access over data access Programs exhibit locality.
Spatial Locality Temporal Locality
Access to small memories is faster.
– Provide a storage hierarchy such that the most frequent accesses are to the smallest (closest) memories.
Disk/Tape
Memory CacheRegisters
ENGS 116 Lecture 2 11
Metrics of Performance
Compiler
Programming Language
Application
DatapathControl
Transistors Wires Pins
ISA
Function Units
Millions of instructions per second: MIPSMillions of FP operations per second: MFLOPS
Cycles per second (clock rate)
Megabytes per second
Answers per monthOperations per second
ENGS 116 Lecture 2 12
Marketing Metrics
Machines with different instruction sets? Programs with different instruction mixes?