26
How Asymmetry Helps Load Balancing Berthold Voecking Speaker: Wenkai Dai Tutor: Dr.Tobias Friedrich & Dr.Thomas Sauerwald

Seminar load balance

Embed Size (px)

DESCRIPTION

wenkai dai

Citation preview

Page 1: Seminar load balance

How Asymmetry Helps Load Balancing

Berthold Voecking

Speaker: Wenkai Dai

Tutor: Dr.Tobias Friedrich & Dr.Thomas Sauerwald

Page 2: Seminar load balance

Introduction

Page 3: Seminar load balance

Formal task

• Given n balls and n bins

• Randomly placing sequentially n balls into n bins

• Goal: minimize the maximum number of balls in the same bin

• balls are indistinguishable and global knowledge of previously assigned balls is not available

Page 4: Seminar load balance

Basic idea

• Each ball is placed into a bin chosen independently and uniformly at random from the set of all bins

• The expected maximum load of

• Give the proof later

Page 5: Seminar load balance

Better Idea

• Azar et al.[1994, 1999] suggest uniform greedy algorithm

• For each ball, choose d>= 2 locations independently and uniformly at random from the set of bins

• Place the ball into the bin with the fewest ball

• Maximum load of only

• d=2 yields great improvement over one choice, larger d just a smaller factor better than 2 choice

Page 6: Seminar load balance

Three types of selection

– (1) uniform and independent

– (2) nonuniform and independent

• A nonuniform algorithm may choose the first location from the bins 0 to n/2-1 and the second location from the bins n/2 to n -1

– (3) nonuniform and dependent

• The second choice may depend on the first choice, if the first location is i then the second location is

–Goal is to improve the uniform greedy algorithm

Page 7: Seminar load balance

Three Classes of Algorithm• [n]={0…n-1} denote the set of bins, 3 classes of algorithms

depending on how the sample location is chosen from the probability space [n]^d

• Class 1: Uniform and independent. Each of the d locations of a ball is chosen uniformly and independently at random from [n].

• Class 2: (Possibly) nonuniform and independent. For 1<=i<=d, the ith location of a ball is chosen independently at random from [n] as defined by a probability distribution Di : [n][0,1].

• Class 3: (Possibly) nonuniform and (possibly) dependent. The d locations of a ball are chosen at random from the set [n]^d as defined by a probability distribution D : [n]^d[0,1].

Page 8: Seminar load balance

Always-Go-Left Algorithm

• Introduce a multi-choice algorithm of class2 giving smaller maximum load than uniform greedy algorithm in class1

• Partitions the bins into d groups of almost equal size

• For each ball, choose one location from each group

• The i-th location of each ball is chose uniformly and independently at random from the i-th group

• Insert ball into a bin with minimum load among d locations

• Tie-breaking by asymmetric Always-Go-Left rule

Page 9: Seminar load balance

Always-Go-Left Algorithm Example

Always-Go-Left when there are several locations with the same max load

Page 10: Seminar load balance

d-ary Fibonacci numbers

• d-ary Fibonacci numbers

• For k<= 0, Fd(k)=0, Fd(1) =1, and for k>=1,

• if d =2, it’s standard fibonacci sequence

Page 11: Seminar load balance

Analysis of Always-Go-Left Algorithm

• Max load is related to the Fibonacci numbers

• Define , is golden ration

• In general, and

Page 12: Seminar load balance

Analysis of Always-Go-Left Algorithm

• We have so that

• Even for d =2, there is a significant improvement

• AGL yields maximum load of instead of

Page 13: Seminar load balance

Analysis of Always-Go-Left Algorithm

• Uniform greedy scheme achieves the best load balancing among all algorithms of class 1

• This results holds regardless of the used tie-breaking mechanism, showing that the tie-breaking mechanism is irrelevant in the uniform case

• Partitioning the bins and using a fair tie-breaking doesn’t reduce the number of balls in the fullest bin below

• The combination of partitioning and unfair tie breaking is very crucial for our result

Page 14: Seminar load balance

Is The Further Improvement Possible ?

• Whether other kind of choices for the d locations or other schemes for deciding which of these locations receives the ball can improve the result

• Negative answer by this theorem

Page 15: Seminar load balance

Conclude

• By Theorems 1 and 2, apart from some additive constants, the AGL algorithm achieves the best possible maximum load among all the sequential multi-choice algorithms, namely

Page 16: Seminar load balance

Generalization

• Interesting to assuming more balls than bins or even an infinite sequence of insertions and deletions

• An oblivious adversary specifies a possibly infinite sequence of insertions and deletions of balls

• All the requests on-line, the sequence of insertions and deletions is presented one by one without knowing future requests

• Time t denote time at which request is presented but not yet served. A ball is said to exist at time t if it is stored in one of the bins at this time.

Page 17: Seminar load balance

On-line Model conclusion

• The uniform greedy get a maximum load of

• Always-Go-Left get

• Multiple choice processes are fundamentally different from the single-choice variant because the multiple-choice does not increase with the number of balls but depending only on n and d.

Page 18: Seminar load balance

Proof of the upper bounds

• Use a witness tree to upper-bound the probability for the event a bin contains too many balls

• This witness tree is a rooted tree the nodes of which represent balls whose randomly chosen locations are arranged in a bad fashion

• Simplifying assumptions

• All the events are stochastically independent

• At most n balls exist at any time, h=1

• Finally it will remove all these assumption

Page 19: Seminar load balance

Witness Tree

• A bad event when the maximum load exceeds some threshold value, implies the “ activation of a witness tree”

• the probability for the existence of an activated witness tree upper-bounds the probability that a bad event occurs.

• It will show the activation of a witness tree is unlikely. Consequently, the bad event that is witnessed by this structure is unlikely as well.

Page 20: Seminar load balance

Symmetric Witness Tree

• A symmetric witness tree of order L is a complete d-ary tree of height L with d^L leaf nodes

• Each node v represents a ball, but some ball may be represented by several nodes

• Not every assignment of balls to nodes gives a witness tree

• Each non-root node v with parent node u has to exist at the insertion time of u’s ball

• Each node of the witness tree describes an event that may occur or not depending on the random choices for the locations of the balls

Page 21: Seminar load balance

Symmetric Witness Tree

• The edge event are defined in terms of the alternative locations of balls instead of their final resting place

• If all of edges and all its leaf node are activated then we say this tree is activated.

• existence of a bin with more than L+3 balls implies the existence of an activated witness tree of order L.

Page 22: Seminar load balance

The following proof is on blackboard

Page 23: Seminar load balance

Experiment Result

Page 24: Seminar load balance

Summary

• Always-Go-Left process yields a smaller maximum load than the uniform greedy process

• The both of asymmetry and the partitioning of the set of bins are crucial

• Using an asymmetric tie-breaking mechanism without partitioning doesn’t help

• Also using partitioning but with fair tie-breaking doesn’t help either

• Multiple choice is totally different from the single choice

Page 25: Seminar load balance

Mensa Time and Thanks

Page 26: Seminar load balance

Questions