An Optimized Replica Distribution Method in Cloud Storage System

Aiming at establishing a shared storage environment, cloud storage systems are typical applications of cloud computing.Therefore, data replication technology has become a key research issue in storage systems. Considering the performance of data access and balancing the relationship between replica consistency maintenance costs and the performance of multiple replicas access, the methods of replica catalog design and the information acquisition method are proposed. Moreover, the deputy catalog acquisition method to design and copy the information is given. Then, the nodes with the global replica of the information replicate data resources, which have the high access frequency and the long response time. Afterwards, the Markov chain model is constructed. And a matrix geometric solution is used to export the steady-state solution of the model. The performance parameters in terms of the average response time, finish time, and the replica frequency are given to optimize the number of replicas in the storage system. Finally, numerical results with analysis are proposed to demonstrate the influence of the above parameters on the system performance.


Introduction
Now, in order to further improve data availability in cloud storage systems, data replication technology has become a hot popular topic.Especially in the current commercial cloud system, typical examples include Amazon S3 (Amazon Simple Storage Service) [1], Google File System (GFS) [2], and Hadoop Distribution File System (HDFS) [3].HDFS and GFS are based on centralized storage directory.Amazon S3 uses consistent hashing distribution strategy based on replicating.
In terms of dynamic replication policy, Sahi and Dhaka [4] presented a replica algorithm on predicting the workload of cloud service about the Neural Network; Bao [5] developed a replication mechanism to solve replica dynamic adjustment problems.Ooi et al. [6] proposed a dynamic data replication strategy according to access records.Therefore, researchers discussed replication distribution optimization problem.In literature [7], Ghilavizadeh et al. proposed a dynamic replication optimal distribution strategy.It reduced the total task execution time and improved the accessibility.
At the base of the dynamic replication mechanisms mentioned above, literatures [8][9][10] optimized load balance in the storage system.An optimized strategy was proposed in literature [11] for load balance.In literatures [12,13], there were optimized or elastic methods that enabled the capabilities of VMs (Virtual Machines) to be scaled to encompass the dynamically changing resource demand of the aggregated virtual services.As we all know, data reliability is one of the indexes for evaluating the merits of a storage system performance.Mansouri [14] introduced a prediction algorithm for load prediction based on time sequence.In literature [15], researchers computed the performance in terms of the resource priority and storage space.They constructed a reliability analysis model and applied it to the current cloud storage system.In order to increase availability, fault tolerance, and load balancing, the impact of data grid architecture on dynamic replication performance is investigated in literature [16].Ajitabh and Ritu [17] introduced a new approach as a fault tolerance and flexible policy.
Researches above focused on the distribution of a replica and data reliability.But they did not take the impact of the number of replicas on the cloud storage system performance into account.In cloud storage system, the more replicas there are, the more nodes in response to users' request data will be.However, if there are more replicas, network bandwidth and resource consumption will be greater in cloud computing center.
In this paper, considering both the data availability and the average access latency, a replica catalog and replica information obtained method is designed as the basis for placing the replica.Moreover, we construct Markov chain [18][19][20] to evaluate the number of replicas.By introducing the concept of replication factor, we give the formulas for computing the appropriate location to place the replica.We propose a policy on how to update and delete replica based on the above analysis.Finally, we investigate the system performance.

Replica Directory Structure Based on Domain
The data center is described as a hierarchical structure, shown in Figure 1.Nearby data nodes in the system are connected by a domain node forming a domain.Each domain has a domain head-node.The domain head-node is responsible for managing information of other nodes in the domain and all information of replica in the domain.Meanwhile, it periodically performs replica distribution algorithm.Nonhead-nodes manage their own data, such as catalog of access file, and regular exchange of information between head-node and non-head-node.
Definition 1.All shared resources, including file, database, and data tables, can be expressed as logical resources.Each logical resource with a globally unique logical resource identifier is denoted as LR.
Definition 2. Each logical resource can have one or more replicas.Each replica has a globally unique physical replica of identifier, denoted as PR.The first registration resource is called the original replica.
The set of all the replicas of logical resource is denoted as LR = { 1 ,  2 , . . .,   }.A node with physical replica is denoted as ; the set of these nodes is { 1 ,  2 , . . .,   }, where  is the number of replicas.
The same replica of the same logical resource has the same identifier but different physical identifiers.Each node in the network maintains a local replica catalog.
When a node registers a shared resource, the data management manages the LR and assigns PR.
To dynamical replica the management service assigns PR and maps this PR with LR.Replica management records the original replica information of this logical resource, while servicing the replica information into the replica database of the original replica.
We design a replica catalog structure based on twodirection structure.One of the catalogs is the structure between the replica catalog of logical resource and the node with its replicas.Another structure is the replica and its replica catalog of logical resource.From the first structure, we can get the specific access situation.From the second structure, the replica can connect to the replica catalog of  logical resource.Moreover, we can get all the information of the logic resource.
In order to obtain the access information within the global scope, we should be sure of the relationship between the various types of nodes and management responsibilities.
Domain node is the node that has strong function, high bandwidth, long time online charging for data replication, and replica management.
Each ordinary node can simultaneously connect to multiple domain nodes but can only choose one domain node as its parent node.
Each domain node can be simultaneously connected to multiple domain nodes, but only one or no domain node can be its parent node.Domain node without parent node is called domain head-node.
All parent-child relationships between all domain nodes cannot form a loop.
For the domain node, in addition to the local replica catalog information with the shared resources, it also includes replica catalog information of its child nodes.When registering a shared resource node, if the node is a domain node, management service will copy data into a local replica catalog; otherwise, the copy will be inserted into the parent node replica catalog.
All the available logical resources will be recorded to the corresponding side in this catalog according to this information collection and access method.The catalog includes the initial access request for the node, a replica of the node with physical access to the real-time network, the actual response time, and the waiting queue length on the node.

Replica Distribution Method
Domain node is responsible for the data replica of the original resources and original node of the child nodes.Moreover, it counts the scope of the visits in the global domain.Each node has only one common parent.There is no intersection in the sharing of resources belonging to each domain node.Domain head-node is responsible for information access frequency, cost of access, and the information of the node when the node obtains resource in the domain.Each domain node can have no more than one parent, so there is no intersection between domains.

Replica Lacking Nodes
Definition 3. In unit time,  denotes the relation of the frequency of access and the number of replicas as follows: where   , is the number of times for accessing the physical replica per unit time for LR  and   is the number of replicas each time the replicas are built.
If the access frequency is greater than a given threshold , we denote  as hot resource.
If the number of times for access is high to the logic resource but the logical resource has a lot of replicas, the resource is not hot.Definition 4. Per unit time, the ratio is made by the sum of the response time that accesses all the replicas and the number of times for accessing all the replicas.It is denoted as follows: where    represents the number of times that all replicas have being accessed per unit time.  indicates the th time that users access the replica of logical LR  per unit time.
For each hot resource, we need to further determine the average response time in order to decide whether the resource needs to create a replica or not.
Response time of resources depends on many factors, including bandwidth, node performance, and the size of the data resource.The larger physical size of logical resources is, the longer average response time may be.But it does not explain the fact that there are not enough replicas of the resource.It is also necessary to introduce unit average response time to determine whether the logic resource requires a replica or not.
We create a replica for resources with no replica using two evaluation indexes, that is, the access frequency and the average response time.We export high frequency of access and long average response time as the judgment for creating a replica rather than using one single evaluation index to judge the creation.
For each logical resource needed to create a replica, domain node according to a replica of the node  calculates the average response time as follows: where  , is the response time for   accessing the logical resource LR  .  ,  is the number of times that all nodes in the domain   access the resource LR  .
If  ,  >   , the domain   is called a replica lacking domain.Average response time that the node requests the resource within the domain can reflect lack of resource and access degree.If a domain average response time is greater than the average response time of logic resource LR  , it indicates that the number of replicas in domain   is smaller than nodes in other domains.We need to add more replicas for resource LR  .In the domain with long average response time, while we create replicas, it will minimize the average response time of the logic resource LR  .
We define the time for an available replica as the loop of the replica.Assume that the loops of the replicas are independent and each of them follows an exponential distribution with parameter   and   > 0. The generation period of the replicas is independent and identically distributes random variables.Each of them follows an exponential distribution with parameter   and   > 0. Data access request arrival process is a Poisson process with the arrival rate   > 0 and the service time for access request is with the parameter   > 0 as the exponential distribution.
When the number of requests for the resource is  in the system, this denotes that the system is at level .At the same time, the number of the replicas is .When the number of available replicas is  and 0 ≤  ≤ , the number of the available replicas in the next state may increase by one due to the generation or reducing the node leaving the field, but it is also likely to be unchanged.Use B to represent the system matrix at the state transition matrix under the same level as follows: When the system is at level , there is no new access request in the system and no access request reaching the end.
Let X  be the transition rate matrix for the system being at level  and  > 0. X  is given as We denote Y  as the transition rate matrix for the system transferring from level  to level +1.Y  is obtained as follows: Let Z be the transition rate matrix for the system transferring from level  to level  + 1. Z is then given as follows: Let A be the transition rate matrix of the Markov chain {  (),   ()} as follows: Let  , = lim →∞ {  () = ,   () = } be the stationary probability of the Markov chain.We denote the stationary probability vector for the system being at level  as follows: The system steady-state vector is expressed as  = ( 0 ,  1 ,  2 , . ..).
is given by the following equation: where A is given as where Q is the ratio vector.
Let 0 be the initial value of Q and Q = −(Z + Q 0 2 Y)X −1 .Iterative method can find an approximate solution for Q shown as follows.
End if Q 0 is an initial value and  ≥ 1 is the -order approximate solution of Q.

Replica Placement
Definition 5.During per unit time, the rate, which contains the number of response requests with all the requests, is called a node service rate defined as .
Service rate can measure the service capacity of a node, including node performance, dynamics, and reliability.Definition 6. Replication factor  is used to measure whether a node is suitable to have a replica as follows: where  is the service rate;  is the storage space of node ;  is the size of physical file of resource LR  ; and  is the average available bandwidth.Available bandwidth can be calculated from the ratio of the length of the waiting queue on the current node and network bandwidth.The greater the length of the waiting queue is, the less available bandwidth will be.
In the cloud storage system, due to the dynamic characteristics of the nodes, network transmission delay becomes an important indicator having an impact on data access.Meanwhile, the processing time of CPU and I/O can be negligible.Therefore, the replication factor, node service rate, available storage, the average available bandwidth, and the length of the average waiting queue are proportional.The size of replication factor indicates whether the node is suitable to place the replica or not.

ORRA Algorithm
ORRA algorithm is based on the situation that whether the data resources are hot resources or not, replicas are enough and the place to locate the replica is suitable.With ORRA algorithm, we can prevent that if there are too much replicas to cause the waste of resources.At the same time, the effective use of appropriate nodes storing replicas could avoid the difficulty of finding the position.
We give the ORRA algorithm as follows.
Input.The information of replica.
Output.The number of replicas and the placement to place replicas.
Step 1. Calculate the access frequency of node resource.
If there are more than one pregiven threshold, the data resources are hot.We need to create more replicas.
Step 2. For hot resources, compute their average response time.If the average response time of hot resource is greater than a pregiven threshold value, then it needs to create a replica of the logical resource.
Step 3. A node needs to create replicas, if average response time of all the nodes in the domain is greater than that of the logical resource; it needs to create replicas in the domain.
Step 4. In each domain, be sure of the number of replicas and the appropriate nodes to place replica.
Step 5. Compute the replication factor, select the node with the smallest replication factor as the place to create a replica of the location, and return node address to the domain headnode.
Step 6. Create replicas of data on the specified node.
Step 7. Create a replica of the data on the node calculated.

Numerical and Simulation Results
There are 1000 nodes and the bandwidth between nodes is randomly disposed within the range of 100 MB∼1000 MB.The number of initial average files is 2000 and each file distributes evenly across the network with 1000 MB.Two thresholds of algorithm are as follows: one is   , as average visit frequency for resource, and the other is   to take all the resources of the average unit response time.

Performance Indicators of Storage System.
Reliability of data is the probability of data existing at any given time in the system.The higher the reliability of the data is, the better the storage system is.Data reliability  is defined as the probability that the data has at least one replica for it.In a steady state, the probability for the number of available replicas in the system is given as follows: And  is given as follows: Data access speed as part of the QoS directly represents the quality of service in the storage system.In order to meet user requirements for data accessibility, the storage system should be able to guarantee its stored data that can be accessed within a reasonable time.Data access latency is defined as the period from the beginning of an access request submitted for the requested data until the user gets back that data.The average latency of data access is given as follows:

Optimization Strategy.
According to the experimental results, the number of replicas of a single data is optimized by constructing a profit function.In the experimental system, we set the parameters as follows: the number of replicas is  for one data object in the system.The life of all replicas is subjected to parameter   = 0.001 of the exponential distribution.Data access request transmission time follows an exponential distribution with parameter   = 0.4.Accuracy of  is  = 10 −10 .When   = 0.6, the threshold of creating the replica is 3.When   is 0.005, 0.006, and 0.007, respectively, the trends of single data reliability with the number of replicas are shown in Figure 2.
As can be seen from Figure 2, for the same time for creating replica, reliability increases as the number of replicas increases and trends to 100%.When the number of replicas is at a certain value, the reliability of the data object parameters increases with   .This is because when time for creating replica is in a certain circumstance, the more the number of replicas there is, the smaller the probability of complete data loss is.When there are fixed numbers of replicas, the time for creating replica is larger, the speed for creating replica is faster, and the probability of losing created data is smaller before the creation.When the threshold of creating the replica is 3, the access time parameter is 0.4.  is 0.6, 0.7, and 0.8, respectively.The access delay means and the number of replicas are shown in Figure 3.
As shown in Figure 3, when access rate is in a certain circumstance, with the increase of the number of replicas, the average data access latency shows a downward trend and stabilized.When there is fixed number of replicas, the average access latency with increasing data access rate increases.This is because when the data access rate is in a certain circumstance, the number of replicas is larger than that of the rate in a normal circumstance.Moreover, the single replica node accessing load to bear is smaller, and the access speed is faster.But after the number of replicas increases to a certain value, the access speed is stabilized.When there are fixed numbers of replicas, the access rate is higher.The access load for a single replica of the data becomes more.Meanwhile, data access speed is slower.
The numerical results above indicate that, for a single node, if it is assigned more replicas, the data has higher reliability.While the average access latency of single data is smaller, the access speed is faster.But when the number of replicas is sufficient, the impact given by increasing the number of replicas is very small.In the meantime, the larger the number of replicas is, the more storage space is occupied.Replicas of administrative expenses also increase.
When the number of replicas is , reliability and average latency data access to the data are () and (), respectively.Supposing that the system meets the reliability requirements, the data of profits when time reduces by one unit is  1 .Each additional fee that there is one more replica is defined as  2 .Profit function is constructed as follows: Set time to create parameter   = 0.005; the reliability of the user requirement is 99% and  0 = 5.   = 0.001,   = 0.8, and  2 = 1.Profit function with the number of replicas is as the trends shown in Figure 3.
As it is shown from Figure 4, for the number of replicas being 5, there is some difference.In the case where influences of various factors are known, we can find the optimal number of replicas   which makes system profit maximum.In this case,  1 = 4,   = 6, and the profit value is 1.9.When  1 = 8 and  1 = 12, the optimal number of replicas is   = 7; then the profits value is 5.2 and 8.8, respectively.

Performance
Comparison.ORRA algorithm will be experimented with a fixed number of replicas called FRN (Fixed Replicas Number) algorithm and Local Dynamic (LD) replication algorithm [21,22].In FRN, a replica restriction has a fixed number for each data.Each data center has an identification number.In LD, if there is a data read operation by updating the requirements, the operation of the data reading is dynamical.
We use an average finish time and average response time in experiments as the file replica query performance evaluation index.
The average response time and average finish time under different data replication policy are shown in Figures 5 and 6.
FRN algorithm creates a replica through analyzing the economic model based on the replica process, but the process is constructed without considering the dynamic replica process.The average time to complete the task and response time are the longest, respectively, in FRN.LD algorithm has the shortest average finish time.LD algorithm creates a large number of replicas to local file access as the main means of reducing the response time.The algorithm could avoid offsite access and the average time to complete the task.From this policy, the response time is relatively ORRA algorithm calculates the number of replicas.The replica location in the ORRA algorithm from a global point of view reduces the response time.It is not the final goal to reduce the access to local resources.Thus the average response time of ORRA is greater, but the task's finish time and average response time are less compared to those of LD algorithm.Meanwhile, from the performance analysis by Markov chain method, the ORRA algorithm has the appropriate replica numbers for making the profit maximum.

Conclusion
Replication is an important factor in storage system.In this paper, we presented a dynamic data replication strategy to optimize the finish time and the response time.We firstly proposed the replica catalog approach to obtain a replica of all the information about the logical data resource.In order to determine the absence of a replica of the domain based on globally available logic resources, we gave the number of replicas of the calculation algorithm with constructing the Markov chain to capture the replica creation process.Moreover, we provided performance and numerical results analysis and surveyed the influence of the kind of several parameters on the system's performance.The results showed that the appropriate number of replicas and the dynamic creation of replica improve the system's performance and satisfy the users' requirement, while maximizing the benefit.

Figure 1 :
Figure 1: Structure for data center.

Figure 2 :
Figure 2: Data availability with number  of replicas.

8 Figure 3 :
Figure 3: Average access latency with number  of replicas.

Figure 4 :Figure 5 :
Figure 4: Benefit function with number  of replicas.

Figure 6 :
Figure 6: The comparison of average response time.