Optimal ClientServer Assignment

advertisement
Client-Server Assignment for Internet
Distributed Systems
Overview
• Introduction
• Problem Definition
• Problem Model
• Solution
• Conclusion
Introduction
Internet - Distributed System
Example: Email,IMS
Features:
1. Communication Load
οƒ˜ Clients assigned to two different servers.
οƒ˜ Clients assigned to same server.
2. Load Balancing
οƒ˜ Use fewer servers. Servers are heavily loaded
Observations:
Problem Definition
οƒ˜ Optimal client server assignment for a pre-specified
trade-off between load balance and communication
load.
Emerging Applications:
1. Social networks Eg: Facebook
2. Distributed database system, Eg: MapReduce
Communication Model
Initially assign clients to a system with 2 servers (Sa, Sb)
Then we extend the 2-server solution to multiple
servers.
Xi = 1, client i is assigned to Sa
Xi = -1, client i is assigned to Sb
π‘Ÿπ‘–,𝑗 : data rate from client i to client j.
Communication Load
οƒ˜ π‘Ÿπ‘–,𝑗 if i and j are assigned to same server.
οƒ˜ 2π‘Ÿπ‘–,𝑗 if clients are assigned to 2 different servers.
οƒ˜ π‘Ÿπ‘–,𝑖 = 0
Total communication load,
πΆπ‘‘π‘œπ‘‘π‘Žπ‘™ =
π‘Ÿπ‘–,𝑗 +
𝑖
𝑗
𝑖
𝑗
1 − π‘₯𝑖 π‘₯𝑗
× π‘Ÿπ‘–,𝑗
2
If i and j are assigned to different servers,
π‘₯𝑖 π‘₯𝑗 = -1
Load Balance
𝐢𝐴 =
𝑖,𝑗
𝐢𝐡 =
1 + π‘₯𝑖
∗ π‘Ÿπ‘–,𝑗 +
4
1−π‘₯𝑖
𝑖,𝑗 4
𝑖,𝑗
∗ π‘Ÿπ‘–,𝑗 +
Load balance, D = 𝐢𝐴 − 𝐢𝐡
1 + π‘₯𝑗
∗ π‘Ÿπ‘–,𝑗
4
𝑖,𝑗
1−π‘₯𝑗
4
∗ π‘Ÿπ‘–,𝑗
D can be expressed as,
𝐷=
𝑖,𝑗
π‘₯𝑖 + π‘₯𝑗
2
∗ π‘Ÿπ‘–,𝑗
Refer link
Adding D to objective function will make the
function non-quadratic.
Hence we modify D, πΆπ‘π‘Žπ‘™π‘Žπ‘›π‘π‘’ = (𝐢𝐴 − 𝐢𝐡 )2
Equivalent formula of D,
D=
𝑖 π‘₯𝑖
∗ 𝑠𝑖 ,
where 𝑠𝑖 =
1
𝑗 2∗
(π‘Ÿπ‘–,𝑗 + π‘Ÿπ‘—,𝑖 )
Refer link
As, π‘₯𝑖 ∗ π‘₯𝑖 = 1,
πΆπ‘π‘Žπ‘™π‘Žπ‘›π‘π‘’ =
Refer link
2
𝑠
𝑖 𝑖 +
𝑖≠𝑗 (π‘₯𝑖 π‘₯𝑗 )
∗ ( 𝑠𝑖 𝑠𝑗 )
Optimization problem:
Minimize: ∝ πΆπ‘‘π‘œπ‘‘π‘Žπ‘™ + 1 −∝ πΆπ‘π‘Žπ‘™π‘Žπ‘›π‘π‘’
Subject to : π‘₯𝑖 2 = 1, π‘₯𝑖 ∈ 𝑍. 1 ≤ 𝑖 ≤ 𝑛.
Where: πΆπ‘‘π‘œπ‘‘π‘Žπ‘™ =
πΆπ‘π‘Žπ‘™π‘Žπ‘›π‘π‘’ =
𝑖
𝑗 π‘Ÿπ‘–,𝑗
2+
𝑠
𝑖 𝑖
+
𝑖
𝑗
1−π‘₯𝑖 π‘₯𝑗
2
𝑖≠𝑗 (π‘₯𝑖 π‘₯𝑗 )
× π‘Ÿπ‘–,𝑗
∗ ( 𝑠𝑖 𝑠𝑗 )
∝ is an arbitrary co-efficient (0≤ ∝≤1)
Objective function :
minimize
𝑖≠𝑗 𝑀𝑖,𝑗 π‘₯𝑖 π‘₯𝑗
+𝐢
Where we define,
1
𝑀𝑖,𝑗 = − ∝ π‘Ÿπ‘–,𝑗 + 1 −∝ 𝑠𝑖 𝑠𝑗
2
3
𝐢 = ∝ 𝑖≠𝑗 π‘Ÿπ‘–,𝑗 + 1 −∝ 𝑖 𝑠𝑖 2
2
Refer link
Semidefinite Programming
οƒ˜ Semidefinite programming is a class of
convex optimization.
οƒ˜ 𝑆 𝑛 : set of real Symmetric 𝑛π‘₯𝑛 matrices.
οƒ˜ A matrix A ∈ 𝑆 𝑛 is called positive
semidefinite if π‘₯ 𝑇 𝐴π‘₯ ≥ 0, for all π‘₯ ∈ 𝑅𝑛
οƒ˜ It satisfies strict quadratic programming
Solution:
minimize: tr(π‘Š 𝑇 π‘ˆ)
subject to: 𝑒𝑖,𝑖 = 1, 1 ≤ 𝑖 ≤ n
π‘ˆ 𝑖𝑠 π‘ π‘’π‘šπ‘–π‘‘π‘’π‘“π‘–π‘›π‘–π‘‘π‘’.
Solution Matrix = π‘ˆπ‘ π‘œπ‘™
W-> Matrix with diagonal elements 0 and Wi,j
U -> symmetric & Positive semidefinite matrix
Conclusion
1. Hard problems could be formulated as a
optimization problem and solved.
2. optimization problems, are widely used in
tremendous number of application areas,
such as transportation, production planning,
logistics etc.
Presented by : Swathi Balakrishna
Extra information:
Transform program into Vector program:
Minimize:
𝑖≠𝑗 𝑀𝑖,𝑗
𝑣𝑖 . 𝑣𝑗 + 𝐢
Subject to: 𝑣𝑖 . 𝑣𝑗 = 1, 𝑣𝑖 ∈ 𝑉
𝑣𝑖 ∈ 𝑅𝑛 , 𝑣𝑖 ∈ 𝑉
Vector programming -> Semidefinite
programming
W-> Matrix with diagonal elements 0 and Wi,j
U -> symmetric & Positive semidefinite matrix
minimize: tr(π‘Š 𝑇 π‘ˆ)
subject to: 𝑒𝑖,𝑖 = 0, 1 ≤ 𝑖 ≤ n
π‘ˆ 𝑖𝑠 π‘ π‘’π‘šπ‘–π‘‘π‘’π‘“π‘–π‘›π‘–π‘‘π‘’.
Solution Matrix = π‘ˆπ‘ π‘œπ‘™
Cholesky Factorization:
Obtain V= (𝑣1 , 𝑣2 , … , 𝑣𝑛 ) ,
Satisfying 𝑉 𝑇 𝑉 = π‘ˆπ‘ π‘œπ‘™ .
Final solution:
Round n vectors (𝑣1 , 𝑣2 , … , 𝑣𝑛 ) to n integers
(π‘₯1 , π‘₯2 , … , π‘₯𝑛 ).
Download