CS 584 Lecture 11 l Assignment? l Paper Schedule –10 Students –5 Days –Look at the schedule and me your preference. Quickly.
A Quantitative Basis for Design l Parallel programming is an optimization problem. l Must take into account several factors: –execution time –scalability –efficiency
A Quantitative Basis for Design l Parallel programming is an optimization problem. l Must take into account several factors: l Also must take into account the costs: –memory requirements –implementation costs –maintenance costs etc.
A Quantitative Basis for Design l Parallel programming is an optimization problem. l Must take into account several factors: l Also must take into account the costs: l Mathematical performance models are used to asses these costs and predict performance.
Defining Performance l How do you define parallel performance? l What do you define it in terms of? l Consider –Distributed databases –Image processing pipeline –Nuclear weapons testbed
Amdahl's Law l Every algorithm has a sequential component. l Sequential component limits speedup Sequential Component Maximum Speedup = 1/s = s
Amdahl's Law s Speedup
What's wrong? l Works fine for a given algorithm. –But what if we change the algorithm? l We may change algorithms to increase parallelism and thus eventually increase performance. –May introduce inefficiency
Metrics for Performance l Speedup l Efficiency l Scalability l Others …………..
Speedup What is Speed? What algorithm for Speed1? What is the work performed? How much work?
Two kinds of Speedup l Relative –Uses parallel algorithm on 1 processor –Most common l Absolute –Uses best known serial algorithm –Eliminates overheads in calculation.
Speedup l Algorithm A –Serial execution time is 10 sec. –Parallel execution time is 2 sec. l Algorithm B –Serial execution time is 2 sec. –Parallel execution time is 1 sec. l What if I told you A = B?
Performance Measurement l Algorithm X achieved speedup of 10.8 on 12 processors. –What is wrong? l A single point of reference is not enough! l What about asymptotic analysis?
Performance Measurement l There is not a perfect way to measure and report performance. l Wall clock time seems to be the best. l But how much work do you do? l Best Bet: –Develop a model that fits experimental results.