Self-Adjusting Grid Networks to Minimize Expected Path Length

Self-Adjusting Grid Networks to Minimize
Expected Path Length
Chen Avin, Michael Borokhovich, Bernhard Haeupler, Zvi Lotker
Communication Systems Engineering, BGU, Israel
Computer Science and Artificial Intelligence Laboratory, MIT, USA
SIROCCO 2013
Motivation - Data Centers
Energy cost ($50B in US alone 2008,
doubles every 5 years!)
Routing consumes about 20-30%
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
1 / 21
Motivation - Data Centers
Energy cost ($50B in US alone 2008,
doubles every 5 years!)
Routing consumes about 20-30%
Need to adjust the network, i.e.,
reduce the expected route length
Fixed infrastructure...
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
1 / 21
Motivation - Data Centers
Energy cost ($50B in US alone 2008,
doubles every 5 years!)
Routing consumes about 20-30%
Need to adjust the network, i.e.,
reduce the expected route length
Fixed infrastructure...
Move processes (e.g., VM) between
machines
Virtualization and SDN (software
defined networks), e.g., OpenFlow
enable VM migration
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
1 / 21
Simple Example
P4
P1
P6
P2
P5
Michael Borokhovich
P3
P1
P2
P4
P3
P5
P6
Self-Adjusting Grid Networks to Minimize Expected Path Length
1
2
1
5
3
10
2 / 21
Simple Example
P4
P1
P6
P2
P5
P3
E [route length] = 12 4 + 15 6 +
Michael Borokhovich
3
10 4
P1
P2
P4
P3
P5
P6
1
2
1
5
3
10
= 4.4
Self-Adjusting Grid Networks to Minimize Expected Path Length
2 / 21
Simple Example
P4
P3
P1
P2
P6
P5
Michael Borokhovich
P1
P2
P4
P3
P5
P6
E [route length] = 12 4 + 15 6 +
3
10 4
= 4.4
E [route length] = 12 1 + 15 1 +
3
10 1
=1
Self-Adjusting Grid Networks to Minimize Expected Path Length
1
2
1
5
3
10
2 / 21
Model and Problem Definition
Host Graph: H(V , E): Physical Infrastructure
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
3 / 21
Model and Problem Definition
Host Graph: H(V , E): Physical Infrastructure
Routing Requests: σ = (σ1 , σ2 , . . . , σm )
Michael Borokhovich
σt = (u, v )
Self-Adjusting Grid Networks to Minimize Expected Path Length
3 / 21
Model and Problem Definition
Host Graph: H(V , E): Physical Infrastructure
Routing Requests: σ = (σ1 , σ2 , . . . , σm )
σt = (u, v )
We assume the requests are i.i.d. from a given distribution
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
3 / 21
Model and Problem Definition
Host Graph: H(V , E): Physical Infrastructure
1
1
2
2
Requests Distribution
4
5
1/ 2
0
3
4
3
1/ 8
0
1/ 9
5
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
4 / 21
Model and Problem Definition
Host Graph: H(V , E): Physical Infrastructure
1
1
2
Requests Distribution
3
2
1
1/ 8
1
2
3
4
2
4 1/ 9
5
5
4
0
1/8
5
0
0
3
4
5
3
1/ 2
0
1/2
G(P, W)
1/8
1/9
Guest Weighted Graph: G(P, W )
|V | = |P| = n
Michael Borokhovich
1/2
Self-Adjusting Grid Networks to Minimize Expected Path Length
p(u, v)
4 / 21
Expected Path Length
A placement (arrangement):
ϕ:P→V
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
5 / 21
Expected Path Length
A placement (arrangement):
ϕ:P→V
For H, G, ϕ:
EPL(ϕ) =
X
Pr(u, v )dH (ϕ(u), ϕ(v ))
u,v ∈P
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
5 / 21
Expected Path Length
A placement (arrangement):
ϕ:P→V
For H, G, ϕ:
EPL(ϕ) =
X
Pr(u, v )dH (ϕ(u), ϕ(v ))
u,v ∈P
Minimum Expected Path Length Problem
MEPL = min EPL(ϕ)
ϕ
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
5 / 21
Example
G(P, W )
ϕ:P→V
Find the best way to put processes on the graph
to minimize expected path length
H(V , E)
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
6 / 21
Related Work
1
2
3
4
5
1
2
VLSI layout
1/8
0
0
1/2
3
4
Minimum Linear Arrangement (MLA)
5
Known to be hard (NP-Complete)
11
22
33
44
5
66
77
88
G(P, W)
99
10
10
1/8
1/9
1/2
MLA = min
ϕ
Michael Borokhovich
X
w(u, v )|ϕ(u) − ϕ(v )|
u,v ,∈P
Self-Adjusting Grid Networks to Minimize Expected Path Length
7 / 21
Hardness of MEPL
Host Graph – Grid
Guest Graph – Symmetric Product Distribution
Activity level: p(u)
Probability of request: p(u, v ) = p(u) · p(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
8 / 21
Hardness of MEPL
Host Graph – Grid
Guest Graph – Symmetric Product Distribution
Activity level: p(u)
Probability of request: p(u, v ) = p(u) · p(v )
Lemma
If G is a symmetric product distribution, MEPL is still hard.
Lemma
If H is a 2-dimensional grid, MEPL is still hard.
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
8 / 21
Is there a CLIQUE of size k in H ?
Lemma
If G is a symmetric product distribution, MEPL is still hard.
1
k2
?
←−
k nodes Clique
(n − k) disjoint nodes
p(u) = 1/k
p(u) = 0
Host H
Guest G
arbitrary graph
symmetric product distribution
p(u, v ) = p(u) · p(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
9 / 21
Is there a CLIQUE of size k in H ?
Lemma
If G is a symmetric product distribution, MEPL is still hard.
1
k2
?
←−
k nodes Clique
(n − k) disjoint nodes
p(u) = 1/k
p(u) = 0
Host H
Guest G
arbitrary graph
symmetric product distribution
p(u, v ) = p(u) · p(v )
H has a clique of size k if and only if MEPL =
Michael Borokhovich
k (k −1)
k2
Self-Adjusting Grid Networks to Minimize Expected Path Length
=1−
1
k
9 / 21
Can we embed Tree into Grid?
Lemma
If H is a 2-dimensional grid, MEPL is still hard.
?
←−
1
k −1
Guest G
Guest
G
tree (k nodes)
Can we embed G to H?
This is hard [Bhatt et al., 1987]
Host H
Host H
grid (k 2 nodes)
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
10 / 21
Can we embed Tree into Grid?
Lemma
If H is a 2-dimensional grid, MEPL is still hard.
?
←−
1
k −1
Guest G
Guest
G
tree (k nodes)
Can we embed G to H?
This is hard [Bhatt et al., 1987]
Host H
Host H
grid (k 2 nodes)
G can be embedded into H if and only if MEPL =
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
k −1
k −1
=1
10 / 21
Main Result
Theorem
For d-dimensional grid (H) and a symmetric product
distribution (G) there is a simple distributed algorithm
with a local switching policy between processes and their
neighbors that achieves a constant approximation to MEPL
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
11 / 21
Expected Distance to Center
Expected center:
c ∗ (ϕ) = arg min
x
X
p(u)d(ϕ(u), ϕ(x))
u
ϕ(u)
c∗
ϕ(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
12 / 21
Expected Distance to Center
Expected center:
c ∗ (ϕ) = arg min
Expected distance to center:
x
X
p(u)d(ϕ(u), ϕ(x))
u
C(ϕ) =
X
p(u)d(ϕ(u), c ∗ (ϕ))
u
ϕ(u)
c∗
ϕ(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
12 / 21
Expected Distance to Center
Expected center:
c ∗ (ϕ) = arg min
Expected distance to center:
x
X
p(u)d(ϕ(u), ϕ(x))
u
C(ϕ) =
X
p(u)d(ϕ(u), c ∗ (ϕ))
u
Minimum expected distance:
Cmin = min C(ϕ)
ϕ
ϕ(u)
c∗
ϕ(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
12 / 21
Switching Rule – Optimize Expected Distance to the Center
ϕ1 (u)
switch u and v?
c∗
ϕ1 (v )
ϕ2 (v )
−→
c∗
ϕ2 (u)
Switch only if: C(ϕ2 ) ≤ C(ϕ1 )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
13 / 21
Switching Rule – Optimize Expected Distance to the Center
ϕ1 (u)
switch u and v?
ϕ2 (v )
−→
c∗
c∗
ϕ2 (u)
ϕ1 (v )
Switch only if: C(ϕ2 ) ≤ C(ϕ1 )
Assumptions:
Recall that: C(ϕ) =
X
p(u)d(ϕ(u), c ∗ (ϕ))
u
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
13 / 21
Switching Rule – Optimize Expected Distance to the Center
ϕ1 (u)
switch u and v?
ϕ2 (v )
−→
c∗
c∗
ϕ2 (u)
ϕ1 (v )
Switch only if: C(ϕ2 ) ≤ C(ϕ1 )
Assumptions:
Recall that: C(ϕ) =
X
p(u)d(ϕ(u), c ∗ (ϕ))
u
Every node knows current ϕ (locations of all nodes in H)
centralized directory
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
13 / 21
Switching Rule – Optimize Expected Distance to the Center
ϕ1 (u)
switch u and v?
ϕ2 (v )
−→
c∗
c∗
ϕ2 (u)
ϕ1 (v )
Switch only if: C(ϕ2 ) ≤ C(ϕ1 )
Assumptions:
Recall that: C(ϕ) =
X
p(u)d(ϕ(u), c ∗ (ϕ))
u
Every node knows current ϕ (locations of all nodes in H)
centralized directory
Every node knows activity level p(u) of all nodes
observing requests over time
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
13 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Every switch decreases C(ϕ)
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Every switch decreases C(ϕ)
Will stop at some local minimum placement ϕ
b
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Every switch decreases C(ϕ)
Will stop at some local minimum placement ϕ
b
How far local minimum C(ϕ)
b from global minimum Cmin ?
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Every switch decreases C(ϕ)
Will stop at some local minimum placement ϕ
b
How far local minimum C(ϕ)
b from global minimum Cmin ?
What can we say about EPL(ϕ)?
b
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
Switching Rule – Optimize Expected Distance to the Center
Greedy approach
Every switch decreases C(ϕ)
Will stop at some local minimum placement ϕ
b
How far local minimum C(ϕ)
b from global minimum Cmin ?
What can we say about EPL(ϕ)?
b
We show:
C(ϕ)
b
= O(1)
Cmin
Michael Borokhovich
and
EPL(ϕ)
b
= O(1)
MEPL
Self-Adjusting Grid Networks to Minimize Expected Path Length
14 / 21
MEPL and Minimum Expected Distance to Center
Lemma
∀ϕ :
C(ϕ) ≤ EPL(ϕ) ≤ 2C(ϕ)
ϕ(u)
c∗
ϕ(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
15 / 21
MEPL and Minimum Expected Distance to Center
Lemma
∀ϕ :
C(ϕ) ≤ EPL(ϕ) ≤ 2C(ϕ)
d(ϕ(u), ϕ(v )) ≤ d(ϕ(u), c ∗ ) + d(c ∗ , ϕ(v ))
ϕ(u)
c∗
ϕ(v )
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
15 / 21
Expected Rank
Rank of a node r(u) is the position of the node in the
ordered list of nodes’ activity levels.
Node with the highest activity level has rank 0.
E[R] =
X
p(u)r(u)
u
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
16 / 21
Line
For any local optimum ϕ:
b
C(ϕ)
b ≤ E[R]
p(u)
d(ϕ(u),
b
c ∗ ) ≤ r(u)
c∗
Michael Borokhovich
ϕ(u)
b
Self-Adjusting Grid Networks to Minimize Expected Path Length
17 / 21
Line
For any local optimum ϕ:
b
C(ϕ)
b ≤ E[R]
p(u)
d(ϕ(u),
b
c ∗ ) ≤ r(u)
c∗
ϕ(u)
b
For the global optimum ϕ:
e
Cmin ≥ 12 E[R]
p(u)
d(ϕ(u),
e
c ∗ ) ≥ r(u)/2
c∗
Michael Borokhovich
ϕ(u)
e
Self-Adjusting Grid Networks to Minimize Expected Path Length
17 / 21
2-Dimensional Grid
C(ϕ)
b ≈
Michael Borokhovich
√
n
Self-Adjusting Grid Networks to Minimize Expected Path Length
18 / 21
2-Dimensional Grid
C(ϕ)
b ≈
Michael Borokhovich
√
n
Cmin ≈
Self-Adjusting Grid Networks to Minimize Expected Path Length
√
4
n
18 / 21
2-Dimensional Grid
C(ϕ)
b ≈
√
n
Cmin ≈
√
4
n
v
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
18 / 21
2-Dimensional Grid
C(ϕ)
b ≈
√
n
Cmin ≈
√
4
n
Allow chess knight
moves
6 18
8 13
openclipart.org/people
e portable
e im
m portable
e im_Chess_tile_-_Knight_2.sv
v
v
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
18 / 21
2-Dimensional Grid
For any local optimum ϕ
b
x2
x3
x1
x4
v
z1
x5
c∗
x6
z2
z3
x7
z4
z6
C(ϕ)
b ≤
z5
√
R]
√4 E[
6
d(ϕ(v
b ), c ∗ ) ≤
Michael Borokhovich
√4
6
p
r(v )
Self-Adjusting Grid Networks to Minimize Expected Path Length
19 / 21
2-Dimensional Grid
For any local optimum ϕ
b
For the global optimum ϕ
e
x2
x3
x1
x4
v
v
z1
x5
c∗
c∗
x6
z2
z3
x7
z4
z6
C(ϕ)
b ≤
z5
√
R]
√4 E[
6
d(ϕ(v
b ), c ∗ ) ≤
Michael Borokhovich
√4
6
p
r(v )
Cmin ≥
√
√1 E[
2
d(ϕ(v
e ), c ∗ ) ≥
Self-Adjusting Grid Networks to Minimize Expected Path Length
q
R]
r(v )
2
19 / 21
Simulations – Clustered Requests
900 nodes
50% inactive
8 clusters
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
20 / 21
Simulations – Clustered Requests
900 nodes
50% inactive
8 clusters
900 nodes
16 clusters
Animation
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
20 / 21
Summary
MEPL is hard for general graphs and requests patterns
For grids and symm. product distr. we showed greedy
approach that is a constant approximation
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
21 / 21
Summary
MEPL is hard for general graphs and requests patterns
For grids and symm. product distr. we showed greedy
approach that is a constant approximation
Future work:
Real datacenters infrastructure
More requests patterns
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
21 / 21
Summary
MEPL is hard for general graphs and requests patterns
For grids and symm. product distr. we showed greedy
approach that is a constant approximation
Future work:
Real datacenters infrastructure
More requests patterns
THANK YOU!
Michael Borokhovich
Self-Adjusting Grid Networks to Minimize Expected Path Length
21 / 21