Docsity

Scalability and Isoefficiency in Parallel Systems, Slides of Parallel Computing and Programming

Partial preview of the text

Download Scalability and Isoefficiency in Parallel Systems and more Slides Parallel Computing and Programming in PDF only on Docsity!

2

Topics for Today

• Review cost optimality, scalability, efficiency

• Isoefficiency in depth

• Minimum execution time

• Asymptotic analysis of parallel systems

• Other scalability metrics

—memory and time constrained scaling —serial fraction —Amdahl’s law

3

Cost Optimality

• Cost of parallel system =^ p^ TP

—sum of the work time for each processor — AKA work or processor-time product

• Parallel system is^ cost-optimal^ if

—O(solving a problem on a parallel computer) = O(serial)

• Since^ E^ =^ TS /^ pTP , for cost optimal systems,^ E^ =^ Θ(1)

5

Scaling Characteristics of Parallel Pgms

Scalability and cost-optimality are related

• In cost-optimal parallel systems, efficiency =^ Θ(1)

• Any scalable parallel system can be made cost-optimal

—requires appropriate choice of

  • size of the computation
  • number of processors

6

Scaling and Efficiency

fixed problem size

PEs increasing

problem size increasing

PEs fixed

all parallel systems some parallel systems

8

Scalability Metrics as Functions of W

Parallel execution time

Speedup

Efficiency

9

Isoefficiency for Scalable Parallel Systems

• To maintain efficiency at a fixed value (between 0 and 1)

—maintain ratio^ To(W,p)^ /^ W^ a constant value

• For a desired value^ E^ of efficiency

• Let^ K^ =^ E^ / ( 1 –^ E ) be a constant related to the desired efficiency

• Since^ To is a function of^ W^ and^ p , we have

11

Asymptotic Isoefficiency (Example 1)

Add n numbers on p processing elements

• Overhead^ To is approximately^ 2p^ log^ p

— log p levels in tree; communication and addition @ each

• For isoefficiency, we want^ W = K To(W,p)

• Substituting^ To by^ 2p^ log^ p^ , we get^ W = K 2p log p

• This yields asymptotic isoefficiency^ θ (p log p)^.

• Want the same efficiency on^ p’^ processors as on^ p

—as the # PEs increases from p to p’ —problem size n must increase by ( p’ log p’ ) / ( p log p )

12

Isoefficiency for Gaussian Elimination

Add solve n linear equations on p processing elements

• For Gaussian elimination, execution time =^ O(n

_3 /p + n 2

  • n log p)_

• Total parallel work^ = O(n

_3

  • pn 2
  • pn log p)_

• Overhead^ To is^ O(pn

(^2) + pn log p) — back substitution + pivot computation

• For isoefficiency, we want^ W = K To(W, p)

• Expressing overhead as a function of W = n

3 yields T o = O(pW2/3^ + pW1/3^ log p)

• Asymptotic isoefficiency^ W = K(pW

2/3 (^) + pW1/3 (^) log p)

• Want the same efficiency on^ p’^ processors as on^ p

—using first term W = KpW 2/ → W = K 3 p 3 —using second term W = KpW 1/ log p → W = K 3/ (p log p) 3/ —first term dominates: work must increase by ( p’) 3 / p 3

  • problem size n must increase by p’ / p

14

Cost-Optimality and Isoefficiency

• A parallel system is cost-optimal if and only if

• From this, we have:

• If we have an isoefficiency function^ f ( p ),

— W = Ω ( f ( p )) must be satisfied to ensure cost-optimality of a parallel system as it is scaled up

15

Lower Bound on Isoefficiency

• For a problem consisting of^ W^ units of work

—no more than W processing elements can be used cost-optimally

• To maintain a fixed efficiency

—problem size must increase at least as fast as Θ(p) — Ω(p) is the asymptotic lower bound on the isoefficiency function

17 Degree of Concurrency Example

Solving a system of equations using Gaussian elimination

  • W =^ Θ(n 3

— n variables must be eliminated one after the other —eliminating each variable requires Θ(n^2 ) computations

  • At most^ Θ(n 2

) PEs can be kept busy at any time

  • Since^ W =^ Θ(n 3

) , the degree of concurrency C ( W ) is Θ(W

2/

  • Given^ p^ processing elements, —problem size should be at least Ω(p3/2) to use them all - if W = Θ(p3/2) then C(W) = Θ(W2/3) = Θ((p3/2)2/3) = Θ(p) concurrency of Θ (p) means “use all processors”

18

Minimum Execution Time

• Often, interested in the minimum time to solution

• Determine the min parallel runtime^ TP

min

for a given W

— differentiate the expression for^ TP w.r.t.^ p^ and equate it to zero

• If

— p 0 is the value of^ p^ as determined by this equation — TP ( p 0 ) is the minimum parallel time

20

Parallel & Serial Run Times

• Serial runtime can be divided two components

—a totally serial component —a parallelizable component

• From this, we have,

21

Serial Fraction

• Serial fraction^ f^ of a parallel program

• Therefore, we have: