Reliability Analysis of Tree Networks Applied to Balanced Content Replication Mugurel Ionut...
-
Upload
georgiana-king -
Category
Documents
-
view
221 -
download
1
Transcript of Reliability Analysis of Tree Networks Applied to Balanced Content Replication Mugurel Ionut...
Reliability Analysis of Tree Reliability Analysis of Tree Networks Applied to Balanced Networks Applied to Balanced
Content ReplicationContent Replication
Mugurel Ionut AndreicaMugurel Ionut Andreica, Nicolae Tapus, Nicolae TapusPolytechnic University of BucharestPolytechnic University of Bucharest
Computer Science DepartmentComputer Science Department
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 22
SummarySummary
MotivationMotivation Unrestricted Vertex Multicut Problem on TreesUnrestricted Vertex Multicut Problem on Trees
problem definitionproblem definition suboptimal solution (known)suboptimal solution (known) optimal solution (new)optimal solution (new)
Reliability Metric DefinitionReliability Metric Definition Balanced Content Replication on TreesBalanced Content Replication on Trees
problem definitionproblem definition k-equitable coloring of trees (new algorithm)k-equitable coloring of trees (new algorithm)
Evaluation ResultsEvaluation Results ConclusionsConclusions
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 33
MotivationMotivation
TreesTrees multiple uses: multiple uses:
• multicast content distributionmulticast content distribution• packet routingpacket routing• content replicationcontent replication• distributed data indexing and storagedistributed data indexing and storage
very fragilevery fragile• a single node failure disconnects the networka single node failure disconnects the network
need a special kind of reliability analysis need a special kind of reliability analysis (maybe node failures and network “splits” are (maybe node failures and network “splits” are acceptable under certain conditions)acceptable under certain conditions)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 44
Unrestricted Vertex Multicut Unrestricted Vertex Multicut Problem on Trees (1/3)Problem on Trees (1/3)
problem definitionproblem definition tree – V verticestree – V vertices H pairs of critical vertices (sH pairs of critical vertices (sii,t,tii)) remove the minimum number of vertices such that all the remove the minimum number of vertices such that all the
critical pairs are disconnectedcritical pairs are disconnected suboptimal algorithm – O(Vsuboptimal algorithm – O(V··H) [Guo et al., 2006]H) [Guo et al., 2006]
Step 1.Step 1. rootroot the tree at some vertex r and compute the the tree at some vertex r and compute the parent-son relationships for all the vertices.parent-son relationships for all the vertices.
Step 2.Step 2. forfor each critical pair (s each critical pair (sii,t,tii) ) dodo: compute its LCA and : compute its LCA and the level of the LCA (the distance from the LCA to the root)the level of the LCA (the distance from the LCA to the root)
Step 3.Step 3. sortsort all the critical pairs in non-increasing order of the all the critical pairs in non-increasing order of the level of their LCAlevel of their LCA
Step 4.Step 4. forfor each critical pair (s each critical pair (sii, t, tii), in the sorted order, ), in the sorted order, dodo Step 4.1.Step 4.1. ifif s sii and t and tii are not already disconnected are not already disconnected thenthen Step 4.1.1.Step 4.1.1. removeremove the LCA of s the LCA of sii and t and tii from the tree from the tree
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 55
Unrestricted Vertex Multicut Unrestricted Vertex Multicut Problem on Trees (2/3)Problem on Trees (2/3)
optimal algorithm – O(V+H)optimal algorithm – O(V+H) Step 1Step 1: : cchoose a root r and compute the parent-son hoose a root r and compute the parent-son
relationships for all the vertices of the treerelationships for all the vertices of the tree – O(V) – O(V) Step 2Step 2: : ccompute the arrays pLCA and level: pLCA[i] is ompute the arrays pLCA and level: pLCA[i] is
the lowest common ancestor of the ithe lowest common ancestor of the ithth pair and level[i] is pair and level[i] is the level of their LCA in the treethe level of their LCA in the tree – O(V+H) [Bender, – O(V+H) [Bender, Farach-Colton, 2000]Farach-Colton, 2000]
Step 3Step 3 – O(V+H) – O(V+H)• forfor l=0l=0 toto V-1V-1 dodo LL[l]=emptyLL[l]=empty• forfor i=1i=1 toto HH dodo LL[level[i]].add(i)LL[level[i]].add(i)• sorted_pairs=emptysorted_pairs=empty• forfor lev=V-1lev=V-1 downtodownto 00 dodo
ifif ( (LL[lev] is not emptyLL[lev] is not empty) ) thenthen• forfor ii inin LL[lev]LL[lev] dodo sorted_pairs.add(i)sorted_pairs.add(i)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 66
Unrestricted Vertex Multicut Unrestricted Vertex Multicut Problem on Trees (3/3)Problem on Trees (3/3)
optimal algorithm – O(V+H) (continued)optimal algorithm – O(V+H) (continued) Step 4 – O(V+H), amortized analysisStep 4 – O(V+H), amortized analysis
• forfor v=1v=1 toto VV dodo marked[v]=Falsemarked[v]=False• num_removed=0num_removed=0• forfor i=1i=1 toto HH dodo
p=sorted_pair[i]p=sorted_pair[i] ifif (( ((notnot marked[smarked[spp]]) ) andand ( (notnot marked[tmarked[tpp]])) )) thenthen
• num_removed = num_removed + 1num_removed = num_removed + 1• TraverseAndMarkTraverseAndMark((pLCA[p]pLCA[p]))
• returnreturn num_removednum_removed TraverseAndMark(v):TraverseAndMark(v):
• marked[v]=Truemarked[v]=True• for eachfor each w w inin sons(v) sons(v) dodo
ifif ( (notnot marked[w]) marked[w]) thenthen• TraverseAndMarkTraverseAndMark(w)(w)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 77
Reliability Metric DefinitionReliability Metric Definition
tree with V verticestree with V vertices H critical pairs (problem dependent)H critical pairs (problem dependent) Q=total number of distinct vertices Q=total number of distinct vertices
belonging to at least one pairbelonging to at least one pair U=UVMC(V, H)U=UVMC(V, H) reliability=U/Qreliability=U/Q
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 88
Balanced Content Replication Balanced Content Replication (1/5)(1/5)
tree with V vertices (servers)tree with V vertices (servers) k pieces of contentk pieces of content distribute the pieces evenly among the serversdistribute the pieces evenly among the servers
each server: 1 piece of contenteach server: 1 piece of content nvnvii=the number of servers storing piece i=the number of servers storing piece i |nv|nvii-nv-nvjj|≤1|≤1 neighboring servers should store different pieces of neighboring servers should store different pieces of
contentcontent find a valid assignment (piece of content – set of find a valid assignment (piece of content – set of
vertices) => k-equitable coloringvertices) => k-equitable coloring supplementary assumption: k≥D (D=the maximum supplementary assumption: k≥D (D=the maximum
degree of the tree)degree of the tree)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 99
Balanced Content Replication Balanced Content Replication (2/5)(2/5)
new k-equitable coloring algorithm – O(Vnew k-equitable coloring algorithm – O(V··k)k) root the tree at a vertex r having <D sons => each vertex has root the tree at a vertex r having <D sons => each vertex has
at most D-1 sonsat most D-1 sons bottom-up traversal of the tree (from leaves to the root)bottom-up traversal of the tree (from leaves to the root) for each vertex i, compute:for each vertex i, compute:
• nvtotalnvtotalii = the number of vertices in i’s subtree (including i)= the number of vertices in i’s subtree (including i)• ncplusncplusii = (= (nvtotalnvtotalii mod k mod k) – the number of surplus colors in an ) – the number of surplus colors in an
equitable coloring of vertex i’s subtreeequitable coloring of vertex i’s subtree• colorcolorii = the color of vertex i in an equitable coloring of its subtree. = the color of vertex i in an equitable coloring of its subtree.• color_permcolor_permii = a permutation which describes how the colors in = a permutation which describes how the colors in
vertex i’s subtree should be relabeled.vertex i’s subtree should be relabeled. r=vr=v11, v, v22, ..., v, ..., vqq==i -> the pathi -> the path from r ro ifrom r ro i
• p=color_permp=color_permv1v1 • color_perm • color_permv2v2 • … • color_perm • … • color_permvqvq
• real_colorreal_colorii=p(color=p(colorii)) if i is a leaf:if i is a leaf:
• nvtotalnvtotalii=1; ncplus=1; ncplusii=1 mod k; color=1 mod k; colorii=1; color_perm=1; color_permii=(1,2,...,k)=(1,2,...,k)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1010
Balanced Content Replication Balanced Content Replication (3/5)(3/5)
new k-equitable coloring algorithm – new k-equitable coloring algorithm – O(VO(V··k) (continued)k) (continued) if i has ns(i)>0 sonsif i has ns(i)>0 sons
• combine the colorings of i’s sons (in some order combine the colorings of i’s sons (in some order s(i,1), s(i,2), ..., s(i,j), ..., s(i,ns(i)))s(i,1), s(i,2), ..., s(i,j), ..., s(i,ns(i)))
• define define cplus(j-1)=nvtotal(s(i,1))+...+nvtotal(s(i,j-1))cplus(j-1)=nvtotal(s(i,1))+...+nvtotal(s(i,j-1))• iif ncplusf ncpluss(i,j)s(i,j)=0=0 => => ssi,ji,j is is inactiveinactive;; otherwise s otherwise si,ji,j isis
activeactive..• iif (ncplusf (ncpluss(i,j)s(i,j)>0 and cplus>0 and cplusj-1j-1=0) or (cplus=0) or (cplusj-1j-1 + +
ncplusncpluss(i,j)s(i,j)>k), then all the sons s>k), then all the sons s i,1i,1,…, s,…, si,j-1i,j-1 are made are made inactiveinactive and s and si,ji,j==the only the only activeactive son son
• if s(i,j)=if s(i,j)=inactiveinactive then then swap 2 colors: colorswap 2 colors: colors(i,j)s(i,j) and k-1 in color_perm and k-1 in color_perms(i,j)s(i,j)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1111
Balanced Content Replication Balanced Content Replication (4/5)(4/5)
new k-equitable coloring algorithm – O(Vnew k-equitable coloring algorithm – O(V··k) (continued)k) (continued) if (vertex i has ns(i)>0 sons) and (s(i,j)=if (vertex i has ns(i)>0 sons) and (s(i,j)=active)active) then then
• cyclic recoloring: color c -> color cyclic recoloring: color c -> color ((cplus((cplusj-1j-1+c-1) mod k)+1+c-1) mod k)+1 (in (in color_permcolor_perms(i,j)s(i,j)))
• maintain counters:maintain counters: ccactiveactive=number of currently active sons=number of currently active sons totaltotalactiveactive=total number of sons which were active at some point=total number of sons which were active at some point
• if (if (color_permcolor_perms(i,j)s(i,j)(color(colors(i,j)s(i,j)))>total>totalactiveactive) then) then relabeling permutation with a cycle of length 3: relabeling permutation with a cycle of length 3: color_permcolor_perms(i,j)s(i,j)
(color(colors(i,j)s(i,j))) -> -> ccactiveactive -> -> total totalactiveactive else: relabeling permutation with two-color swap: else: relabeling permutation with two-color swap: color_permcolor_perms(i,j)s(i,j)
(color(colors(i,j)s(i,j))) , , ccactiveactive • maintain a stack S of relabeling permutation (inactive sons push maintain a stack S of relabeling permutation (inactive sons push
the identity permutation on the stack)the identity permutation on the stack)• after the last son, compose the permutations in S top-downafter the last son, compose the permutations in S top-down
pplevlev=the composition from the top until level =the composition from the top until level levlev color_permcolor_perms(i,lev)s(i,lev)==ComposePermutations(pComposePermutations(plevlev,color_perm,color_perms(i,lev)s(i,lev)))
• assign to vertex i the color k (no son is colored with k)assign to vertex i the color k (no son is colored with k)• swap the colors in color_permswap the colors in color_perm ii, such that vertex i is colored with 1, such that vertex i is colored with 1
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1212
Balanced Content Replication Balanced Content Replication (5/5)(5/5)
new k-equitable coloring algorithm – new k-equitable coloring algorithm – O(VO(V··k) (continued)k) (continued) perform a second, top-down traversal of perform a second, top-down traversal of
the treethe tree compose the permutations on the path compose the permutations on the path
from the root r to each vertex i (O(Vfrom the root r to each vertex i (O(V··k) k) overall)overall)
compute the “real color” of vertex icompute the “real color” of vertex i overall complexity: O(Voverall complexity: O(V··k)k)
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1313
Evaluation Results (1/5)Evaluation Results (1/5)
comparison between UVMC algorithms comparison between UVMC algorithms (Python implementation)(Python implementation) O(VO(V··H) vs O((V+H)H) vs O((V+H)··log(V)) (a simpler, more log(V)) (a simpler, more
practical, LCA finding method)practical, LCA finding method)
VV HH O(V·H) O(V·H) algorithmalgorithm
O((V+H)·log(V)) O((V+H)·log(V)) algorithmalgorithm
1000010000 99989998 10,25 sec10,25 sec 0,37 sec0,37 sec
3000030000 2999929999 86 sec86 sec 1,39 sec1,39 sec
5000050000 5000150001 229,58 sec229,58 sec 2,18 sec2,18 sec
6666666666 6666666666 1149,22 sec1149,22 sec 3,70 sec3,70 sec
9999999999 9999899998 1896,78 sec1896,78 sec 5,71 sec5,71 sec
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1414
Evaluation Results (2/5)Evaluation Results (2/5)
two types of test scenariostwo types of test scenarios type 1 test scenariotype 1 test scenario
different values of V, D, k, leaf percentagedifferent values of V, D, k, leaf percentage C – number of vertices serving client requestsC – number of vertices serving client requests we k-equitably colored the treewe k-equitably colored the tree critical pairs = (i,j)critical pairs = (i,j)
• j has color color(j)j has color color(j)• dist(i,j)<dist(i,p), with color(p)=color(j)dist(i,j)<dist(i,p), with color(p)=color(j)
reliability decreases with kreliability decreases with k reliability depends on leaf percentage (tree reliability depends on leaf percentage (tree
structure) more than anything elsestructure) more than anything else
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1515
Evaluation Results (3/5)Evaluation Results (3/5)
V=10000V=10000
0
0,01
0,02
0,03
0,04
0,05
0,06
0,07
0,08
0,09
0,1
0 10 20 30 40 50 60
Number of colors
50%leaves
66%leaves
90%leaves
c
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1616
Evaluation Results (4/5)Evaluation Results (4/5)
different values of V and different different values of V and different leaf percentagesleaf percentages
0,04
0,045
0,05
0,055
0,06
0,065
0,07
0,075
0,08
0,085
0 10 20 30 40 50 60
Number of colors
66% leaves, V=5000
66% leaves, V=10000
66% leaves, V=25000
90% leaves, V=5000
90% leaves, V=10000
90% leaves, V=25000
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1717
Evaluation Results (5/5)Evaluation Results (5/5)
type 2 test scenariotype 2 test scenario critical pairs=(i,j)critical pairs=(i,j)
• color(i)=color(j)color(i)=color(j)• motivated by the need of periodical motivated by the need of periodical
synchronization between replicassynchronization between replicas obtained similar resultsobtained similar results
Reliability Analysis of Tree Networks Applied to Balanced Content ReplicationReliability Analysis of Tree Networks Applied to Balanced Content Replication 1818
ConclusionsConclusions first optimal algorithm for UVMC on treesfirst optimal algorithm for UVMC on trees new k-equitable coloring algorithmnew k-equitable coloring algorithm reliability metric depends on tree structure reliability metric depends on tree structure
more than anything elsemore than anything else has potential to be a useful metrichas potential to be a useful metric
future workfuture work tests on real-life tree networkstests on real-life tree networks
• content replication (might not be perfectly balanced)content replication (might not be perfectly balanced)• multicastmulticast• peer-to-peer overlays (many possibilities) or peer-to-peer overlays (many possibilities) or
physical network infrastructure (tree-like in certain physical network infrastructure (tree-like in certain situations)situations)