• No results found

Load Balancing & Termination

N/A
N/A
Protected

Academic year: 2021

Share "Load Balancing & Termination"

Copied!
37
0
0

Loading.... (view fulltext now)

Full text

(1)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load Balancing

Load Balancing

&

(2)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Load Balancing

• Want all processors to operate

continuously to minimize time to

completion.

• Load balancing determines what work

will be done by which processor.

– Static

(3)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Approaches already discussed:

– Round Robin

– Random

– Recursive Bisection

– Simulated Annealing

– Genetic Algorithm

(4)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Bin Packing for Homogeneous Systems

– P boxes of equal size

– Minimize the size of the boxes, s.t.

• every piece of work goes in one and only one

box

• the work in any given box will be assigned to

one processor

• put work that requires the most communication

on the same processor if possible

(5)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load Balancing

300

Static Load Balancing

• Let’s take a very simple example

– 2 homogeneous processors

– 8 homogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• How close can we come to perfect load

balance?

• 9x9

• 8x9

• 7x7

• 6x6

(6)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load Balancing

300

Static Load Balancing

• Extend our example w/communication

– 2 homogeneous processors

– 8 homogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• Does the communication change how

good we can make our load balance?

• 9x9

• 8x9

• 7x7

• 6x6

(7)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load Balancing

300

Static Load Balancing

• Extend example w/more communication

– 2 homogeneous processors

– 8 homogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• Does the communication change our

total runtime and/or balance?

• 9x9

• 8x9

• 7x7

• 6x6

big blue means

lots of

communication

big yellow means

lots of

communication

(8)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

300

• Extend example w/more communication

– 2 homogeneous processors

– 8 homogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• Here the communication changed our

total runtime and/or balance.

• 9x9

• 8x9

• 7x7

• 6x6

big blue means

lots of

communication

big yellow means

lots of

communication

(9)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Bin Packing for Heterogeneous Systems

– P boxes of variable size representing the

capability of the associated processor

relative to the total capability of the system

– Minimize the imbalance, s.t.

• every piece of work goes in one and only one

box

• put work that requires the most communication

on the same processor if possible

(10)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Let’s extend our example

– 2 heterogeneous processors

– 8 homogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• How do heterogeneous processors

change what we do?

• 9x9

• 8x9

• 7x7

• 6x6

(11)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Let’s extend our example

– 2 homogeneous processors

– 8 heterogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• How do heterogeneous meshes change

what we do?

• 9x9

• 8x9

• 7x7

• 6x6

(12)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Let’s extend our example

– 2 heterogeneous processors

– 8 heterogeneous meshes with sizes

• 15x10

• 11x3

• 10x10

• 8x10

• How do heterogeneous meshes and

processors change what we do?

• 9x9

• 8x9

• 7x7

• 6x6

(13)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Static Load Balancing

• Problems with Static Load Balancing

– How do we know for sure what the

computation per mesh element is?

– How do we know for sure what the

capabilities of each processor will be?

– How do we know what the load on each

processor will be (shared resources)?

– Similar questions for the communication...

Given these questions may be impossible to answer for

some problems, we move to dynamic load balancing.

(14)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Approaches to Dynamic Load Balance

– Centralized – a master process hold the

collection of tasks to perform and

determines when the job is complete

– Distributed – the tasks are distributed and

the decision process for determining

(15)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Centralized Dynamic Load Balance

(16)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Distributed Dynamic Load Balance

(17)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Distributed Dynamic Load Balance

(18)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Distributed Dynamic Load Balance

(19)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Distributed Dynamic Load Balance

(20)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Dynamic Load Balancing

• Distributed Dynamic Load Balance

(21)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

• Recognition of termination conditions

for distributed computations is more

difficult than sequential termination.

• Conditions [Bertsekas & Tsitsiklis, 89]

– local termination reached by all

– no communication in progress

(22)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

(23)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

(24)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

• Dual-pass Ring Termination

(25)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

• Dual-pass Ring Termination

(26)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Distributed Termination

• Fixed Energy Termination

– Start with all energy assigned to the master

– Send a bit of energy with each task

assigned

– Return the energy when the task is finished

– When all energy is returned to the master

and it has no more work to farm out,

termination has been reached.

(27)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

C

C

C

C

C

C

C

C

Synchronous Interaction

Synchronous Interaction

Phase Parallelism

ideal

(28)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

C

C

C

C

C

C

Synchronous Interaction

Synchronous Interaction

Phase Parallelism

real

C

C

(29)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

Divide and Conquer

C

C

C

C

C

C

C

C

C

C

ideal

(30)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

Divide and Conquer

C

C

C

C

3

C

1

C

C

C

2

C

C

real

(31)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

P

R

Q

Pipelined

Z

ideal

(32)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

P

R

Q

Pipelined

Z

real

(33)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

S

S

S

S

Master

Master Slave

(34)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

S

S

S

S

Master

Master Slave

(35)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

P

Q

R …

Z

W

ork Pool

Work Pool

(36)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load

Balancing

Program Paradigms

P

Q

R

Z

W

ork Pool

Work Pool

(37)

Load Balancing Program Paradigms Dynamic Load Balancing Summary Distributed Termination Detection Algorithms

CS/IT 451 & CS551 – Parallel Processing

Static Load Balancing

Summary

• Load Balancing

– Centralized

– Distributed

• Termination

• Paradigms

– phase

– pipelined

– master slave

– work pool

Static

Dynamic

References

Related documents

The CNG is compressed to 200 Bar, this fuel has been already tested, since in 2009, it has been identified more than 10,5 millions vehicles running with this fuel in the

If we can improve the influence of the real estate developer on the communities to neutral (rather than a negative relationship), then the nine local communities will remain

In this paper, we proposed 3D-DVFA-FSC, a distributed de- ployment algorithm based on virtual forces in order to ensure full 3D-surface coverage and maintain network connectivity.

Issues pertaining to policy integration and harmonization across countries are discussed, as are international responses in such areas as the labour side accord in the North

Between 1986 and 1995, the government of Canada negotiated and implemented three major international trade agreements: the 1989 Canada-US Free Trade Agreement (CUFTA), the 1994

Needs analysis : After rapid assessments conducted by the Guatemalan Red Cross Damage Assessment and Needs Analysis teams and with technical and operational support of the IFRC, it

ORTHOPAEDIC SURGERY FOR THE LOWER LIMBS IN CHILDREN WITH CEREBRAL