Optimal ClientServer Assignment

Download Report

Transcript Optimal ClientServer Assignment

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 , … , 𝑥𝑛 ).