Toward Self-Adjusting k-ary Search Tree Networks
Evgenii Feder, Anton Paramonov, Pavel Mavrin, Iosif Salem, Stefan, Schmid, Vitaly Aksenov

TL;DR
This paper introduces self-adjusting k-ary search tree networks that optimize datacenter topologies by balancing reconfiguration costs and traffic patterns, improving routing efficiency and adaptability over existing binary search tree networks.
Contribution
It presents the first development of self-adjusting k-ary tree networks, including algorithms for offline optimal and online dynamic reconfigurations, with experimental validation against SplayNets.
Findings
Outperforms SplayNet on most real network traces
Achieves near-optimal static networks in linear time for uniform traffic
Provides a scalable approach for dynamic topology reconfiguration
Abstract
Datacenter networks are becoming increasingly flexible with the incorporation of new networking technologies, such as optical circuit switches. These technologies allow for programmable network topologies that can be reconfigured to better serve network traffic, thus enabling a trade-off between the benefits (i.e., shorter routes) and costs of reconfigurations (i.e., overhead). Self-Adjusting Networks (SANs) aim at addressing this trade-off by exploiting patterns in network traffic, both when it is revealed piecewise (online dynamic topologies) or known in advance (offline static topologies). In this paper, we take the first steps toward Self-Adjusting k-ary tree networks. These are more powerful generalizations of existing binary search tree networks (like SplayNets), which have been at the core of SAN designs. k-ary search tree networks are a natural generalization offering nodes of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
11institutetext: ITMO University 22institutetext: Technical University Berlin
Toward Self-Adjusting
-ary Search Tree Networks
Eligible for the best student paper award
Feder Evgenii 11
Paramonov Anton 11
Salem Iosif 22
Schmid Stefan 22
Aksenov Vitaly 11
Abstract
Datacenter networks are becoming increasingly flexible with the incorporation of new networking technologies, such as optical circuit switches. These technologies allow for programmable network topologies that can be reconfigured to better serve network traffic, thus enabling a trade-off between the benefits (i.e., shorter routes) and costs of reconfigurations (i.e., overhead). Self-Adjusting Networks (SANs) aim at addressing this trade-off by exploiting patterns in network traffic, both when it is revealed piecewise (online dynamic topologies) or known in advance (offline static topologies).
In this paper, we take the first steps toward Self-Adjusting -ary tree networks. These are more powerful generalizations of existing binary search tree networks (like SplayNets), which have been at the core of SAN designs. -ary search tree networks are a natural generalization offering nodes of higher degrees, reduced route lengths for a fixed number of nodes, and local routing in spite of reconfigurations. We first compute an offline (optimal) static network for arbitrary traffic patterns in time via dynamic programming, and also improve the bound to for the special case of uniformly distributed traffic. Then, we present a centroid-based topology of the network that can be used both in the offline static and the online setting. In the offline uniform-workload case, we construct this quasi-optimal network in linear time and, finally, we present online self-adjusting -ary search tree versions of SplayNet. We evaluate experimentally our new structure for (allowing for a comparison with existing SplayNets) on real and synthetic network traces. Our results show that this approach works better than SplayNet in most of the real network traces and in average to low locality synthetic traces, and is only little inferior to SplayNet in all remaining traces.
Keywords:
self-adjusting networks -ary trees online algorithms dynamic programming
1 Introduction
With more services being offloaded to the cloud and the ever increasing numbers of connected devices to the internet, inter- and intra-datacenter traffic follows a clearly increasing trend. Therefore, datacenter network design has been attracting a lot of attention. Traditional datacenter network designs are static and perform well only under certain workloads. However, datacenter traffic follows patterns which can be exploited in the design of more efficient networks. It has been shown that a small fraction of network nodes accounts for a large fraction of traffic, the traffic distribution is sparse, and it exhibits locality features which change over time [3].
As a result, dynamic network topologies have emerged. Supported by advances in networking hardware (e.g., optical circuit switches or even experimental designs as in [8]), physical network topologies now have the ability to self-adjust. That is, the physical network topology is now programmable and can be manipulated to serve traffic more efficiently. Interestingly, leading cloud providers have already attempted to incorporate dynamic networks into their datacenters [12] (and previously [8]).
This flexibility provided by networking hardware raises an optimization challenge: how can we use it in the best possible way to get more efficient networks? There is a trade-off between the cost of changing the network topology (reconfiguration cost) and the benefit of reducing the distance of frequently communicating nodes (routing cost). In the online case, where future communication demand is unknown and only revealed piecewise, we would opt for topology updates that will pay off in the future. In the offline case, we aim at computing an optimal network topology with low time complexity.
The developing field of Self-Adjusting Networks (SANs) aims to address these optimization challenges. SANs often assume a family of allowed topologies, e.g., lists, trees, skip lists, etc., within which the network has to remain. This restriction is not only practically motivated (e.g., optical switches are of bounded degree), but also simplifies algorithm design and allows for theoretical performance guarantees. Specifically, self-adjusting tree networks have been at the core of SAN designs. SplayNet [13], a self-adjusting binary search tree network generalizing splay trees [15], was the first proposed SAN. SplayNet has been extended to ReNet [6], a static optimal SAN for sparse communication patterns, but also to a distributed version, DiSplayNet [11].
In this work, we take the first step to generalize to -ary search tree networks, since they provide higher node degrees, shorter routes than binary search trees (BSTs) for a fixed number of nodes, and local (and greedy) routing regardless of reconfigurations. We present offline static and online self-adjusting networks and evaluate our newly proposed heuristic for SANs experimentally.
Contributions. We present offline static and online self-adjusting -ary search tree networks.
-
We construct an optimal static -ary tree network in time using dynamic programming. We then reduce the complexity to for the special case of uniformly distributed traffic. This case is non-trivial, since the topology is not restricted to perfectly balanced trees.
-
We present a -ary tree network which is built by trees with almost equal size connected around at most two centroid nodes. We first present a linear offline algorithm for optimally constructing the static version of this topology for uniformly distributed traffic. We then present two online self-adjusting variants: -ary SplayNet which is the direct generalization of SplayNet and -SplayNet which is obtained by applying the found centroid heuristic. We experimentally evaluate them for (BST network) with synthetic network traces and real ones from datacenter traffic. We compare 3-SplayNet to SplayNet, and to static demand aware and oblivious trees. The results show that our SAN performs better than SplayNet in most real network traces and in synthetic ones that have average to low temporal locality, while its performance is similar to SplayNet for the remaining datasets.
**Related work. ** Self-Adjusting Networks were introduced with SplayNet [13]. SplayNet is a binary search tree network that generalizes Splay Trees [15]. SplayNet uses the tree rotations of splay trees to reduce the distance of communicating nodes to 1. The same paper presents a dynamic programming algorithm for computing an optimal binary search tree network when the demand is known, among other results. SANs were further surveyed and classified in [5]. The authors present a classification of network topologies, which depends on whether they are (i) oblivious or aware to traffic patterns, (ii) fixed or reconfigurable, and (iii) aware of the input sequence of communication requests (offline, online, generated by a distribution). This taxonomy allows for optimizing for certain properties according to each case, e.g. diameter or competitive ratio.
Tree-based SANs were further studied following SplayNet, possibly due to being more easy to analyze and deploy. ReNets [6] are bounded-degree SANs based on combining ego-trees, which are trees where the source is a node and the leaves are the communicated destinations. In this design, ego-trees are stars or splay trees, depending on the number of destinations. ReNets achieve desirable optimality properties (static optimality) for sparse communication patterns. Ego-trees were further studied in the form of self-adjusting single-source tree networks in [4, 2], which provided a number of constant competitive (dynamically optimal) randomized and deterministic algorithms with good experimental performance. SplayNet has also been the basis of distributed tree SANs [11, 10]. All the results mentioned above are for binary tree networks. SANs that are not tree-based have also been studied but are not related to our work.
2 Model
We consider a network of nodes and a finite or infinite communication sequence , where is a communication request from source to destination . The network topology must be chosen from a family of desired topologies , for example, search trees, expander graphs, etc. Each topology is a graph . The routing cost of is given by the distance between the two endpoints in the topology the network has when serving the request. The topology can be reconfigured between requests with a cost equal to the number of links (edges) added or removed. The total service cost of is the sum of routing and reconfiguration costs. Our goal is to serve the communication sequence with minimum total cost.
We distinguish two problem variants. In the offline static variant, is known but no reconfigurations occur. We have to build a network with topology that does not change during or in between requests. Such a graph needs to optimize the total cost function , where is the distance between the communication endpoints of in and is the size of . In the online self-adjusting variant we assume that we can change the network after each request. We are provided with an arbitrary initial network (before the first request arrives), which we denote by . Our task is to build an online algorithm that adjusts the network at every time instant , , and minimizes the total cost, which is calculated as , , where is the path length in edges of to process request and is the adjustment cost to reconfigure the network from step , , to step , . Note that may choose to perform no reconfigurations.
This paper focuses on both problems in a setting where the set of topologies is the set of -ary search trees. These trees are the generalization of binary search trees, which were investigated in [13] in the context of SANs. The main advantage of search tree networks is that we can route locally: given a destination identifier (or address), each node can decide locally to which neighbor to forward the packet. This is particularly useful in the online setting, as routing tables do need to be updated upon reconfiguration. With increasing , route lengths decrease and node degree increases.
Definition 1
A -ary Search Tree is a rooted tree on keys with each node storing a key and having at most children. In each node, children are ordered and maintain the following property: for every two children and , if , then all the keys in a subtree of are smaller than all the keys in a subtree of .
The local transformations of search tree networks are called rotations. A rotation in a -ary search tree changes up to adjacency relationships, while keeping subtrees intact and maintaining the search property (Definition 1). Such rotations can be implemented in a different manner, for example, as done by Sherk [14]. Note that it is possible to transform any -ary search tree into any other -ary search tree by a sequence of local transformations.
3 Optimal static -ary search tree networks
In this section we construct optimal -ary search tree networks via dynamic programming. We present the case of generic traffic patterns in Section 3.1, which has cubic time complexity . Then, in Section 3.2 we drop the complexity to quadratic for the special case of uniformly distributed traffic. Note that we are not restricted to balanced trees, thus the constructing the optimal network in the latter case is non-trivial.
3.1 Algorithm for arbitrary traffic patterns
In our first result we construct an optimal (offline) static -ary search tree network. We are given a number and a demand matrix that shows the total number of requests between and . We have to find a -ary Search Tree on vertices that minimizes the total distance:
[TABLE]
where is the distance between nodes and in the tree . It is convenient to think about this problem in terms of edge potentials.
Definition 2
Given a demand matrix and a tree on vertices the potential of an edge is , where is a set of pairs such that the shortest path connecting and in passes through . Note that since this is a tree, the shortest path is unique.
By their definitions, the total distance can be expressed using the potentials as follows: Now, we present the required algorithm.
Theorem 3.1
The construction of an offline static -ary Search Tree network, i.e. one with minimal total distance given the requests in advance, can be solved in .
Proof
Our algorithm uses the dynamic programming approach. Throughout the proof, if we are talking about the segment , we assume that . For a segment ,we denote a submatrix of as . We define matrix such that . intuitively means a total number of requests going out of the segment .
Claim
There exists an algorithm that computes in time.
Proof
We express in terms of forward and backward functions. Namely for each pair of nodes we define In other words, it calculates the number of requests from to . Analogously, we define for each pair of nodes , . In other words, it calculates the number of requests from to . The whole prefix function can be computed in . First, we compute by the definition. Then, for is computed as . Symmetrically, can be computed in . Thus, both and can be precomputed in . Now, we can compute in using prefix functions and in the following manner: , i.e., for each node in the segment we calculate the number of requests to the left out of the segment and the number of requests to the right out of the segment. Thus, we computed in .
We define a target of a segment as the cost of the optimal -ary Search Tree build on that segment plus the number of requests going out of that segment calculated in : . Now, finally we can define our dynamic programming for and as .
Intuitively, means the minimal cost of partitioning a segment into children that are -ary search trees. We can compute by using the following equalities:
[TABLE]
The logic is that in order to partition the segment into trees one should first choose the prefix subsegment for the first tree and build trees on the remaining segment.
The case is special. It means that we want to build a single search tree on this segment. In order to do so, we first choose the root node and after that the number of children to the left of a root node and a number of children to the right of a root node . This covers all the possible cases. And in each case we can optimize each subtree out of independently, which equal to the corresponding value. Finally, we have to add the number of requests that passes an edge from to the parent which is — which is the potential of that edge.
When calculating we refer to the answer on subsegments of , so we make sure that this value is already calculated by processing segments increasing their length. Namely, we start by setting the answer on the segments of length , and, then, proceed by considering all the segments of length , then , and so on, up to .
We need to consider all the possible segments: there are of them. For each segment we calculate dynamic for . When and are fixed, we spend time iterating over looking for a minimum. This results in in total. And when and are fixed, we spend considering different roots and possibilities of distributing number of subtrees to the left and to the right of the root. So, in this case we obtain .
It is possible to reduce the complexity by . For that we introduce . If we can calculate that, then we don’t have to iterate over all pairs and . Now, for case, we need to find . It gives in total. can be easily computed in the desired time.
3.2 Algorithm for uniformly distributed traffic
In this section we improve the cubic complexity proven in Section 3.1 for the special case of uniform workloads. A uniform workload is an infinite workload where each pair of nodes is requested uniformly at random. Our goal is to find a static -ary search tree that responds to an infinite uniform workload as fast as possible, i.e., the expectation of the cost of each query is minimal. To simplify the analysis we consider a finite version of this workload. Note that a finite and a normal uniform workload are the same in terms of expected values of query costs. A finite uniform workload is a workload where each pair of nodes is requested exactly once. Note that we are interested in constructing an optimal and not necessarily a full -ary search tree network; the latter if trivial in uniform workloads, but the former is not. Specifically, we show that in the uniform workload case the pipeline of the dynamic programming from Theorem 3.1 can be updated to have complexity.
Claim
In the uniform workload scenario, for any and any . In other words, of the segment depends only on its length, not position. Moreover, can be computed in .
Proof
Recall that intuitively indicates the number of requests going out of the segment . Since each node within the segment communicates exactly once with each node outside the segment, then .
Claim
In the uniform workload scenario, for any and any . In other words, the cost of the segment depends only on its length, not its position.
Proof
Recall that . By the Claim 3.2 the second term is equal for any two segments of an equal length. As for the first term, it is also equal since for all in the uniform case.
By Claim 3.2, we can simplify our from three parameters to two , where now signifies the length of the segment. By that we reduce the dynamic programming by one dimension, and, hence, we get rid of in the complexity, resulting in .
4 Centroid -ary search tree networks
In this section we present offline static and online self-adjusting -ary search tree networks. In this context, we propose a topology with a centroid node and trees connected around it. We first study the offline static case and present a construction of the proposed topology in (Section 4.1). Then we present online heuristics in Section 4.2 and experimentally evaluate it for the case of in Section 6.
4.1 Quasi-optimal static -ary search tree network in
In a finite uniform workload a potential from Definition 2 of an edge connecting two subtrees and is equal to . A -ary search tree is weakly-complete when all its levels are fully filled (i.e., each node has children) except for the last level. Nodes on the last level can be distributed arbitrarily. The height of a tree is the length of the path in edges from the root to the nodes on the last non-empty level.
Definition 3
A quasi-optimal tree of degree is a rooted tree with the root having weakly-complete -ary trees. All the levels of the whole tree are fully filled except possibly the last one. We can change the relative positions of subtrees such that the leaves on the last level are all grouped together to the left. The tree is shown of Figure 1.
Though for the proof purposes it is more convenient to look at the quasi-optimal tree as rooted at the vertex with children described in the definition, we accentuate the fact that that tree is still a -ary tree if we root it at an (arbitrary) leaf.
Definition 4
Consider two neighbouring weakly-complete subtrees. A push-up operation moves a leaf from the last level of one tree to the last level of another.
Lemma 1
Assume that we do a push-up operation in the tree from the weakly-complete subtree of height to a weakly-complete sibling subtree of height ( where is calculated after moving the node and is calculated before moving the node). Assuming , the total distance for uniform workload decreases.
In the proof of this lemma we just move the node and calculate the cost. We present the proof in Appendix.
Corollary 1
For each subtree of an optimal tree if then is a weakly-complete tree.
Proof
We prove this statement by the induction on the height of .
At first, we prove the base. If is of height , then all of its subtrees are either empty or of height or [math] and, thus, they are weakly-complete. Suppose that is not weakly-complete. Thus, we deduce that there is a subtree of height and an empty subtree, so we can perform a push up operation improving the total distance which contradicts the optimality of .
So, now, we may assume by the inductive hypothesis that all the subtrees of are weakly-complete.
Suppose that is not weakly-complete. By the induction hypothesis, there are two subtrees of such that we can perform a push-up operation between them decreasing the total cost which contradicts the optimality of .
Corollary 2
Assume that we do a push-up operation from the weakly-complete subtree of height to a weakly-complete sibling subtree of height (, where is calculated after moving the node and is calculated before moving the node). The total distance increases by .
Proof
Using the notation of Lemma 1, after the push-up operation the total distance increases by at most which according to Claim 0.A is
Definition 5
Centroid of a tree is a node such that when removed, will be split into subtrees with for all . The centroid decomposition is represented by .
Claim (Jordan [9])
Any tree has a centroid decomposition.
Assume we know the optimal tree of size to serve uniform requests. We make a centroid decomposition of it obtaining a centroid and trees . ( could be empty.) From now on we assume that is rooted at .
Lemma 2
If we root an optimal tree at its centroid, then, for each subtree its centroid is either a root of or a child of a root.
Proof
Denote the root of as .
If all subtrees of have size , then is a centroid of and the statement holds.
Denote the subtrees of as .
If is not a centroid, one of is bigger than . Suppose, for simplicity, it is . We now prove that the root of is a centroid of .
Denote the root of as and its subtrees as . The visualisation for the lemma is presented in Figure 3.
Assume is not a centroid. Then, it means that either is bigger than or is bigger than for some .
- •
Suppose that is bigger than . This is impossible since we already know that .
- •
is bigger than for some . Suppose, for simplicity, this tree is .
Now, we are going to prove that if we swap with any of , say to be certain, the total cost will decrease.
We refer to the total cost expressed in terms of edge potentials. Note that the potential for the edges within and does not change. Neither does it change for the edges going out of and . So, the only change is in the potential of edge.
The old value for its potential is
[TABLE]
while the new one is
[TABLE]
Now we calculate the difference between the potentials:
[TABLE]
which is positive since: 1) ; and 2) due to the fact that is a centroid we know that is bigger than the half of the tree, or in other words:
So we can only have two possibilities for the inner structure of each subtree of an optimal tree (rooted at its centroid).
Corollary 3
If we root an optimal tree at its centroid, then holds for each subtree at level .
Proof
We prove this statement by the induction.
The statement holds for .
Consider a subtree at level and a tree rooted at a grandparent of a root of . By Lemma 2, which by induction hypothesis
Combining Corollary 1 and Corollary 3, we obtain that each subtree of an optimal tree at level must be weakly-complete.
Lemma 3
If there are two neighbouring subtrees of the same height both having their last level not empty and not full, the total distance can be decreased.
This lemma is also proved straightforwardly. We suggest the opposite and try to move nodes in between subtrees. We calculate the difference and show that the total cost decreases. The formal proof appears in Appendix.
Remark 1
If a tree has all its levels filled except possibly the last one, and there are no two neighbouring subtrees of the same height both having their last level not empty and not full, then, we can change the order on the children of each node of , so, that all the leaves of the last level are placed as left as possible, one by one.
Proof
We prove this statement by an induction on the height. If the tree has height one, we simply can make the “leftmost” numbering on the non-empty children. Now, we discuss the case when the tree has height . By the statement of the remark, there can be at most one child of a root with its last level not fully filled and not empty. By the induction hypothesis, we assume that its leaves on the last level are placed as “left” as possible. We now order the sons of the root in the following manner. First, we add the subtrees which have their last level full from left to right. Note, that they can be in arbitrary order. Then, we place the subtree with the last level not full and not empty (it might not exists, but if it exists, there is only one such subtree). By the induction statement, all its leaves are at the left. Finally, we place the subtrees which have their last level empty, in arbitrary order. We got exactly the “leftmost” position of leaves.
Theorem 4.1
The difference in the total distance between an optimal tree and the quasi-optimal tree is .
Proof
Our plan is to reconfigure into the quasi-optimal tree while controlling the increase of the total distance.
We push-up some nodes to ensure that all the subtrees at level are weakly-complete starting from and up to (the whole tree).
Suppose we want to make a subtree at level weakly-complete. Since we go through levels decreasingly, we can argue that all the subtrees of are already weakly-complete (this holds for ).
If is not weakly-complete, it means that there are two subtrees of with height difference at least . So, we take the subtree with the biggest height and the subtree with the smallest height and perform a push-up operation between them.
We act in this manner until there are two subtrees of height difference . Once there are none, we say that is weakly-complete by definition.
When processing certain level, each node is moved at most once (in its subtree), so each node is moved no more then times, thus, by Corollary 2, the total cost change is : at most nodes move times each increases by .
And the last step would be to reshuffle leaves on the last level, so they are as far left as possible, so we get a quasi-optimal tree.
Assume there are two neighbouring subtrees such that their last level is not empty and not full. By Lemma 3, we can decrease the cost by moving leaves from the smaller subtree to the bigger one.
We perform those movements until our tree is quasi-optimal.
Theorem 4.2
Assuming is a constant, the total distance in optimal tree is .
Proof
We root tree by its centroid . At least two subtrees of , and , have at least nodes. Otherwise, is not the centroid. Each such has nodes at levels . Thus, the total pairwise distance between these nodes is .
Theorem 4.3
The quasi-optimal tree can be built in .
Remark 2
By Theorem 4.1 we know that the quasi-optimal tree differs from the optimal by (considering constant). Since, in the uniform workload there are requests, thus, in total we add just a constant to the cost of each request.
Remark 3
In our experiments, we found that quasi-optimal tree is indeed optimal for all less than .
4.2 Online self-adjusting -ary search tree networks
We present two online heuristics. The first one is the -ary SplayNet which is the self-adjusting version of -ary search tree and direct generalization of SplayNet [13]. In this new structure, we use splay operations for -ary search trees proposed by Sherk [14]. Upon serving a request between two nodes, we -splay them to their lowest common ancestor.
We also propose -SplayNet, a centroid-based structure, which is the online equivalent of Section 4.1. The topology is presented in Figure 6. We split the nodes in parts and specify two nodes-centroids: and (centroid decomposition) which have subtrees of size . Centroid has children except for that are -ary SplayNets of size . Centroid is the rightmost centroid. has -ary SplayNets of size as children. When we want to serve a request we -splay and to their lowest common ancestor, as was done in SplayNet. However, we never move nodes and . That is, upon requests originating in different subtrees of and , we splay the endpoints to their subtree roots, such that and . The sets of nodes in the subtrees remain intact, but these trees can self-adjust.
4.3 A case study for
We study the two online heuristics experimentally for the case of . The -ary SplayNet is the standard SplayNet for , which we compare to the centroid-based 3-SplayNet. We implemented it and run against standard SplayNet on different workloads. As a result, it appears that on workloads with low temporal complexity -SplayNet works better than SplayNet.
Setup and data
The code for the algorithms was written in C++ and Python. We have three types of experiments: on the uniform workload with nodes, on the synthetic workloads with nodes and different temporal complexities [3] (, , , ), and on the data from three real-world datasets: a high performance computing (HPC) workload [7], a workload on ProjectToR [8], and a synthetic pFabric (pFab) [1] workload. We restrict all datasets to requests on: uniform workload with nodes, HPC with nodes, ProjectToR with nodes, and Facebook with nodes.
We run these workloads on four different structures: static full binary search tree (green), static optimal binary search tree (purple), 3-SplayNet (red), and SplayNet (blue). All our plots show the average cost of requests after serving the first requests.
Results
On the plots, we show the average cost of the requests on different data sets; lower costs are better. We observe that 3-SplayNet performs better or similarly to SplayNet on average and low temporal complexity workloads (0.25 and 0.5), while on high temporal complexity workloads (0.75 and 0.9) it works a bit worse. Also, 3-SplayNet outperfors SplayNet for the uniform workload, and for the ProjecToR and Facebook workloads, but not for the HPC workload (higher locality than the other two real-world workloads). We interpret this as the effect of having fixed centroid nodes.
5 Conclusion and Future Work
We presented online and offline algorithms for self-adjusting -ary search tree networks. Specifically, we presented dynamic programming algorithms for computing an optimal static network in generic and uniformly distributed traffic. We also presented an offline and online -ary search tree network that has a centroid node and trees of almost equal size connected to it. Our experimental results show that for real and synthetic traces of average to low locality it outperforms SplayNet and that its performance is always close to the best out of the algorithms tested. We believe that our work paves the way to new SANs for -ary search tree networks for general or specific traffic patterns.
Acknowledgements
This research was supported by the Austrian Science Fund (FWF), project I 4800-N (ADVISE), 2020-2023.
Appendix 0.A Proofs
Lemma 1
Assume that we do a push-up operation in the tree from the weakly-complete subtree of height to a weakly-complete sibling subtree of height ( where is calculated after moving the node and is calculated before moving the node). Assuming , the total distance for uniform workload decreases.
Proof
Let a leaf of be the removed node and let a leaf of is where we place the moved node. The total distance is affected: all the terms with , i.e., terms, are removed and new terms with are added, where is the whole tree. Let us denote the path from the root of to : . Let us also denote the subtree formed by and its child trees other than the one with as . The same notation we use for the tree and the node . You can see the tree at Figure 9. We define .
Our goal now is to calculate the difference in the total distance after the push up operation. This difference consists of three parts:
We denote the change in the distance for nodes in ( is closer to them than ):
[TABLE] 2. 2.
We denote the change in the distance for nodes in ( is closer to some nodes than , note that not all nodes in are closer to since has smaller depth):
[TABLE] 3. 3.
We denote the change in the distance for nodes in ( is closer to them than since the depth of is smaller):
[TABLE]
Hence, the total distance is changed by . We want to prove that is negative, thus, the total distance decreases when we move to .
We can lower bound easily:
[TABLE]
Let us now find an upper bound for . At first, we define the Total Distance to Root (or TDR) function for tree rooted at as . We say that is rooted at .
So, the total distance from and to the nodes of can be expressed in terms of this function TDR:
[TABLE]
The intuition behind those formulas is that in order to travel from to all the nodes in we first need to travel to its root which is at the distance . We do it for each node, so times. And, then, we travel from the root of to a corresponding node, accumulating in total. The same is calculated for but the distance to decreases.
Thus,
[TABLE]
Each consists of root and not more than weakly-complete -ary trees of height not exceeding . Therefore,
[TABLE]
By that, we notice that
[TABLE]
Using this inequality, we can upper bound further.
Claim
Proof
[TABLE]
Recall that and . So we obtain that .
Lemma 3
If there are two neighbouring subtrees of the same height both having their last level not empty and not full, the total distance can be decreased.
Proof
We consider two such subtrees with the smallest height, in a sense that they have all their leaves as far to the “left” as possible.
Suppose that in each subtree the last level contains at most leaves. The left subtree has leaves on its last layer and the right subtree has leaves on its last layer. Furthermore, we can assume that . (The other way around is symmetrical)
We consider two cases: either (Fig. 11) or (Fig. 11).
- •
In the first case, . Consider Figure 11. Leaves of the left tree are depicted green, leaves of the right tree are depicted blue. In this case we move all the leaves from the right tree to the right-most positions in the left tree.
- –
The total distance among blue leaves did not change.
- –
The total distance between blue leaves and the nodes outside considered trees did not change.
- –
The total distance between blue nodes and the right subtree (without leaves) is now equal to the total distance between blue nodes and the left subtree (without leaves). And vice versa.
- –
The total distance between blue nodes and green nodes is decreased.
- •
In the second case, . Consider Figure 11. We move left-most leaves from the right tree to the left tree. Left-most leaves of the left tree are depicted green. Other leaves of the left tree are depicted yellow. Moved leaves of the right tree are depicted blue. Other leaves of the right tree ( of them) are depicted red.
- –
The total distance among blue leaves did not change.
- –
The total distance between blue leaves and the nodes outside considered trees did not change.
- –
The total distance between blue nodes and the right subtree (without leaves) is now equal to the total distance between blue nodes and the left subtree (without leaves). And vice versa.
- –
The total distance between blue nodes and green nodes is decreased.
- –
The total distance between blue nodes and red nodes is now equal to the total distance between blue nodes an yellow nodes. And vice versa.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Alizadeh, M., Yang, S., Sharif, M., Katti, S., Mc Keown, N., Prabhakar, B., Shenker, S.: pfabric: Minimal near-optimal datacenter transport. ACM SIGCOMM Computer Communication Review 43 (4), 435–446 (2013)
- 2[2] Avin, C., Bienkowski, M., Salem, I., Sama, R., Schmid, S., Schmidt, P.: Deterministic self-adjusting tree networks using rotor walks. In: 2022 IEEE 42nd International Conference on Distributed Computing Systems (ICDCS). pp. 67–77. IEEE (2022)
- 3[3] Avin, C., Ghobadi, M., Griner, C., Schmid, S.: On the complexity of traffic traces and implications. Proceedings of the ACM on Measurement and Analysis of Computing Systems 4 (1), 1–29 (2020)
- 4[4] Avin, C., Mondal, K., Schmid, S.: Push-down trees: optimal self-adjusting complete trees. IEEE/ACM Transactions on Networking 30 (6), 2419–2432 (2022)
- 5[5] Avin, C., Schmid, S.: Toward demand-aware networking: A theory for self-adjusting networks. ACM SIGCOMM Computer Communication Review 48 (5), 31–40 (2019)
- 6[6] Avin, C., Schmid, S.: Renets: Statically-optimal demand-aware networks. In: Symposium on Algorithmic Principles of Computer Systems (APOCS). pp. 25–39. SIAM (2021)
- 7[7] DOE, U.: Characterization of the doe mini-apps. https://portal.nersc.gov/project/CAL/doe-miniapps.htm (2016)
- 8[8] Ghobadi, M., Mahajan, R., Phanishayee, A., Devanur, N., Kulkarni, J., Ranade, G., Blanche, P.A., Rastegarfar, H., Glick, M., Kilper, D.: Projector: Agile reconfigurable data center interconnect. In: Proceedings of the 2016 ACM SIGCOMM Conference. pp. 216–229 (2016)
