Docsity

Performance Analysis - Parallel and Distributed Computing - Lecture Slides, Slides of Parallel Computing and Programming

Partial preview of the text

Download Performance Analysis - Parallel and Distributed Computing - Lecture Slides and more Slides Parallel Computing and Programming in PDF only on Docsity!

Chapter 7

Performance Analysis

Learning Objectives

  • Predict performance of parallel programs
  • Understand barriers to higher performance

Speedup Formula

Parallel execution time

Sequential execution time

Speedup 

Execution Time Components

  • Inherently sequential computations: (n)
    • sigma
  • Potentially parallel computations: (n)
    • phi
  • Communication operations: (n,p)
    • kappa

(n)/p

(n,p)

Speedup Plot

“elbowing out”

Efficiency

Processors used

Speedup Efficiency

Processors Parallelexecution time

Sequentialexecution time

Efficiency



Amdahl’s Law

n n p

n n

n n p n p

n n n p

Let f = ( n )/(( n ) + ( n )); i.e., f is the

fraction of the code which is inherently sequential

f ( 1 f )/ p

Example 1

  • 95% of a program’s execution time occurs

inside a loop that can be executed in parallel.

What is the maximum speedup we should

expect from a parallel version of the program

executing on 8 CPUs?

Example 2

  • 20% of a program’s execution time is spent

within inherently sequential code. What is the

limit to the speedup achievable by a parallel

version of the program?

5

  1. 2

1

  1. 2 ( 1 0. 2 )/

1 lim   p  (^)   p

Pop Quiz

  • An oceanographer gives you a serial program

and asks you how much faster it might run on

8 processors. You can only find one function

amenable to a parallel solution. Benchmarking

on a single processor reveals 80% of the

execution time is spent inside this function.

What is the best speedup a parallel version is

likely to achieve on 8 processors?

Amdahl Effect

  • Typically (n) and (n,p) have lower

complexity than (n)/p

  • As n increases, (n)/p dominates (n) & (n,p)
  • As n increases, speedup increases
  • As n increases, sequential fraction f decreases.

Illustration of Amdahl Effect

n = 100

n = 1,

n = 10,

Speedup

Processors