370 likes | 480 Views
Internet Traffic Engineering by Optimizing OSPF Weights. Bernard Fortz (Universit é Libre de Bruxelles) Mikkel Thorup (AT&T Labs-Research). Presented by : Mordo Shalom. The Routing (Load) Optimization Problem. Input: A directed graph G=(N,A) A demand function A capacity function
E N D
Internet Traffic Engineering by Optimizing OSPF Weights • Bernard Fortz (Université Libre de Bruxelles) • Mikkel Thorup (AT&T Labs-Research) Presented by : Mordo Shalom
The Routing (Load) Optimization Problem • Input: • A directed graph G=(N,A) • A demand function • A capacity function • A cost function • is the cost incured by a routing with load l on an arc with capacity c. An instance is given by a triple (G,D,c), is known a priori.
The Objective • Any routing R, implies a load function on the edges • The cost induced by this load is: • The total cost of the routing • The Objective :Find a routing R such that is minimized.
OSPF Routing • The network administrator assigns a weight to each arc (link): • OSPF routes packets on the shortest path induced by the function w. • When there are multiple shortest paths packets are routed on each of them with equal probability.
The OSPF Routing Optimization Problem Find a weight function such that . is minimized.
The cost function • For each arc a is a piecewise-linear non decreasing function. • In fact any convex function would do the job.
Some Typical Routings • OPT(G,D,c) : the optimal routing for the instance (G,D,c) • OPTOSPF(G,D,c) : the optimal OSPF routing … • UNITOSPF(G,D,c) : the OSPF routing for w(a)=1 • INVCAP(G,D,c) : the OSPF routing for w(a) = 1/c(a)
A normalized cost • d1(s,t) is the length of the shortest path from s to t where w(a)=1 for all a. • When then , in particular . • The cost of the OSPF routing under this setting: • The above value is called
Properties of UNCAP • It is a lower bound for the cost of any routing: • In particular: • By definition :
Properties of UNCAP (cont’d) Therefore for any routing R: In particular:
Properties of UNCAP (cont’d) Summarizing: We define: We have:
The Main Results • For each n there is an instance such that • OPT(G,D,c) can be found in polynomial time. • To find OPTOSPF is NP-Hard, moreover it is NP-Hard to find a 1.77-approximation to OPTOSPF • A Local Search Heuristic to approximate OPTOSPF
The first result The family of instances s 3n 3 1 n2-2 3n 3 3 2 n2-3 3n 3 3 t n2-4 3 3 3 n 3 n2-n-1
A possible (general) Routing s Each path has length n2 3n 3 1 1 n2-2 3n 3 1 2 n2-3 3n 3 t 1 n2-4 3 3 1 n n2-n-1
A typical OSPF routing n/2 s n 3 1 n2-2 n/4 n/2 3 2 n/8 n2-3 n/4 3 t n2-4 3 3 n n2-n-1
The Second Result • There is a polynomial time algorithm to find OPT(G,D,c) Proof: Define as the part of the demand D(s,t) routed through arc a. Formulate the problem as a Linear Programming problem.
A Local Search Heuristic(HEUR) • W={1,2,…,wmax} is the set of all possible weights. • The search is on all possible functions (vectors) • Start with a random vector • Do { • } Until x meets some optimality criteria
The Neighborhood Structure • if x’ can be obtained from x by one of the following two: • Single weight change: • Choose an arc and change its weight • There are |A|x(|W|-1) such neighbors • Evenly balance flows: • Choose a node x and a destination t and balance • There are |N|x(|N|-1) such neighbors
x1 P1 x2 P2 t x3 P3 xp Pp Evenly Balancing Flows x Every xi is on a shortest path to t.
Evenly Balancing (cont’d) • We do not want to load already congested arcs, therefore we make the balancing on a maximal subset B such that: if then x1 B x2 x x3 Where is chosen from [0.25,1] at random to diversify xp
Evenly Balancing (cont’d) • We do not want w’ > wmax, therefore we impose on B the following additional condition:
Local Search • Do { • } Until x is a local minimum • SEARCH returns x’ s.t. cost(x’)<cost(x) • Problem: A local minimum may be far from global minimum • Solution: Allow non-improving moves
Local Search (cont’d) • Problem: We may encounter cycles. • Solution: Tabu Search (maintain a tabu list of the attributes of visited points) • HEUR uses a hash function h and a table T with 1 bit for each possible value of h. • If T(h(x’))=true, SEARCH does not return x’.
Local Search (cont’d) • Problem: Duplicate neighbors due to the complex neighborhood structure. • Solution: SEARCH maintains an internal hash table T’. • If T’(h(x’))=true, SEARCH does not evaluate the cost of x’.
Local Search (cont’d) • Problem: Too much neighbors. • Solution: • r=0.2 • At each iteration evaluate only a subset of the neighbors such that • If (the cost is improved) {r=max(0.01,r/3)} • Else {r=min(1,10c)}
Diversification • Choose at random as described before. • If cost is not improved for 300 iterations, perturb x by adding a random perturbation, selected at random from [-2,2] to %10 of the weights.
Cost Calculation • Compute • Compute • Compute • Compute
Calculation of lat • Compute d(x,t) for each x using Dijkstra’s algorithm. • Compute the set of arcs At which are on a shortest path to t: • Compute by visiting the nodes y in decreasing order of d(y,t).
Recalculation of lat • At each iteration the calculation should be repeated due to the changes in the weights: • Recalculation of d(x,t) : At each iteration only edges emanating from a single node are changed. • We use the Ramalingam & Reps algorithm (Dijkstra on dynamic graphs). Its running time is proportional to the number of edges incident to nodes for which d(x,t) changed.
Recalculation of lat (cont’d) • In the same manner At’ is calculated for edges incident to nodes x with d(x,y) changed. • Maintain a set M of critical nodes: • Initially M contains all the nodes with incident edges in i.e. the nodes with d(x,y) changed and their neighbors.
Numerical Results • Two Additional routings are measured, along the others: • L2OSPF : weights proportional to the Euclidean distance between nodes. • RANDOMOSPF : Weight are assigned randomly (The first step of HEUR). • The algorithms are compared on real and synthetic networks: • AT&T proposed backbone (real) • 2-level graphs (synthetic)
Conclusions from Numerical Results • HEUR is the best algorithm. • In fact it is the only algorithm “knowing” the demands • It achieves performance close to %2 of OPT. • InvCap is the best oblivious algorithm • Surprisingly UnitOSFP performs almost as good as InvCap • L2OSPF and RANDOMOSPF are worst. • In fact there is almost no difference between the two.