Efficient Consistent Network Update in Wireless Data Center
Algorithm 1 Constructing Competitive Graph
Input: A set of flows with their initial and final traffic distribution requirements.
Output: Competitive graph Gcp= (Vcp, Ecp)
1: Initialize all resource res with zero demand resD
2: for each flow f in F do
3: for each resource res used in initial distribution of f do
4: Let vfresbe the used traffic volume by f
5: resD := resD + vresf
6: end for
7: end for
8: for each flow f in F do
9: Calculate the requiring resource list RQf
10: Calculate the releasing resource list RLf
11: for each requiring resource res in RQf do
12: Let vfresbe the required traffic volume by f
13: resD := resD + vresf
14: end for
15: end for
16: for all resource res do
17: if resD > M aximumCapacity then
18: for each flow fxcontaining res in RQfx do
4.2.2 Phase II - Flow Picking
In this phase, we are going to pick up some flows in the competitve graph, and change the update plan for these flows from “initial path to final path” to “initial path to alternative path” and “alternative path to final path.” In the competitive graph, we call the path with length longer than or equal to 1 as Chain, and if the last node in Chain connects to another
node in the same Chain, then we call it Cycle. Obviously, if there does not exist any Chain in the graph, then no resource competition exists. Hence, the problem becomes to “how to pick up some of the flows which breaks all existing Chains and Cycles,” and this can be regarded as the classical vertex cover problem.
A naïve method (called all-picked method) to resolve the resource competition be-tween flows is to break all the Chains in the graph by picking all nodes involving in any Chain. That is, for each flow involves in any of Chain in the graph, we find out an alterna-tive path for it, and these flows will no longer compete with the original requiring resource.
For the remaining flows that do not involve in any Chain, they follow the original update plan. However, on the one hand, though such picking method seems effective in resolving competitions, it may bring huge overhead to forwarding devices. On the other hand, if we try to break all Chains by picking up the minimum number of flows, then it becomes to the classical NP-Complete problem: “Minimum Vertex Cover,” where we cannot find out a feasible solution in polynomial time unless P=NP.
We propose our greedy-heuristic method by improving the deficiency of picking all flows, and pick up as least nodes as possible. To improve the all-picked method, one observation is that the actual resource competition on specific resource may not involve in all flows requiring it. For example, imagine 99 flows requiring 1 unit and 1 flow requiring 100 unit. If the total available capacity for this resource is 100, then all 100 flows will have an edge from themselves to all flows releasing it. Apparently, we can keep 99 flows following their original plan and find out an alternative path for the flow requiring 100 unit of resource, which saves 99 alternative paths. Hence, we iteratively check if each flow has enough resource individually. If so, then we reserve this flow as “Not_picked”
by removing all its incident edges. To pick as least nodes as possible from the remaining
nodes, we firstly virtually pick up all flows involving in Chain. Then, starting from the least degree of node, we incrementally try to release the virtually picked nodes, by checking if all its neighboring nodes are already picked. If so, we can ensure that all links connected to this nodes are already covered and hence release this node. The insight is that if we successfully release a node, then all its neighbors will absolutely be picked. Hence, the less degree a node is, the less neighbors will be picked to release one node.
The pseudo code of this method is shown in algorithm 2. From line 2 to line 7, initial resource usage of each flows are occupied. From line 8 to line 27, we try to remove some links connected by some flows by firstly checking whether all requiring resource of such flow are enough. By removing these links, the subsequent procedure will regard these flows as “not picked”. From line 28 to line 50, we initially pick up all flows with at least one incident link. Then, starting from the smallest degree of flows, we greedily “un-pick”
these flows if all its neighbors are picked.
As mentioned previously, the number of resource involved in this update are O(|F | × P ). Hence, from line 1 to line 17, the complexity will be O(|F | × P ). Since in Gcp, the number of neighbors for each flow will be at most O(|Fe|), the complexity from line 18 to line 27 will be O(|F | × |Fe|). In line 28, sorting |F | flows in Gcp costs O(|F |lg|F |).
The complexity of remaining lines will be O(|F | × |Fe|), and the total complexity for algorithm 2 will be O(|F | × (P + lg|F | + |Fe|)).
4.2.3 Phase III - Alternative Path
Without Introducing New Chain, Cycle and Deadlock
After deciding which set of flows to pick, we are required to find out alternative paths for these flows. Since we leverage the additional resource, such as switch memory, wired
Algorithm 2 Greedy Heuristic Picking Method