Optimal replica placement in hierarchical Data Grids with locality assurance
Jan-Jan Wu
b,∗,
Yi-Fang Lin
a,
Pangfeng Liu
a aDepartment of Computer Science, National Taiwan University, Taipei, Taiwan, ROC bInstitute of Information Science, Academia Sinica, Taipei, Taiwan, ROCa r t i c l e i n f o Article history:
Received 2 November 2006 Received in revised form 9 June 2008
Accepted 27 August 2008 Available online 6 September 2008 Keywords:
Hierarchical data grids Replica placement Load balancing Locality assurance
a b s t r a c t
In this paper, we address three issues concerning data replica placement in hierarchical Data Grids that can be presented as tree structures. The first is how to ensure load balance among replicas. To achieve this, we propose a placement algorithm that finds the optimal locations for replicas so that their workload is balanced. The second issue is how to minimize the number of replicas. To solve this problem, we propose an algorithm that determines the minimum number of replicas required when the maximum workload capacity of each replica server is known. Finally, we address the issue of service quality by proposing a new model in which each request must be given a quality-of-service guarantee. We describe new algorithms that ensure both workload balance and quality of service simultaneously.
We conduct extensive simulation experiments to evaluate the effectiveness of our algorithms. The comparison with the previousAffinity Replica Location Policydemonstrates that our algorithms consistently outperform the heuristic algorithm both in terms of minimum number of replicas used and the actual data transmission time.
© 2008 Elsevier Inc. All rights reserved.
1. Introduction
Data Grids provide geographically distributed storage resources for complex computational problems that require the evaluation
and management of large amounts of data [4,13,22]. With the
high latency of the wide-area networks that underlie most Grid systems, and the need to access/manage several petabytes of data in Grid environments, data availability and access optimization have become key challenges that must be addressed.
An important technique that speeds up data access in Data Grid systems replicates the data in multiple locations so that a user can access it from a site in his vicinity. It has been shown that data replication not only reduces access costs, but also increases
data availability in many applications [13,24,18]. Although a
substantial amount of work has been done on data replication in Grid environments, most of it has focused on infrastructures
for replication and mechanisms for creating/deleting replicas [5,
8,7,9,13,18,25,24,27]. We believe that, to obtain the maximum benefit from replication, strategic placement of the replicas is also necessary.
Thus, in this paper, we address the problem of replica placement in Data Grid systems. We assume a hierarchical data grid model because of its resemblance to the hierarchical grid management
∗Corresponding author.
E-mail addresses:[email protected](J.-J. Wu),[email protected] (P. Liu).
model found in many grid systems [32,7,13,25]. The hierarchical Data Grid model is also one of the most important common architecture in current use [1,7,13,25,11]. For example, in the LCG
(WorldWide Large Hadron Collider Computing Grid) [32] project,
70 institutes from 27 countries form a grid system organized as a hierarchy, with CERN (the European Organization for Nuclear Research) as the root, or tier-0 site. There are 11 tier-1 sites directly under CERN that help distribute data obtained from the Large Hadron Collider (LHC) at CERN. Meanwhile, each tier-2 site in the LCG hierarchy receives data from its corresponding tier-1 site. In the future, LCG is expected to extend to more levels of tiers. The entire LCG grid can be represented as a tree structure. In the forthcoming EGEE/LCG-2 Grid, the tree structure will comprise 160 sites in 36 countries.
In our data grid model, data requests issued by a client are served by traversing the tree upwards towards the root until a data copy is found. In many real-world grid systems, like the multi-tier LCG grid system [32], data requests go from tier-2 to tier-1 sites, and then to tier-0 sites if necessary, in the search of requested data. In addition, the grid hierarchy usually reflects the structure of the organization or the geographic locality, so our assumption that data requests travel up towards the root is reasonable.
Our replica placement strategy considers a number of impor-tant issues. First, the replicas should be placed in proper server locations so that each server’s workload is balanced. A naive place-ment strategy may cause ‘‘hot spot’’ servers that are overloaded, while other servers are under-utilized.
Another important issue is choosing the optimal number of replicas. The denser the distribution of replicas, the shorter the
0743-7315/$ – see front matter©2008 Elsevier Inc. All rights reserved. doi:10.1016/j.jpdc.2008.08.002
distance a client site needs to travel to access a data copy. However, as noted earlier, maintaining multiple copies of data in Grid systems is very expensive; therefore, the number of replicas should be bounded. Clearly, optimizing the access cost of data requests and reducing the cost of replication are two conflicting goals. Thus, finding a suitable trade-off between the two factors is a challenging task.
Finally, we consider the issue of service locality. Each user may specify the minimum distance he/she can allow between him/her and the nearest data server. This is a locality assurance requirement that users may stipulate, and the system must ensure there is a server within the specified range to handle the request.
In this paper, we study two data grid models. The first is called the ‘‘unconstrained model’’ in which the client can not specify locality requirements. This model provides us with insights into designing algorithms that balance the workload among replicas. The second model is called the ‘‘constrained model’’ in which each client can specify his/her own acceptable quality of service, in terms of the number of hops to the root of the tree. This is an important requirement, since different users may require different levels of service quality. We model this as a range limit, so the placement algorithm must ensure that all the replicas are placed in such a way that all the quality of service (QoS) requirements are satisfied. In the constrained model, the problem of evenly distributing the load of data requests over all the replicas is more challenging than in the unconstrained model.
We develop theoretical foundations for replica placement in the two models (constrained and unconstrained). Furthermore, we devise efficient algorithms that find optimal solutions for the three important problems described above.
We conduct extensive simulation experiments to evaluate the effectiveness of our algorithms. The comparison with the previous
Affinity Replica Location Policy
[1] demonstrates that our algorithms consistently outperform the heuristic algorithm both in terms of minimum number of replicas used and the actual data transmission time.The remainder of the paper is organized as follows. Section2
reviews related works. In Section3, we describe the unconstrained
model, and formally define our replica placement problem.
Section 4 presents our replica placement algorithms for the
unconstrained model. Section5 defines the constrained model,
while Section6presents our replica placement algorithms for the
constrained model and provides a theoretical analysis of them.
Section7presents our simulation experiments and evaluation of
the algorithms. Finally, in Section8, we present our conclusions,
address some as yet unresolved problems, and indicate the direction of our future work.
2. Related work
Data replication has been commonly used in database systems [33], parallel and distributed systems [2,21,26,30], mobile sys-tems [12,29], and Data Grid systems [1,7,23,25,27].
A number of works have addressed the placement of data replicas in parallel and distributed systems based on regular network topologies, such as hypercubes, tori, and rings. These networks possess many attractive mathematical properties that facilitate the design of simple and robust placement algorithms [2,
30]. However, such algorithms cannot be applied to Data
Grid systems directly due to the latter’s hierarchical network structures and special data access patterns, which are not common in traditional parallel systems. An early approach to replica
placement in Data Grids, reported in [1], proposed a heuristic
algorithm called
Proportional Share Replication
for theplacement problem. However, the algorithm does not guarantee that an optimal solution will be found.
Another group of related works that focus on placing replicas in a tree topology can be divided into two types of model. The first allows a request to go up and down the tree searching for
the nearest replica. For example, Wolfson and Milo [33] proposed
a model in which no limit is set on the server’s capacity. There are two cost categories in this model: the read cost and the update cost. The read cost is usually defined as the number of hops, or the sum of the communication link costs from a request to its server. The update cost, on the other hand, is usually proportional to the sum of the communication link costs of the minimum subtree that
spans all the replicas. The goal in [33] is to minimize the sum of
the read and update costs, which can be achieved by a greedy
method in O
(
n)
time, where n is the number of nodes. Kalpakiset al. [16] developed a model in which each server has a capacity
limit and each site has a different building cost, called the site cost. The objective is to minimize the summation of the read, update and site costs. The authors showed that the optimal placement
could be found in O
(
n5C2)
time; however, for an incapacitatedserver model, the cost would be O
(
n5)
, where n is the number ofnodes and C is the maximum capacity of each tree node. Unger
and Cidon [31] suggested a similar model to that of Kalpakis, but
without the server capacity limit. As a result, the time required
to find the optimal placement is reduced to O
(
n2)
[31]. Jaegerand Goldberg [14] proposed a model in which there are a known
number of servers in the tree, each with equal capacity. There are no read, write, or site building costs, and the goal is to assign the request to a server (not necessarily the nearest one), so that the maximum distance from a client to its assigned server is minimized. The optimal solution can be found by a greedy method
in O
(
n2)
time. Korupolu et al. [17] developed a model in whichthe read cost is slightly different from that of other models. A data request must go from the client to the least common ancestor of the client and the replica, and then to the replica so that the read cost is proportional to the depth of the subtree rooted at the common ancestor. The authors present various approximation algorithms that achieve good replica placement.
The second type of model only allows a request to search for a replica towards the root of the tree. For example, Jia et al. [15] suggested a model in which neither the server’s capacity nor the site’s building cost are set. The goal is to minimize the sum of the read and update costs while placing k replicas, which can be achieved by dynamic programming in O
(
n3k2)
time. Cidon et al. [6]proposed a similar model in which a replica is associated with a site’s building cost, but there is no update cost. The goal is to minimize the sum of the read and storage costs, which can be achieved by dynamic programming in O
(
n2)
time. Tang and Xu [28] described a model in which there is a range limit on the number of hops a request can make from its assigned replica, but there is no server capacity limit. The objective is to find a feasible solution and minimize the sum of the update and storage costs, which can also be achieved by dynamic programming in O(
n2)
time. Liu et al.considered the minimum number of servers and load balancing in [20], and added the range constraint in [19]. Rehn-Sonigo [26] subsequently described a model in which there is range limits on the requests and bandwidth constraints on the network links. The objective function is to minimize the total server utilization cost,
which can be achieved by dynamic programming in O
(
lnlog
n)
time, where l is the maximum range limit among the nodes. Benoit. et al. propose two new tree communication models where clients do not need to go to the nearest server, or a request can be served
by multiple servers [3]. They also show that when server capacity
is heterogeneous, the server placement problem is NP-complete, even for simple topology like tree [3].
Our model focuses on the tree topology in which the requests only travel up towards the root. In real-world grid systems like LCG [32], the requests go from 2 to 1 sites, and then to tier-0 sites if necessary, searching for data. The grid hierarchy usually
is dominated by the performance of the server with the heaviest workload. Although we believe that the load balance of servers is the key optimization criterion for Data Grid systems, we also believe that load balance and quality of service should be considered simultaneously. To date, this aspect has not been adequately addressed in the literature.
The server placement problem we studied in this paper is a combination of minimum dominating set problem and graph partitioning problem, both problems are well known NP-complete
for general graphs [10]. The minimum dominating set is a special
case of our server placement problem when the minimum distance demanded by every client is 1, and the graph partition problem is similar to our server placement problem because we want to partition a tree into k subtrees of roughly equal sizes in term of workloads. Despite the fact that both minimum dominating set and graph partitioning are NP-complete for general graphs, we are able to utilize the tree topology to derive dynamic programming solutions for the server placement problem. Recently Benoit. et al. show that when server capacity is heterogeneous, the server placement problem remains NP-complete, even for simple
topology like tree [3]. We are able to show that when the server
capacity is uniform, there does exist efficient algorithms. Also note that the server placement problem is more complicated than the original minimum dominating set problem because the minimum distance to a server is not a constant, and it is also more complicated than the original graph partitioning problem since the workload is not uniform.
3. The unconstrained model
Before addressing the issue of workload balance among replicas, we describe our unconstrained data grid model in detail. We use a tree, T , to represent a data grid system. The root of the tree, denoted by r, is the hub of the data grid. A database replica can be placed on any tree node, except the hub r. All the tree’s leaves are local sites, where users can access databases stored in the data grid system.
Users of a local site can access a database as follows. First a user request tries to locate the database replica locally. If the replica is not found, the request travels up the tree to the parent node to search for the replica. In other words, the user request goes up the tree and uses the first replica encountered on the path to the root. If after traveling up the path, a replica is not found, the hub will service the request. For example, inFig. 1, a user request tries to access data at node a. As the data is not available at a, the request goes to the parent node, b, where the data is not available either. Finally the request reaches node c, where the replica is found.
The goal of our replica placement strategy is to place the replicas such that various objectives can be satisfied. This raises a number of questions. For example, if we can accurately estimate how often a leaf node is used to locate specific data, where do we place a given number of replicas so that the maximum amount of data a replica has to handle is minimized? In addition, if we fix the workload that a replica can handle, how many replicas do we need, and where should we put them?
We now formally define the goals of our replica placement strategy. Let l be a leaf node of the set of all leaves L, and let
w(
l)
Fig. 1. A data grid tree T .
Fig. 2. The actual workload of the nodes in a data grid tree T .
be the number of data requests generated by l. Note that, for ease of discussion, we focus on the case where only leaves can request data. All the results in this paper can be generalized to cases where all the tree’s nodes, including the internal nodes, can request data. Next, based on the data grid access model described above, we define the workload of a particular node after the replicas have been placed. Let T be a data grid tree, N be the set of nodes in T , and R be a subset of N, with a replica placed on every node of R. The workload for a node n of N, denoted as f
(
n)
, is defined recursively as follows:fR
(
n) =
(
w(
n)
if n is a leafX
c
fR
(
c)
c is a child of n,
and c6∈
R.
The maximum workload of R is the maximum workload of all nodes of R and the hub. We include the hub because it services all data requests not serviced by replicas. We now formally define the problems.
•
MinMaxLoad: given the number of replicas k, find a subset of tree nodes R with cardinality k that minimizes the maximum workload.•
FindR: given the amount of data D that a replica or the hub can service, find the subset R with minimum cardinality such that the maximum workload is not greater than D.4. Algorithms for the unconstrained model
In this section, we describe our algorithms for solving the
MinMaxLoad
andFindR
problems in the unconstrained model.Fig. 3. The workload of the nodes in a data grid tree T when D is 18. A heavy node
is represented by a dark circle, and a critical node is represented by a gray circle.
4.1.
FindR
The
FindR
problem can be stated as follows. Given a grid tree and the workload on its leaves, a constant k, and a maximum workload D, find a subset of tree nodes R with cardinality no more than k in which to place the replica so that the maximum workloadon every replica in R and on the hub is no more than D (Fig. 2).
Such R sets are referred to as ‘‘feasible’’. A feasible R is optimal if it minimizes the workload on the hub.
To simplify the discussion, we first classify tree nodes into two categories. Suppose there is no replica in the tree, the workload on a leaf n is just
w(
n)
, and the workload on an internal node is the sum of the workloads of its children. If a tree node has a workload greater than D, we call it a heavy node; otherwise, it is a light node. If a light node has a heavy parent, we call it a critical node.Fig. 3illustrates the case where D equals 18. It is obvious that we can
always find an optimal R for the
FindR
problem; thus R does notcontain any non-critical light nodes.
Observation 1. There exists an optimal replica set that does not
contain any non-critical light nodes.
Proof. Let R∗ be an optimal replica set that contains n, a non-critical light node. Consider the unique non-critical light ancestor m of n, and the subtree rooted at m. All the replicas in this subtree can be replaced by a single replica at m, without increasing the workload on any of m’s ancestors. This is a feasible solution, since, by the definition of a light node, the total workload of this subtree is at
most D. For example, consider the tree inFig. 3. Node n is a
non-critical node and m is the unique non-critical light ancestor of n. All the replicas placed in the subtree rooted at m can be replaced by a single replica at m, so there must exist an optimal replica set that
does not contain any non-critical light nodes.
WithObservation 1in place, we only need to consider heavy and critical nodes in our search for the optimal replica set. The following lemma reduces our search space further.
Lemma 1. Let T be a data grid tree, p be a heavy node with only
critical children, and e be the child of p that has the maximum workload. There exists an optimal replica set that contains e.
Proof. Consider an optimal replica set R∗that must contain a child of p (denoted as f ); otherwise, p will be flooded with more than D requests. If f is not e, we replace it with e. The new replica set is feasible, since both e and f are light. Also this switch will not increase the workload on p or any of its ancestors.
Again we consider the tree inFig. 3. The heavy node p has two
children e and f , with workload 14 and 12, respectively. If we do not place any replica at either e or f , the workload of p will reach 26,
which is larger than the threshold D
=
18. If we placed a replica atf , this choice of location can always be replaced by placing a replica at e, which will only reduce that workload that reaches p and its ancestors, since the workload at e is higher than the workload at f . Therefore, it is always possible to find an optimal replica set that
contains e.
ByObservation 1andLemma 1, we derive a baseline algorithm, called
Feasible
, forFindR
. Given the tree T , the replica capacity D, and the number of replicas allowed k, theFeasible
algorithm determines whether there is a feasible replica set with cardinality k or less by repeatedly picking the critical leaf that has the maximumFig. 5. An execution scenario of the baseline algorithmFeasible. The capacity D is set at 18.
workload at most k times. If the tree becomes empty, a solution is
found. The pseudo code of
Feasible
is given inFig. 4.Note that once we pinpoint a critical child e on which to place
a replica, we must deduct
w(
e)
from the workload of all of itsancestors, including the hub. This might cause some of the heavy ancestors to become light nodes, which are non-critical and should be removed. We repeatedly update the workload towards the root, remove the ancestors and their subtrees if they become non-critical, and finally reach a node that has become critical. We repeat this process by selecting a heavy node with only critical children, as shown inFig. 5.
We analyze the time complexity as follows. Let n be the number
of tree nodes. It only takes O
(
n)
time to compute the workloadwhen no replica is placed; thus we can determine the category for every node. Also, since a node can only be removed once, the removal cost is bounded by O
(
n)
. However, the cost of updating the workload of the ancestors could be very expensive. For example,consider a skewed tree of heightΩ
(
n)
. We may need to update allthe ancestors of every child with the maximum workload that we pick from the bottom of the tree so that the total cost could be as high asΩ
(
kn)
.4.2. Lazy updating
We improve our
Feasible
algorithm by introducing a conceptcalled lazy update, which ensures that the update cost is not prohibitive. Lazy update assigns a deduction value to each internal
node n (denoted by d
(
n)
) to keep track of the amount of theworkload that should be removed from n and all of its ancestors. The lazy update mechanism traverses the heavy nodes depth first. When a heavy node with only critical children is found, lazy update picks the child (denoted as c) with the maximum workload on which to place a replica in the same way as the baseline
algorithm
Feasible
. It then subtractsw(
c)
(the workload of c)along the path from c back to the hub, as shown inFig. 6. If
an ancestor becomes non-critical, it is removed, as in
Feasible
(e.g., nodes g and h inFig. 6). When the lazy update reaches a heavy
node (node e inFig. 6) which becomes critical after reducing its
workload by
w(
c)
, it does not try to deductw(
c)
from the workload of each ancestor of e. Instead, it addsw(
c)
to the deduction value of e’s parent (denoted by f inFig. 6), and starts the traversal from f . Note that, because of this ‘‘deduction’’, we do not have to reduce the workload of other tree nodes on the same path from the leaf to the hub. As a result, when the lazy update deducts some workloadw(
c)
from e, it must addw(
c)
to d(
f)
(i.e., the deduction value of f ).The purpose of the depth-first-search is to ensure that all the deduction values are kept on the same path of the subtree that the request is traversing to the hub. Otherwise, one part of the tree may not be aware of the value of a deduction in another part of the tree, and the decision about whether or not a tree node is heavy could be incorrect.
Fig. 6. An execution scenario of the lazy update.
Next, we analyze the time complexity of lazy update, especially the deduction component. As each node can only be removed once,
the cost of removal is bounded by O
(
n)
, where n is the numberof tree nodes. When a replica is placed on a critical node c, the ancestors of c could be updated in three ways.. First, an ancestor
could be removed, since, after deducting
w(
c)
, it becomes a lightnode (i.e., nodes g and h in Fig. 6). Second, an ancestor could
become a critical node (node e) after
w(
c)
is deducted from itsworkload. Third, an ancestor could add
w(
c)
to its deduction value. Because an ancestor can only be removed once, the total cost of the first kind of lazy update is bounded by O(
n)
. Also, each replica that is placed will incur the second and third kinds of update once, so their total cost is bounded by O(
k)
.We now analyze the cost of selecting the critical node with the maximum workload among its siblings. It is easy to see that there can be at most k such selections because we can only pick at most k replicas. For every internal node, we need to maintain the relative order among its children according to their workload. Once the workload of any child is changed (e.g., due to a replica placed in its subtree), the relative order needs to be recomputed. As a result, we need a data structure that supports fast insertion/deletion, and selection of the maximum workload. Clearly, we only need to keep the k largest children of every internal node, since we have at most k replicas. Therefore, we do not need to keep track of all the children; the k largest children will be sufficient. We achieve this goal with a sorted list containing at most k elements. The overall list maintenance time is bounded by O
(
k log k)
.Initially the sorted list contains the k largest children of every parent. Whenever we need to place a replica on the heaviest child
(denoted by c inFig. 6) of a parent node h, we check if h remains
heavy. If it does, we remove c from the list of h, and finish in O
(
1)
time. If h becomes light, we remove h and start moving up theFig. 7. The pseudo code of the LazyUpdate algorithm forFindR.
tree until we reach a critical ancestor e. Now we must update the workload of e, and find a new position for e in the sorted list of children of f , where f is the parent of e (Fig. 6). It takes O
(
log k)
time to insert the new updated child into the sorted list, since the list has at most k elements. Recall that the overall list maintenance time is bounded by O(
k log k)
, as there are at most k replicas to place and we make at most one insertion for every replica placed.The only remaining question is: How can we initialize the sorted list for every internal node? If the value of k is small, we simply choose the k largest children of every parent repeatedly, with a total time of O
(
kn)
. If the value of k is large, we sort all tree nodes with the parent as the primary key, and the workload as the secondary key. Each parent will then be aware of its k largest children; therefore, the initialization cost is O(
min(
kn,
n log n))
.Finally, we aggregate all the costs. The time taken to initialize the sorted list is O
(
min(
nk,
n log n))
, the time required to maintain the sorted lists is O(
k log k)
, and the time for tree traversal andupdating the workload is O
(
n)
. The total time is bounded byO
(
min(
nk,
n log n) +
k log k+
n) =
O(
n log n)
since k≤
n.Theorem 1. The
LazyUpdate
algorithm finds the optimal replica set forFindR
in O(
n log n)
time, where n is the number of tree nodes in the data grid (Fig. 7).4.3.
MinMaxLoad
With the
LazyUpdate
algorithm in place, we are ready toderive an algorithm called
BinSearch
for theMinMaxLoad
problem, which can be stated as follows. Given a grid tree, the workload on its leaves, and a constant k, find a subset of tree nodes R with cardinality no more than k in which to place the replica so that the maximum workload on every replica in R and on the hub is minimized.
The
BinSearch
algorithm finds the replica set by ‘‘guessing’’ the maximum workload through a binary search. We guess a value D as the maximum workload on the replica and the hub.If the
LazyUpdate
algorithm can not find a feasible replica setfor this D, we increase the value of D; otherwise, we reduce it. We assume that all the workloads are integers and there is an upper bound U on the workload of every node; therefore, the total
workload is bounded by O
(
nU)
. Clearly, after O(
log n+
log U)
calls ofLazyUpdate
, we will be able to find the smallest value of D such that k replicas are sufficient.Next, we analyze the time complexity of
BinSearch
. Note thatin
LazyUpdate
, we need an initialization phase that computes a sorted list of children for every parent. This task is onlyperformed once in
BinSearch
, since the tree is the samethroughout the binary search. Each iteration of
LazyUpdate
takesO
(
k log k+
n)
time, but the total cost ofBinSearch
is bounded by O(
min(
nk,
n log n)+(
log n+
log U)(
k log k+
n))
. In a grid system, the number of replicas, k, is usually bounded by a small constant, so it is very expensive to duplicate data; therefore, we assume that k is bounded by O(
log nn)
. In addition, the bound on the workload, U, is usually represented by a 32-bit integer. To summarize, the total execution time becomes O(
n log n)
when k is bounded by O(
log nn)
.Theorem 2. The
BinSearch
algorithm finds the optimal replica set forMinMaxLoad
in O(
n(
log n+
log U))
time, where n is the number of tree nodes in the data grid, U is the maximum workload on the leaves, and the number of replicas is O(
log nn)
. If there is a constant bound on U , the cost is O(
n log n)
.5. The constrained model
The constrained model is similar to the unconstrained model, except that each request has a range limit, which serves as a locality assurance. This means a request must be served by a replica, or the hub, within a fixed number of hops towards the root. For example, inFig. 8, if a user at node a were to specify a range limit of 2 or more, he/she would be able to access the data at node c. If the range limit from a were 1 instead, the request would fail, since a server could not be placed at either a or b. Formally, we define that a request can reach a server if the number of communication links between it and the nearest replica on the path to the hub is no more than its range limit.
The added range constraint complicates our goal of developing an efficient replica placement strategy. We must now determine where to place a given number of replicas so that the amount of data a replica server has to handle is minimized, under the
Fig. 8. A data grid tree T .
constraint that all requests can find a replica within their specified range limits. Similarly, if we fix the total workload a replica server can handle, then we need to decide the minimum number of replicas and the best locations to place them.
Next, we formally define the goals of our replica placement
strategy. Let
v
be a leaf in a data grid tree; thenw(v)
is theworkload of
v
, and l(v)
is its range limit. For ease of explanation, we only allow the leaves to issue data requests. However, it is trivial to generalize the results of this paper to cases where the internal nodes can also issue data requests.Let R be a subset of V , and let a replica be placed on each node of R. Based on the data grid access model described earlier,
we define the server of each leaf
v
as the first node in R thatv
encounters when its request travels up towards the root of T . This
server node is denoted by sR
(v)
. The workload on a tree nodev
isdefined as the sum of the data requests for which
v
is the server,i.e.,
w
R(v) = P
sR(l)=vw(
l)
. However, if the distance between aleaf
v
and its server sR(v)
is greater than its range limit l(v)
, the workload of the server is set to infinity.From the definitions above, we can define that a replica set R is range feasible if and only if none of the tree nodes has an infinite workload, i.e., every request can reach a server (or the hub) within its range limit. In addition, let the maximum workload induced by R be the maximum workload on all nodes of R and the hub. We include the hub because any data requests not serviced by R will be serviced by the hub. A replica set R is workload W feasible if and only if the maximum workload of the tree nodes in R is no more than W . Note that this definition implies that a workload W feasible replica set is also range feasible.
Our objective is to solve the two problems,
MinMaxLoad
andFindR
, in this constrained model.6. Algorithms for the constrained model
We now describe the algorithms used to solve
MinMaxLoad
and
FindR
. Similar to the case in the unconstrained model, wewill solve
FindR
first, and then use that algorithm to solveMinMaxLoad
. 6.1.FindR
The
FindR
problem can be stated as follows. Given a data grid tree T , the workload and the range limit on its leaves, and the maximum workload W , find a workload W feasible replicaset R with minimum cardinality. We use m
(
T,
W)
to denote thisminimum cardinality. We also define that a replica set R is optimal for T and workload W if R is workload W feasible, (with only
m
(
T,
W)
replicas), and it minimizes the workload on the hub.Fig. 9. The contribution function.
Hereafter, we do not use ‘‘for workload W ’’ when the context clearly indicates the workload bound.
The complication introduced by the range limit can be easily
understood by the fact thatLemma 1is not valid in the constrained
model. In the unconstrained model, we can determine where to
put a replica by a greedy method, sinceLemma 1guarantees that
it is always safe to select the heaviest request. However, in the constrained model there is a conflict between the workload and the range limit. If the heaviest request has a large range limit, choosing the second heaviest request that has a smaller range limit may be the best solution, since it can travel further up the tree to find a replica.
6.1.1. Contribution function
We first define several terminologies. Consider a data grid tree T with r as the root. Let
v
be a node in T , t(v)
be the subtree rooted atv
, and t0(v) =
t(v) − v
, i.e., the forest of subtrees rooted atv
’s children. Also, let a(v,
i)
denote the i-th ancestor of nodev
while it is traveling toward the root of T .We now define a contribution function C . C
(v,
i)
indicates theminimum workload on node a
(v,
i)
contributed by t(v)
, by placingm
(
t(v),
W)
replicas in t0(v)
and none on a(v,
j)
for 0≤
j≤
i. Bydefinition C
(v,
0)
is the workload on a nodev
due to an optimalreplica set for t
(v)
. Note that if there is no replica set for t(v)
with cardinality m(
t(v),
W)
that could control the workload on a(v,
i)
within W , then C(v,
i)
is set to infinity; for example, ifv
is a leaf, C(v,
i)
isw(v)
when i≤
l(v)
, and infinity when i>
l(v)
.Fig. 9illustrates an example of the C function. The optimal replica set requires three replicas for T when the workload W is 60, i.e., m
(
t(
r),
60) =
3. The replicas should be placed at leaves a, b, and c to minimize the workload on r to C(
r,
0) =
35. However,if we try to minimize the workload on s
=
a(
r,
1)
by placingjust three servers, we can only achieve C
(
r,
1) =
55 by placingreplicas at nodes a, b, and e. We need to place a replica on node e, since its range limit is only 1. Now, with regard to the workload on t
=
a(
r,
2)
, as we can not limit the workload to 60 by placing only three replicas in t0(
r)
, C(
r,
2)
is set to infinity. The infinity means that there is no way we can place only three replicas among a, b, c, d and e so that all the range requirements are fulfilled and the workload reaching t is bounded by 60.6.1.2. Bottom-up computation
Here, we describe a bottom-up process for computing the C and m functions for every node in a data grid tree. By definition, if
v
isFig. 10. An illustration on how to construct a new global optimal solution from a global optimal solution that places m(t(v),W) +1 replicas in t0(v)
and a local optimal solution that places m(t(v),W)in t0(v)
. We assume that m(t(v),W)is 2.
a leaf, C
(v,
i)
isw(v)
when i≤
l(v)
, and infinity otherwise. Now we want to compute the C and m functions for an internal nodev
that has childrenv
1, . . . , v
n. Since the process is bottom-up, we assume that all the C and m functions ofv
1, . . . , v
nare known. The following theorem establishes the relation between the optimal replica sets for a tree and any of its subtrees.Theorem 3. Consider a data grid tree T , a node
v
in T , and a workload W . There exists an optimal replica set R for T with workload limit W so that|
R∩
t0(v)| =
m(
t(v),
W)
Proof. By definition, t
(v)
requires at least m(
t(v),
W)
replicas tobe placed in t0
(v)
to ensure that the workload onv
is within W .As a result, there does not exist an optimal replica set R for T that could place less than m
(
t(v),
W)
replicas in t0(v)
.Now, if an optimal replica set for T places more than m
(
t(v),
W)
replicas in t0(v)
, it places at least m(
t(v),
W) +
1 replicas. In such a case, when we construct an optimal replica set for T , we simply place m(
t(v),
W)
replicas according to an optimal replica set for t(v)
, and place one extra replica onv
. The resulting new replica set for T does not increase the workload; therefore, it is also an optimalsolution for T .
Consider the example inFig. 10. We assume that m
(
t(v),
W)
is 2, which means that we can place only two replicas in t0
(v)
tosatisfy all the range and capacity requirements in t
(v)
, as shown inFig. 10(b). If a global optimal solution places three replica in t0
(v)
as inFig. 10(a), we can then place two replica as suggested by the
local optimal solution for t0
(v)
, then place the remaining replicaat
v
. This new placement (Fig. 10(c)) is also an global optimalsolution because it uses the same number of replica as in the
original placement (Fig. 10(a)), and can satisfy all the range and
capacity requirements.
Theorem 3suggests that for a node
v
with childrenv
1, . . . , v
n, there exists an optimal replica set R with workload limit W such that|
R∩
t0(v
j
)| =
m(
t(v
j),
W)
for 1≤
j≤
n. As a result, tofind the optimal replica set for t
(v)
, we need to place sufficientreplicas on
v
j’s nodes such that the sum of their C(v
j,
1)
is at leastP
1≤j≤nC
(v
j,
1)−
W . This can be easily done by repeatedly placing a replica on the remainingv
jthat has the largest C(v
j,
1)
until the workload ofv
is within W . Let this set ofv
j’s be e(v,
0)
, thechildren of
v
, each of which must be assigned a replica to minimizethe workload on a
(v,
0) = v
. We now have m(
t(v),
W) =
P
1≤j≤nm
(
t(v
j),
W) + |
e(v,
0)|
, and C(v,
0) = P
vj6∈e(v,0)C(v
j,
1)
.After determining m
(v,
W)
, we want to compute C(v,
i)
fori
>
0.Theorem 4. Consider a data grid tree T , a node
v
in T with childrenv
1, . . . , v
n, and a workload W . There exists a replica set R so that|
R| =
m(
T,
W)
, R minimizes the total workload induced by R from t0(v)
on a(v,
i)
for i≥
1, and|
R∩
t0(v
j
)| =
m(
t(v
j),
W)
.Fig. 11. The computation of contribution function C(v,i)for i>0.
Proof. Th proof is similar to that ofTheorem 3. ConsiderFig. 11. First,
|
R∩
t0(v
j
)|
could not possibly be less than m(
t(v
j),
W)
;otherwise, the workload on
v
jwould already be greater than W .If R has more than m
(
t(v
j),
W)
replicas in t0(v
j)
, we can only placem
(
t(v
j),
W)
according to any optimal replica set for t(
ri)
, and place one replica onv
j. The resulting replica set would not increase the workload of a(v,
i)
.An important implication of Theorem 4 is that when we
compute C
(v,
i)
for i>
0, we can be certain that there exists a set of replicas that can minimize the total workload on a(v,
i)
witha known number of replicas in each t0
(v
j
)
(i.e., m(
t(v
j),
W)
). Bydefinition, C
(v,
i)
is the the minimum workload on the ancestora
(v,
i)
contributed by t(v)
by placing m(
t(v),
W)
replicas in t0(v)
, and none at a(v,
j)
for 0≤
j<
i (seeFig. 11for an illustration).Since we know the number of replicas in each t0
(v
j
)
, we knowthere exists an R that can minimize the total workload a
(v,
i)
byplacing extra m
(
t(
r),
W) − P
1≤j≤nm(v
j,
W)
replicas among ri. Now, it is clear that by choosing m(
t(
r),
W) − P
1≤j≤nm(v
j) v
j’s that have the largest C(v,
i+
1)
(denoted as e(v,
i)
), we can derive C(v,
i) = P
vj6∈e(v,i)C
(v
j,
i+
1)
. 6.1.3. Top-down replica placementWe now place replicas from the top to the bottom of the tree recursively. Consider a node
v
with n childrenv
1, . . . , v
n. Our goal is to place replicas such that the workload on a(v,
i)
is minimized by placing m(v,
W)
replicas in t0(v)
; therefore, our recursion startsfrom the root with i
=
0. From the discussion in Section6.1.2, weknow we can accomplish this by placing replicas in e
(v,
i)
— thesubset of
{
v
1, . . . , v
n}
, each of which has to be assigned a replica in order to minimize the workload on a(v,
i)
.We consider two cases. In the first, we consider a set of
v
j’s inFig. 12. An example of top down replica placement. A shaded tree node indicates a replica. the recursion from each node of A with i set to 0, since we know
that every node in e
(v,
i)
now has a replica. In the second case, we consider the set ofv
j’s that are not in e(v,
i)
. FromTheorem 4, we know that if we want to minimize their contribution to a(v,
i)
, we just need to focus on those replica sets that have m(v
j,
W)
replicas in t0(v
j)
. In addition, we know we can assume that there will be no replica in anyv
0j. As a result, we simply retrieve e
(v
j,
i+
1)
— the subset ofv
j’s children that should be assigned an extra replica to minimize the workload of a(v ,
i)
.Consider the example in Fig. 12. The recursion starts at a
with i
=
0. Suppose we need to place replicas on b and c,which have already been determined from the previous
bottom-up computation for contribution function C
(
a,
0)
. Now we onlyneed to recursively perform the top-down replica placement at the children of b and c, namely f , g, h, and i. After placing the replicas on nodes b and c, we know that replicas will not be placed at d and e. Now consider the three subtrees of d. We know there exists a replica set that can minimize the contribution to a, with m
(
j,
W)
replicas in t0(
j)
, m(
k,
W)
replicas in t0(
k)
, and m(
l,
W)
replicas in t0(
l)
. We also know that this replica set has no replica in d. As a result, we simply retrieve e(
d,
1)
— the subset of{
j,
k,
l}
that should be assigned an extra replica to minimize the workload of a. Suppose the set e(
d,
1)
contains j and k, each of them will be assigned a replica. The recursion will start at the children of j and k with i set to 0, and then at l with i set to 2, to reflect the fact that the workload within l will contribute to a, which is located two hops above.We call this replica-placement algorithm the PlaceReplica. 6.1.4. Time complexity analysis
We analyze the time complexity of PlaceReplica by focusing on the bottom-up computation of the C function, since it dominates
the total computation time. For each tree node
v
, we need tocompute its C
(v,
i)
up to i=
L, where L is the maximum rangelimit of all the nodes. Let the number of children of
v
be n then,the computation requires n log n, if we sort the C function values of all of
v
’s children. Note that this requires the values to be sorted L times since a child,v
j, with a larger C(v
j,
i)
function value than another child,v
k, does not mean thatv
jwill have a larger C function value thanv
kfor other values of i. As a result, the computation cost of C forv
is Ln log n. The total cost of computing the C functions of all nodes is therefore LN log N, where N is the number of nodes in the tree.6.2.
MinMaxLoad
We now derive the
BinSearch
algorithm for theMinMaxLoad
problem.
BinSearch
finds the replica set by ‘‘guessing’’ themax-imum workload W with a binary search, as in the unconstrained model. Let U be the workload upper bound for every leaf such that
Fig. 13. An example replica set selected byAffinityR, which are shaded in this
figure. The numbers next to the replicas represent the order the replicas are added.
the total workload is bounded by O
(
NU)
. It is easy to see that after O(
log N+
log U)
BinSearch calls, we can find the smallest value of W such that k replicas are sufficient. The total execution time of Bin-Search is therefore O(
log N+
log U)(
LN log N)
. Because the bound on the workload U is usually represented by a 32-bit integer, the total execution time can be bounded by O(
LN log2N)
.Theorem 5. The
BinSearch
algorithm finds the optimal replica set forMinMaxLoad
in O(
log N+
log U)(
LN log N)
time, where N is the number of tree nodes in the data grid, L is the maximum range limit. and U is the maximum workload. When U is a bounded constant, the time complexity is O(
LN log2N)
.7. Experiment results
In this section, we evaluate our
FindR
algorithm andMin-MaxLoad
algorithm through extensive simulation experiments. 7.1. Heuristics for the constrained modelThis section describes two heuristics for the MinMaxLoad and FindR problems in the constrained model. We will compare these two heuristic with our optimal algorithm by experiments, in terms of number of replicas required, and the actual data transmission performance.
7.1.1. Affinity replica location with range constraint
We would like to compare our algorithm with existing
heuris-tics. Abawajy proposed a heuristic called
Affinity Replica
Lo-cation Policy
in [1] for the MinMaxLoad problem, which places replicas ‘‘on or near the nodes where the file issues the mostFig. 14. An example replica set selected byMaxR, which are shaded in this figure. The numbers next to the replicas represent the order the replicas are added.
constraints, we have to adjust the affinity replica location policy
for the constrained model, and refer to it as
AffinityR
.AffinityR
is a greedy method that runs k iterations, where k is the given number of replicas. In each iteration we locate the node that serves the maximum amount of workload, under the condition that none of its descendents has a server, and none of them will miss the range constraint. Note that we may place a replica into a subtree whose root already has a replica. Let V be the the set of the tree nodes and k be the number of replicas. The pseudo code ofAffinityR
is as follows.•
Step 1: Let R be an empty set.•
Step 2: Repeat the following two steps for k iterations.•
Step 3: Find the set A such that every node a∈
A does not havea replica, and if a has a replica, every node in the subtree rooted at node a can find a replica within its range constraint.
•
Step 4: Find the node p in A that has the maximum workload.Place a replica at node p and add node p into R.
To find the minimum number of replicas required under a given capacity (the FindR problem), we change the iteration control of
AffinityR
as follows. We repeat step 2 and 3 until the placement R becomes range feasible and workload W feasible, where W is the given replica capacity. In other words, the iteration ends when each node finds a replica satisfying its range constraint the workload of each replica is no more than the given W .We illustrate how
AffinityR
solves the FindR problem usingthe tree inFig. 13as an example. Each leaf in this tree will issue
a request, the range constraint of every node is 2, and the replica capacity is set to 3. Initially, only the root has the data, and node a, b, c, and d are the candidates for replica. Since a has maximum workload 4 the first replica is placed. The second replica is placed at c because it now has the maximum workload 3. Finally, node d has
the maximum workload 3, and is placed a replica.
AffinityR
endsafter we placed three replica at a, d, and c, since now the workload of every replica does not exceed the given workload 3, and every node can find a replica within its range constraint.
7.1.2.
Maximum workload first with range constraint
We propose another heuristic that also based on the ‘‘maximum workload first’’ idea from the affinity replica location, with the addition of range constraint. We refer to this greedy heuristic
as
MaxR
. For each iterationMaxR
finds the node that has themaximum workload among those ‘‘qualified’’ nodes. A node is ‘‘qualified’’ if none of it ancestor has a replica, none of its descendents will miss the range constraint if it has a replica, and the sum of workload of these descendents is no more than the given capacity W . We repeatedly selecting the qualified node
with the maximum workload until every client has a replica that satisfies its range constraint, i.e., the replica set is both range feasible and workload W feasible. Assuming that V is the the set of the sites and W is the given capacity of replica, the pseudo code of
MaxR
is as follow.•
Step 1: Let R be an empty set.•
Step 2: Repeat the following two steps until the placement Rbecomes rang feasible and workload W feasible.
•
Step 3: Find the set A such that A is a subset of(
V−
R)
, and if a∈
A has a replica, every node in the subtree rooted at a can find a replica satisfying its range constraint, and the workload of a is no more than W .•
Step 4: Find the node p in A that has the maximum workload.Place a replica at p and add p into R.
Consider the example inFig. 14, in which every leaf issues one
request, the range constraint of every node is 2, and the replica capacity is 3. Initially only root has the data. Since d is the node that has the maximum workload not larger than the capacity constraint 3,
MaxR
will first place a replica at d. We do not consider node a because its workload is 4. The second replica is placed at node c because it also has the maximum workload 3. After two replicas are placed, the workload of all replicas is bounded by the given capacity and every node can find a replica within its range constraint, soMaxR
reports c and d as the replica set.We derive a similar binary search algorithm for the MinMaxLoad problem, just as we did for our optimal algorithm. The binary search finds the replica set by ‘‘guessing’’ the maximum workload W . Let U be the workload upper bound for every leaf and the total workload is bounded by O
(
NU)
. After O(
log N+
log U)
calls toMaxR
, we can find an appropriate W such that k replicas are sufficientfor the heuristic
MaxR
. Note that sinceMaxR
is not our optimalalgorithm for the FindR problem, the capacity
MaxR
finds is notguaranteed to be the minimum possible. 7.2. Experiment setting
In all the experiments, we fix the request size at 100 MB and the total number of tree nodes at 200. The number of clients is equal to the number of leaf nodes. In total, 20 000 data requests are generated by the clients. The number of data requests issued by a client follows a normal distribution. The clients are classified into two groups: the heavy clients and the light clients. With fixed total number of data requests, by changing the ratio between the number of heavy clients and the number of light clients, we can generate various kinds of data traffic, ranging from uniform, less uniform, to very hot-spotted.
Furthermore, each client can specify a QoS requirement in terms of range constraint. The distribution of range constraint among clients also follows a normal distribution. We also investigate the impact of tree topology on replica placement. We use a skew factor in the generation of tree structures. A large skew factor implies the tree is badly balanced.
We compare our
FindR
andMinMaxLoad
algorithms withtwo heuristic algorithms: the Affinity Replica Location with Range
Constraint (
AffinityR
) algorithm and the Maximum WorkloadPlacement with Range Constraint (
MaxR
) algorithm.Specifically, we investigate the impact of the following factors on the performance of the above-mentioned algorithms: the number of replica servers (denoted as NRS), the capacity of a replica server (denoted as CRS), the mean of data request distribution on the client (denoted as MDR), the mean of range constraint (denoted as MRC), the variance of range constraint
(a) VRC=1.00, MRC=8.29, PHC=30, and TSF=0.50. (b) VRC=1.00, MRC=8.29, PHC=30, and TSF=0.80.
(c) VRC=1.00, MRC=8.29, PHC=60, and TSF=0.50. (d) VRC=1.00, MRC=8.29, PHC=60, and TSF=0.80.
(e) VRC=1.25, MRC=8.29, PHC=30, and TSF=0.50. (f) VRC=1.25, MRC=8.29, PHC=30, and TSF=0.80.
(g) VRC=1.25, MRC=8.29, PHC=60, and TSF=0.50. (h) VRC=1.25, MRC=8.29, PHC=60, and TSF=0.80.
Fig. 15. Effect of the capacity of replica servers.
(denoted as VRC), the percentage of heavy clients (denoted as PHC), and the tree skew factor (denoted as TSF).
7.3. Results for FindR
This section presents experiment results for
FindR
: given theamount of data D that a replica can service (server capacity), find
the subset R with minimum cardinality such that the maximum workload is not greater than D.
7.3.1. Effect of server capacity
In this set of experiments, we investigate the effect of server capacity on the number of replicas. We fix the values of VRC, MRC,
(a) CRS=1500, VRC=1.00, MRC=6.57, and TSF=0.50. (b) CRS=1500, VRC=1.00, MRC=6.57, and TSF=0.80.
(c) CRS=1500, VRC=1.25, MRC=6.57, and TSF=0.50. (d) CRS=1500, VRC=1.25, MRC=6.57, and TSF=0.80.
(e) CRS=4500, VRC=1.00, MRC=6.57, and TSF=0.50. (f) CRS=4500, VRC=1.00, MRC=6.57, and TSF=0.80.
(g) CRS=4500, VRC=1.25, MRC=6.57, and TSF=0.50. (h) CRS=4500, VRC=1.25, MRC=6.57, and TSF=0.80.
Fig. 16. Effect of percentage of heavy clients. number of replicas decreases with the increase of server capacity.
FindR
achieves the least number of replicas among the three algorithms.7.3.2. Effect of percentage of heavy clients
In this set of experiments, we fix the values of CRS, VRC, MRC and TSF and vary the value of PHC. Note that a large PHC value implies a more evenly distributed workload among the clients.
Conversely, a small PHC value indicates that the workload is badly balanced, which leads to the development of hot spots.
As shown inFig. 16,
FindR
consistently finds the minimumnumbers of replicas under all PHC values.Fig. 16(a) and (b) and
Fig. 16(e) and (f) show that
AffinityR
andMaxR
require morereplicas when the tree is badly balanced (tree skew factor TSF
=
0
.
8).Fig. 16(e) and (g) andFig. 16(f) and (h) show thatAffinityR
and
MaxR
require more replicas when the range constraint is more(a) CRS=1500, VRC=1.00, PHC=30, and TSF=0.50. (b) CRS=1500, VRC=1.00, PHC=30, and TSF=0.80.
(c) CRS=1500, VRC=1.00, PHC=60, and TSF=0.50. (d) CRS=1500, VRC=1.00, PHC=60, and TSF=0.80.
(e) CRS=4500, VRC=1.00, PHC=30, and TSF=0.50. (f) CRS=4500, VRC=1.00, PHC=30, and TSF=0.80.
(g) CRS=4500, VRC=1.00, PHC=60, and TSF=0.50. (h) CRS=4500, VRC=1.00, PHC=60, and TSF=0.80.
Fig. 17. Effect of the mean of range constraint.
7.3.3. Effect of the mean of range constraint
In this set of experiments, we fix the values of CRS, VRC, PHC and TSF and vary the value of MRC. Note that a smaller MRC value implies more restricted range constraint, while a larger
value indicates less restricted constraint.Fig. 17shows that
FindR
consistently finds the minimum numbers of replicas under all MRC
values. The number of replicas required by
AffinityR
andMaxR
is large when the value of MRC is small.
7.3.4. Effect of the variance of range constraint
In this set of experiments, we fix the values of CRS, MRC, PHC and TSF and vary the value of VRC. Note that a smaller VRC value allows larger range limit, while a larger value indicates smaller range limit.
Fig. 18 shows that
FindR
consistently finds the minimumnumbers of replicas.Fig. 18(a), (b), (c) and (d) show that when
server capacity is small
(
CRS=
1500)
, regardless the range(a) CRS=1500, MRC=8.29, PHC=30, and TSF=0.50. (b) CRS=1500, MRC=8.29, PHC=30, and TSF=0.80.
(c) CRS=1500, MRC=8.29, PHC=60, and TSF=0.50. (d) CRS=1500, MRC=8.29, PHC=60, and TSF=0.80.
(e) CRS=4500, MRC=8.29, PHC=30, and TSF=0.50. (f) CRS=4500, MRC=8.29, PHC=30, and TSF=0.80.
(g) CRS=4500, MRC=8.29, PHC=60, and TSF=0.50. (h) CRS=4500, MRC=8.29, PHC=60, and TSF=0.80.
Fig. 18. Effect of the variance of range constraint. replicas.Fig. 18(e), (f), (g) and (h) show that when server capacity
is large
(
CRS=
4500)
, both heuristic algorithms perform prettywell when the variance of range constraint is small. When the variance is large, the numbers of replicas required by both heuristic algorithms increase rapidly.
7.3.5. Effect of the tree skew factor
In this set of experiments, we fix the values of CRS, MRC, PHC and VRC and vary the value of TSF. Note that a smaller TSF value
implies balanced tree, while a larger value indicates that the tree is badly balanced.
Fig. 19 shows that
FindR
consistently finds the minimumnumber of replicas.Fig. 19(a), (b), (c) and (d) show that when
the server capacity (CRS value) is small, both heuristic algorithms consistently require more replicas (40–55).Fig. 19(e), (f), (g) and (h) show that when the server capacity is large, the heuristic algorithms require more replicas when the tree is badly balanced (large TSF value).
(a) CRS=1500, VRC=1.00, MRC=6.57, and PHC=30. (b) CRS=1500, VRC=1.00, MRC=6.57, and PHC=60.
(c) CRS=1500, VRC=1.00, MRC=8.29, and PHC=30. (d) CRS=1500, VRC=1.00, MRC=8.29, and PHC=60.
(e) CRS=4500, VRC=1.00, MRC=6.57, and PHC=30. (f) CRS=4500, VRC=1.00, MRC=6.57, and PHC=60.
(g) CRS=4500, VRC=1.00, MRC=8.29, and PHC=30. (h) CRS=4500, VRC=1.00, MRC=8.29, and PHC=60.
Fig. 19. Effect of the tree skew factor.
7.4. Results for MinMaxLoad
This section presents experiment results for
MinMaxLoad
:given the number of replicas k, find a subset of tree nodes R with cardinality k that minimizes the maximum workload. We show two results for each set of experiments. The first part ((a), (b), (c) and (d)) compares the makespan of total data transfer, and
the second part ((e), (f), (g) and (h)) compares the percentage of successfully finding a feasible replica placement.
7.4.1. Effect of number of replica servers
In this set of experiments, we vary the value of NRS and
fix the values of the other variables. Fig. 20 shows that the
(a) VRC=1.00, MRC=6.57, PHC=60, and TSF=0.50. (b) VRC=1.00, MRC=6.57, PHC=60, and TSF=0.80.
(c) VRC=1.00, MRC=8.29, PHC=60, and TSF=0.50. (d) VRC=1.00, MRC=8.29, PHC=60, and TSF=0.80.
(e) VRC=1.00, MRC=6.57, PHC=60, and 0.50. (f) VRC=1.00, MRC=6.57, PHC=60, and 0.80.
(g) VRC=1.00, MRC=8.29, PHC=60, and 0.50. (h) VRC=1.00, MRC=8.29, PHC=60, and 0.80.
Fig. 20. Effect of number of replica servers.
the percentage of feasible placement increases with the number
of replicas until reaching 100%.
MinMaxLoad
achieves the shortestmakespan and highest percentage of feasible placement among
the three algorithmsFig. 20(b), (d), (f) and (g) show that more
restricted range constraint
(
MRC=
6.
57)
results in longermakespan and lower percentage of feasible placement, while less
restricted range constraint
(
MRC=
8.
29)
results in shortermakespan and higher percentage of feasible placement.Fig. 20(a),
(b), (e) and (f) show that badly balanced tree
(
TSF=
0.
80)
results in longer makespan and lower percentage of feasible placement. 7.4.2. Effect of the mean of range constraintIn this set of experiments, we vary the value of MRC and fix
(a) NRS=12, VRC=1.00, PHC=60, and TSF=0.50. (b) NRS=12, VRC=1.00, PHC=60, and TSF=0.80.
(c) NRS=12, VRC=1.25, PHC=60, and TSF=0.50. (d) NRS=12, VRC=1.25, PHC=60, and TSF=0.80.
(e) NRS=12, VRC=1.00, PHC=60, and 0.50. (f) NRS=12, VRC=1.00, PHC=60, and 0.80.
(g) NRS=12, VRC=1.25, PHC=60, and 0.50. (h) NRS=12, VRC=1.25, PHC=60, and 0.80.
Fig. 21. Effect of mean range constraint.
of makespan is small under different range constraint. For very
restricted range constraint (MRC
=
4, 5), bothAffinityR
andMaxR
fail to find feasible placement, whileMinMaxLoad
has 10%success rate in finding a feasible placement.
MinMaxLoad
achievesthe shortest makespan and the highest percentage of feasible
placement. The makespan of
MinMaxLoad
at small MRC value islonger because when the range constraint is very restricted, some of the replica servers may become heavy loaded.
7.4.3. Effect of the variance of range constraint
In this set of experiments, we vary the value of VRC and fix the values of the other variables.Fig. 22(e), (f), (g) and (h) show that