This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Repair Strategies for Storage on Mobile Clouds

Gokhan Calis, Swetha Shivaramaiah, O. Ozan Koyluoglu, and Loukas Lazos
Department of Electrical and Computer Engineering
The University of Arizona
Email: {gcalis, sshivaramaiah, ozan, llazos}@email.arizona.edu
Abstract

We study the data reliability problem for a community of devices forming a mobile cloud storage system. We consider the application of regenerating codes for file maintenance within a geographically-limited area. Such codes require lower bandwidth to regenerate lost data fragments compared to file replication or reconstruction. We investigate threshold-based repair strategies where data repair is initiated after a threshold number of data fragments have been lost due to node mobility. We show that at a low departure-to-repair rate regime, a lazy repair strategy in which repairs are initiated after several nodes have left the system outperforms eager repair in which repairs are initiated after a single departure. This optimality is reversed when nodes are highly mobile. We further compare distributed and centralized repair strategies and derive the optimal repair threshold for minimizing the average repair cost per unit of time, as a function of underlying code parameters. In addition, we examine cooperative repair strategies and show performance improvements compared to non-cooperative codes. We investigate several models for the time needed for node repair including a simple fixed time model that allows for the computation of closed-form expressions and a more realistic model that takes into account the number of repaired nodes. We derive the conditions under which the former model approximates the latter. Finally, an extended model where additional failures are allowed during the repair process is investigated. Overall, our results establish the joint effect of code design and repair algorithms on the maintenance cost of distributed storage systems.

Index Terms:
Distributed storage, regenerating codes, mobile cloud, data reliability.

I Introduction

Local caching and content distribution from a community of mobile devices has been proposed as an alternative architecture to traditional centralized storage [1, 2, 3]. The so-called mobile cloud storage systems reduce the traffic load of the already over-burdened infrastructure network and improve content availability in the event of network outages. In a mobile cloud storage scenario, a file \mathcal{F} is stored within a geographically-limited area 𝒜\mathcal{A} by a community of mobile devices. A user within 𝒜\mathcal{A} can download \mathcal{F} from the community of mobile devices. This can be done via direct communication between the mobile devices without accessing the network infrastructure, or via a base station, but without accessing the backhaul network. Without loss of generality, we abstract our setup to the former model.

File storage at mobile devices leads to frequent data loss due to mobility. When a mobile device storing \mathcal{F} or any fragment of \mathcal{F} exits 𝒜,\mathcal{A}, the stored data is lost. To deal with such losses, redundancy is introduced in the form of data replication or coding [4, 5]. In replication storage, copies of \mathcal{F} are stored at multiple devices within the community. More sophisticated coding schemes such as erasure coding achieve the same reliability at lower storage overhead [6, 7]. Despite the application of coding, a stored file \mathcal{F} will eventually be lost when a certain number of mobile devices (storage nodes) depart from 𝒜\mathcal{A}. To maintain \mathcal{F} over long time periods, the mobile cloud system must be capable of recovering the lost data. A repair scenario is shown in Fig. 1. Lost data is recovered by downloading fragments from the storage nodes that remain within 𝒜\mathcal{A}. The amount of data downloaded for repair is referred to as the repair bandwidth. For mobile communities, the repair bandwidth can be significant.

Refer to caption
Figure 1: File maintenance in a mobile cloud storage system.

The file maintenance problem for distributed storage systems has been primarily studied assuming that erasure codes are applied for redundancy [8, 6]. However, erasure codes are not repair bandwidth efficient. The repair bandwidth can be reduced by applying regenerating codes, which allow fragment recovery without file reconstruction (see [9, 10, 11, 12] and references therein). Although regenerating codes lower the repair bandwidth (per single node repair), the design of an efficient repair strategy for a mobile cloud storage system involves cost optimizations with respect to many parameters, including the code redundancy factor, the device departure and fragment repair rates, the threshold for initiating repair operations, and the available communication bandwidth. In this paper, we study the problem of minimizing the file maintenance cost, as a function of the network dynamics, the code parameters, and the communication model for repairing lost data fragments. Specifically, we make the following contributions.

  • We focus on threshold-based file maintenance strategies, in which repairs are initiated when a threshold number of fragments is lost. We analyze two communication models, namely distributed repair and centralized repair. In distributed repair, the new storage nodes independently download data from existing nodes to recover lost fragments. In centralized repair, a leader node first recovers \mathcal{F} via reconstruction, before regenerating and distributing the repaired fragments to new storage nodes. In both scenarios, we assume that repairs are performed in parallel, taking the same amount of time and there are no additional failures during fragment recovery. This simplified model allows us to derive closed-form expressions.

  • We derive the optimal repair threshold that minimizes the average repair cost per unit of time for each communication model. Our results show that no one strategy is optimal for all possible system configurations and mobility patterns. At the low mobility-to-repair rate regime, repairing at the regeneration threshold yields the optimal strategy. On the other hand, at the high mobility-to-repair rate regime, regenerating after a single fragment loss minimizes the average repair cost per unit of time.

  • We further investigate the application of cooperative repair codes. We show that the repair bandwidth is minimized at full cooperation, i.e., when all nodes to be repaired cooperate. We then investigate the centralized repair of multiple node failures, which suits our centralized repair model that is described earlier. The advantage of such a model is that a leader node does not need to download the file \mathcal{F}, which reduces the average repair cost per time.

  • We revise the fixed-rate repair model originally assumed in distributed and centralized repair with a more realistic node-dependent model. In the latter, the repair time depends on the number of nodes that are repaired. We compare the resulting average repair cost with our earlier model and show that in the low mobility-to-repair rate regime, the simplified repair-all-at-one model faithfully approximates the node-dependent one.

  • We further consider a distributed repair model under a repair process which not only depends on the threshold in terms of recovery time but also may involve additional failures during recovery. We express the average repair cost through a system of equations and verify our analytical findings through simulations. We then verify our analytical findings through simulations. Lastly, we compare all of the discussed distributed repair models employing regenerating codes.

Refer to caption         Refer to caption
Figure 2: Storage of FF using (a) a (n=4,k=2)(n=4,k=2) erasure code and, (b) a (n=4,k=2,d=3,α=2,β=1)(n=4,k=2,d=3,\alpha=2,\beta=1) regenerating code.

Although we present our analysis in the context of mobile storage systems, we emphasize that our work is applicable in any distributed storage system where fragment losses can occur. This includes popular wired distributed storage architectures such as HDFS [13], in which fragment loss can be frequent due to server failure and updates. Similar to a mobile storage cloud system, the optimal threshold repair strategy for the wired domain would depend on the fragment loss rate (server failure or unavailability rate) and the various system parameters.

II Related Work

In reliable storage systems, information is replicated or coded such that the original content can be recovered if some limited fraction of the stored data is lost. Replication is the most intuitive way to introduce redundancy. This method refers to the maintenance of verbatim copies of the same file \mathcal{F}. Although replication is easy to implement, it suffers from high storage and repair overhead.

Erasure codes incur less storage overhead compared to replication while maintaining the same degree of reliability. In particular, Maximum Distance Separable (MDS) codes achieve the optimal tradeoff between failure tolerance and storage overhead [14, 15]. An (n,k)(n,k) MDS code encodes kk data chunks to nn fragments and can tolerate up to nkn-k fragment losses. Any kk encoded fragments can be used to reconstruct \mathcal{F}. Fig. 2(a) shows the encoding process for a file \mathcal{F} of size 44MB using a (4, 2) erasure code. File \mathcal{F} is split into k=2k=2 chunks AA and BB, each of size 22MB. The two chunks are then encoded into n=4n=4 fragments. The repair bandwidth for this scheme equals the size of the original file. Reed-Solomon codes are a classical example of MDS codes and are deployed in many existing storage systems (e.g. [7, 16, 17, 18]).

Although erasure codes offer significant savings in storage, their repair bandwidth is suboptimal, a data amount equal to the file size must be retrieved to repair a single fragment. Regenerating codes, on the other hand, can recover lost fragments without reconstructing the entire file, at the expense of a small storage overhead. They were initially investigated in the seminal work of Dimakis et al. [9], which focuses on the following setup. A file \mathcal{F} of size \mathcal{M} symbols is encoded into nn fragments, each of size α\alpha symbols, such that (i) the file can be reconstructed from any kk fragments, and (ii) a lost fragment can be repaired by downloading βα\beta\leq\alpha symbols from any dkd\geq k fragments, resulting in a repair bandwidth of γ=dβ\gamma=d\beta. Dimakis et al. characterized the tradeoff between the per node storage (α\alpha) and the repair bandwidth (γ\gamma) [9].

Fig. 2(b) shows an example of a (n,k,d,α,β)=(4,2,3,2,1)(n,k,d,\alpha,\beta)=(4,2,3,2,1) regenerating code. Here, the file \mathcal{F} is split into k=2k=2 chunks each of size α=2\alpha=2MB. The chunks are encoded in n=4n=4 fragments, with each fragment being 22MB. A failed node in this scenario can be regenerated by retrieving fragments of size β=1\beta=1MB from d=3d=3 surviving nodes. This yields a repair bandwidth of dβ=3d\beta=3MB which is less that kα=4k\alpha=4MB. Note, however, that regeneration can be applied only if at least dd fragments are available. If fewer than dd but more than kk fragments remain available, the lost fragments can only be repaired through file reconstruction.

During the repair process of regenerating codes, there is no coordination among the nodes to be repaired. In [19, 6, 20, 21], the authors consider the case where tt storage nodes are repaired simultaneously in a cooperative manner. Specifically, referring to this set of tt nodes as the newcomers, and the existing nodes storing fragments of \mathcal{F} as live nodes, each newcomer contacts dd live nodes and downloads β\beta symbols from each. Moreover, newcomers cooperate and download β\beta^{\prime} symbols from each of the remaining t1t-1 newcomers. The tradeoff between per node storage and repair bandwidth is established similarly to [9]. Rawat et al. in [22] also consider the cooperative repair of tt nodes such that only one node among tt nodes downloads data from live nodes. After downloading the necessary information at the leader node, the remaining t1t-1 nodes are cooperatively repaired. Two points corresponding to minimum storage and minimum bandwidth regeneration are characterized.

In the context of mobile cloud systems, Pääkkönen et al. considered a wireless device-to-device network used for distributed storage [23]. The authors showed the energy consumption for maintaining data using regenerating codes is lower compared to retrieving a lost file from a remote source. This result holds if the per-bit energy cost for communication between the mobile devices is lower than the cost for communicating with the remote source.

In a follow-up work, Pääkkönen et al. compared replication with regeneration for a similar wireless P2P storage system [2]. They derived closed-form expressions for the expected total energy cost of file retrieval using replication and regeneration. They showed that the expected total cost of 22-replication is lower than the cost of regeneration. However, only an eager repair strategy was considered in the analysis. Moreover, the advantages of regeneration were not fully exploited by considering codes with different parameters. Pääkkönen et al. also addressed the problem of tolerating multiple simultaneous failures [24]. They investigated the energy overhead of regenerating codes in a cellular network. They showed that large energy gains can be obtained by employing regenerating codes. These gains depend on the file popularity. The authors provided decision rules for choosing between simple caching, replication, MSR and MBR codes, based on numerical results on certain application scenarios. In our work, we analytically provide decision rules to choose optimal repair strategies that minimize the repair bandwidth per unit of time.

Pedersen et al. recently studied the cost of content caching on mobile devices using erasure codes [25]. They derived analytical expressions for the cost of content download and repair bandwidth as a function of the repair interval. These expressions were used to evaluate the communication cost of distributed storage for MDS codes, regenerating codes, and locally repairable codes. Their results show that in high churn, distributed storage can reduce the communication cost compared to downloading from a base station. They conclude that MDS codes are the best performers in this setup.

III System Model

III-A Network Model

We consider a distributed storage system (DSS) consisting of mobile storage nodes that enter and exit a geographically-limited area 𝒜\mathcal{A}. When a node departs from 𝒜\mathcal{A}, its data is lost. The nodes that store file fragments within area 𝒜\mathcal{A} are said to be live nodes. New nodes that are used to store repaired fragments are said to be newcomer nodes or newcomers. We assume that there are always sufficient newcomers to perform repairs. Moreover, as we are interested in the system performance due to network dynamics, we do not consider data loss due to hardware failures. Such failures occurs orders of magnitude less frequently than node departures. Following the network dynamics model of prior works [8, 23], we model the time XiX_{i} spent by each node within 𝒜\mathcal{A} as an exponentially distributed random variable with parameter λ\lambda (i.e., XiExp(λ),i)X_{i}\sim\textrm{Exp}(\lambda),~\forall i). Random variables {Xi}\{X_{i}\} are assumed independent and identically distributed.

The repair time is modeled by an exponentially distributed random variable with parameter μ\mu. For ease of analysis, we initially assume that μ\mu is independent of the number of fragments that need to be repaired. We later revise our analysis and consider a more realistic model in which repairs proceed in parallel at different nodes with the same rate μ\mu. This corresponds to the distributed nature of mobile DSS. Finally, we define ρ=λμ\rho=\frac{\lambda}{\mu} as the ratio of the departure-to-repair rate.

Refer to caption       Refer to caption
(a) distributed repair     (b) centralized repair
Figure 3: (a) Distributed repair: nodes independently regenerate a lost fragment by obtaining symbols from other nodes, (b) centralized repair: a leader node reconstructs \mathcal{F} and distributes lost fragments to new nodes.

III-B Storage Model

A file \mathcal{F} of size \mathcal{M} bits is stored in nn storage nodes using a regenerating code with parameters (n,k,d,α,β)(n,k,d,\alpha,\beta) (see Fig. 2(b)). We focus on the two most popular types of regenerating codes, namely Minimum Storage Regenerating (MSR) codes and Minimum Bandwidth Regenerating (MBR) codes. These two classes of codes operate at the end points of the tradeoff between per node storage and repair bandwidth, as introduced in [9]. MSR codes achieve minimum storage by setting α=/k\alpha=\mathcal{M}/k and minimize the repair bandwidth under this constraint. Their operating point is given by:

(αMSR,γMSR)=(k,dk(dk+1)).\left(\alpha_{\textrm{MSR}},\gamma_{\textrm{MSR}}\right)=\left(\frac{\mathcal{M}}{k},\frac{\mathcal{M}d}{k\left(d-k+1\right)}\right). (1)

Note that, for MSR codes, αMSRγMSR\alpha_{\textrm{MSR}}\leq\gamma_{\textrm{MSR}} and hence, the per-node storage is smaller than the repair bandwidth. MBR codes, on the other hand, minimize the repair bandwidth (achieved when γ=α\gamma=\alpha), and operate at:

(αMBR,γMBR)=(2d2kdk2+k,2d2kdk2+k).\left(\alpha_{\textrm{MBR}},\gamma_{\textrm{MBR}}\right)=\left(\frac{2\mathcal{M}d}{2kd-k^{2}+k},\frac{2\mathcal{M}d}{2kd-k^{2}+k}\right). (2)

Instances of these codes can be found in [12, 10, 11].

III-C File Repair Model

In our model, the system continuously monitors the redundancy level and initiates a repair when τ\tau live nodes remain within 𝒜\mathcal{A}. The determination of τ\tau, the type of repair (regeneration, reconstruction, or both) and the communication model for fragment retrieval (centralized or distributed) form a file maintenance strategy. We note that the practical implementation details of the redundancy monitoring mechanism and of the communication protocols for retrieving various fragments are beyond the scope of the present work. We focus on the theoretical aspects of the maintenance process. Since repairs are initiated only when the number of remaining nodes reaches threshold τ\tau, a repair strategy can be viewed as an i.i.d. system recovery process occurring every Δ\Delta seconds, where Δ\Delta is a random variable denoting the time elapsed between two instances of a fully repaired system. For this recovery process, we define the following costs.

Definition 1 (Repair cost c(τ)c(\tau)).

The number of bits c(τ)c(\tau) that must be downloaded from the τ\tau remaining nodes to restore nn fragments in 𝒜,\mathcal{A}, when nτn-\tau nodes have departed 𝒜\mathcal{A}.

Definition 2 (Average repair cost per unit of time r(τ)r(\tau)).

The average cost per unit of time for maintaining nn fragments in 𝒜\mathcal{A}, defined as c(τ)c(\tau) over the average time between two instances of a fully repaired system, i.e., E[Δ]\textrm{E}[\Delta], with nn fragments (r(τ)r(\tau) is measured in bits per unit of time).

We determine the optimal file maintenance strategy for different node departure rates, code parameters, and communication models for fragment retrieval.

IV File Maintenance Strategies

Let τ\tau denote the number of live nodes remaining within 𝒜\mathcal{A} after the departure of nτn-\tau nodes. We focus on determining the optimal repair threshold τ,\tau^{*}, which minimizes the average repair cost per unit of time. We first compare the distributed repair strategy with centralized repair strategy.

IV-A Distributed Repair

In distributed repair, newcomers recover lost fragments by independently downloading relevant symbols from live nodes. The repair process is initiated when τ\tau live nodes remain within 𝒜\mathcal{A}, where kτ<n1k\leq\tau<n-1 (when τ<k\tau<k, the data is irrecoverably lost). If τd\tau\geq d, fragment recovery can be performed through regeneration. Each of the nτn-\tau newcomers downloads β\beta symbols from dd live nodes and independently regenerates a lost fragment. Fig. 3(a) demonstrates the distributed repair process for a file \mathcal{F} stored with a (n=4,k=2,d=3,α=2,β=1)(n=4,k=2,d=3,\alpha=2,\beta=1) regenerating code. One fragment of \mathcal{F} is lost because node s9s_{9} departed from 𝒜\mathcal{A}. The lost fragment is regenerated at s1s_{1} by independently downloading β=1\beta=1 symbol from three nodes. The total repair bandwidth is equal to 3 symbols.

If τ<d,\tau<d, regeneration cannot be directly applied. To reduce the repair cost, we consider a hybrid scheme consisting of regeneration and reconstruction. First, dτd-\tau nodes are repaired by downloading α\alpha symbols from kk live nodes and reconstructing \mathcal{F}. When dd fragments become available, regeneration is applied to repair the remaining ndn-d newcomers. Accordingly, the repair cost is expressed by:

cD(τ)={kα(dτ)+γ(nd), if τ<dγ(nτ), if τd.c_{D}(\tau)=\begin{cases}k\alpha(d-\tau)+\gamma(n-d),&\mbox{ if }\tau<d\\ \gamma(n-\tau),&\mbox{ if }\tau\geq d.\end{cases} (3)

The subscript DD in cD(τ)c_{D}(\tau) is used to denote the cost of distributed repair and γ\gamma denotes the regeneration cost of a single fragment which depends on the underlying regeneration code (see eqs. (1) and (2) for MSR and MBR codes, respectively). From (3), it is evident that cD(τ)c_{D}(\tau) monotonically decreases with τ.\tau. Moreover, the rate of cost change (with respect to τ\tau) is higher when τ<d.\tau<d. To determine the optimal threshold τ\tau^{*}, we are interested in minimizing rD(τ)r_{D}(\tau), which captures the repair cost for maintaining nn fragments per unit of time.

To calculate rD(τ)r_{D}(\tau), we use the continuous-time Markov chain (CTMC) model shown in Fig. 4. This model captures the periodic repair process when node departures occur independently, the time spent by each node in 𝒜\mathcal{A} is exponentially distributed with parameter λ\lambda, and the system recovery process is exponentially distributed with parameter μ\mu.

Refer to caption
Figure 4: Markov chain for a threshold-based file maintenance.

The CTMC consists of nτ+1n-\tau+1 states representing the number of fragments that remain within 𝒜\mathcal{A} after each node departure, until a repair at state τ\tau is initiated. Note that we have omitted states after τ\tau in the CTMC model, because we are interested in optimizing the periodic cost of repairing the DSS at threshold τ\tau. Moreover, the transition probability to state τ1\tau-1 is negligible for most realistic scenarios in which μτλ.\mu\gg\tau\lambda. For cases when μ≫̸τλ\mu\not\gg\tau\lambda, we compute the mean time it takes to depart from the optimal repair strategy of repairing at state τ\tau and interpret this event as a form of system error which leads to data loss (see Section V-C).

For the CTMC in Fig 4, the departure rate from a state ii equals the node departure rate λ\lambda, times the number of nodes which store fragments at state ii. When the repair process is initiated, the system transitions from state τ\tau to state nn because all fragment repairs nodes proceed in parallel. For the CTMC, we define the expected average cost rD(τ)r_{D}(\tau) per unit of time as

rD(τ)=cD(τ)E[Δ],r_{D}(\tau)=\frac{c_{D}(\tau)}{\textrm{E}[\Delta]}, (4)

where E[Δ]E[\Delta] is the average time between two transitions through the nthn^{th} state in the periodic repair process111The alternative definition of rD(τ)=E[cD(τ)Δ]r_{D}(\tau)=E\left[\frac{c_{D}(\tau)}{\Delta}\right] is not useful because the expectation is infinite. This is due to the infinitesimally small values that can be obtained by Δ\Delta, whereas cD(τ)c_{D}(\tau) remains lower bounded.. For Δ\Delta,

Δ=Tn+Tn1++Tτ+1+Tτ,\Delta=T_{n}+T_{n-1}+\dots+T_{\tau+1}+T_{\tau}, (5)

where TiT_{i} denotes the time that the system stays at state ii (inter-departure time) and TτT_{\tau} is the expected time for completing repairs so that nτn-\tau fragments are recovered (return to state nn). The random variables TiT_{i} are independent and exponentially distributed with parameter iλi\lambda, whereas TτT_{\tau} is exponentially distributed with parameter μ\mu. In particular, E[Ti]=1iλ\textrm{E}[T_{i}]=\frac{1}{i\lambda} and E[Tτ]=1μ\textrm{E}[T_{\tau}]=\frac{1}{\mu}. Therefore, E[Δ]\textrm{E}[\Delta] is the sum expectation of independent exponential random variables.

E[Δ]=i=τ+1n1iλ+1μ=Hn,τλ+1μ,\textrm{E}[\Delta]=\sum_{i=\tau+1}^{n}\frac{1}{i\lambda}+\frac{1}{\mu}=\frac{H_{n,\tau}}{\lambda}+\frac{1}{\mu}, (6)

where Hn,τ=i=τ+1n1iH_{n,\tau}=\sum_{i=\tau+1}^{n}\frac{1}{i}. Combining (4) and (6), we obtain the average repair cost per unit of time as follows.

rD(τ)=cD(τ)E[Δ]={λμ(kα(dτ)+γ(nd))μHn,τ+λ,if τ<dλμ(γ(nτ))μHn,τ+λ,if τd.r_{D}(\tau)=\frac{c_{D}(\tau)}{\textrm{E}[\Delta]}=\begin{cases}\frac{\lambda\mu(k\alpha(d-\tau)+\gamma(n-d))}{\mu H_{n,\tau}+\lambda},&\textrm{if }\tau<d\\ \frac{\lambda\mu(\gamma(n-\tau))}{\mu H_{n,\tau}+\lambda},&\textrm{if }\tau\geq d.\\ \end{cases} (7)

We use (7) to determine the optimal threshold τ\tau^{*} which minimizes rD(τ).r_{D}(\tau). This is given by Propositions 1 and 2.

Proposition 1.

For regeneration (dτn1d\leq\tau\leq n-1), the optimal repair threshold τ\tau^{*} is given by

τ={d,ρHn1,dnd11nn1,otherwise.\tau^{*}=\begin{cases}d,&\rho\leq\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n}\\ n-1,&\text{otherwise.}\end{cases} (8)
Proof.

Proof is provided in Appendix A. ∎

Proposition 1 determines the ρ\rho regime for which repairs at τ=d\tau=d, an instance of lazy repair, is more efficient than initiating repairs at τ=n1\tau=n-1, referred to as eager repair. In the following Lemma, we show that there is always a positive ρ\rho for which lazy repair is more efficient that eager repair.

Lemma 1.

There is always some ρ>0\rho>0 for which lazy repair (τ=d\tau^{\ast}=d) is more efficient than eager repair (τ=n1)(\tau=n-1), independent of the code parameters used for regeneration.

Proof.

Proof is provided in Appendix B. ∎

We now examine if there is a ρ\rho regime for which the hybrid scheme, i.e., reconstruction plus regeneration results in a lower expected cost per unit of time compared to regeneration only. This rate regime is given by the following proposition.

Proposition 2.

For regeneration plus reconstruction (kτdk\leq\tau\leq d), the optimal repair threshold τ\tau^{*} is given by

τ={k,ργ(nd)Hd,kkα(dk)Hn,dd,otherwise.\tau^{*}=\begin{cases}k,&\rho\leq\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d}\\ d,&\textrm{otherwise.}\end{cases} (9)
Proof.

Proof is provided in Appendix C.∎

Similar to Lemma 1, we investigate if the highest departure-to-repair rate for which reconstruction at kk is more efficient than regeneration is always positive independent of the code parameters. Unlike the case of Lemma 1, we show that for a certain relationship between n,k,γ,n,k,\gamma, and α,\alpha, regeneration is strictly more efficient than regeneration plus reconstruction, independent of ρ\rho. For any other code parameters, the most efficient strategy depends on ρ\rho.

Lemma 2.

For any departure-to-repair ratio ρ\rho, regeneration is strictly more efficient than regeneration plus reconstruction for codes satisfying nγ<k2αn\gamma<k^{2}\alpha.

Proof.

Proof is provided in Appendix D. ∎

We further explore the condition in Lemma 2 for MSR and MBR codes. For MSR codes, we obtain that dn<k2(dk+1)dn<k^{2}(d-k+1) by substituting the operation points of MSR from (1). Similarly, for MBR codes, we obtain that n<k2n<k^{2} by substituting the operation points of MBR from (2). Note that Lemma 2 does not enumerate all possible codes for which regeneration is strictly more efficient than regeneration plus reconstruction for any λ.\lambda. This is because we have used bounds on the harmonic function to derive the analytic formulas. Numerical bounds could provide a more accurate range of code parameters for which Lemma 2 is true.

TABLE I: Cost comparison of repair strategies at different thresholds.
Distributed Repair Centralized Repair
Regeneration
Regeneration
+
Reconstruction
Reconstruction
Code rD(n1)r_{D}(n-1) rD(d)r_{D}(d) rD(k)r_{D}(k) rC(n1)r_{C}(n-1) rC(k)r_{C}(k)
MSR ndλμk(dk+1)(μ+nλ)\frac{n\mathcal{M}d\lambda\mu}{k(d-k+1)(\mu+n\lambda)} (nd)dλμk(dk+1)(λ+μHn,d)\frac{\mathcal{M}(n-d)d\lambda\mu}{k(d-k+1)(\lambda+\mu H_{n,d})} [k(dk+1)(dk)+d(nd)]λμk(dk+1)(λ+μHn,k)\frac{\mathcal{M}\left[k(d-k+1)(d-k)+d(n-d)\right]\lambda\mu}{k(d-k+1)(\lambda+\mu H_{n,k})} nλμμ+nλ\frac{n\mathcal{M}\lambda\mu}{\mu+n\lambda} (n1)λμk(λ+μHn,k)\frac{(n-1)\mathcal{M}\lambda\mu}{k(\lambda+\mu H_{n,k})}
MBR 2ndλμk(2dk+1)(μ+nλ)\frac{2n\mathcal{M}d\lambda\mu}{k(2d-k+1)(\mu+n\lambda)} 2(nd)dλμk(2dk+1)(λ+Hn,d)\frac{2\mathcal{M}(n-d)d\lambda\mu}{k(2d-k+1)(\lambda+H_{n,d})} 2d(n+kdk2d)λμk(2dk+1)(λ+Hn,k)\frac{2\mathcal{M}d(n+kd-k^{2}-d)\lambda\mu}{k(2d-k+1)(\lambda+H_{n,k})} 2ndλμ(2dk+1)(μ+nλ)\frac{2n\mathcal{M}d\lambda\mu}{(2d-k+1)(\mu+n\lambda)} 2(n1)dλμk(2dk+1)(λ+μHn,k)\frac{2(n-1)\mathcal{M}d\lambda\mu}{k(2d-k+1)(\lambda+\mu H_{n,k})}

IV-B Centralized Repair

In the centralized strategy, repairs are performed by a leader node in two stages. In the first stage, the leader newcomer node downloads α\alpha symbols from kk live nodes and reconstructs \mathcal{F}. In the second stage, the leader node transmits α\alpha bits to each of the remaining (nτ1)(n-\tau-1) newcomers to restore the remaining (nτ1)(n-\tau-1) fragments. Fig. 3(b) shows an example of centralized repair for a (n=4,k=2,d=3,α=2,β=1)(n=4,k=2,d=3,\alpha=2,\beta=1) regenerating code. Nodes s2s_{2} and s9s_{9} have departed from area 𝒜\mathcal{A}, leading to the loss of their respective fragments. Node s5,s_{5}, who acts as a leader, downloads α=2\alpha=2 symbols from k=2k=2 other nodes to reconstruct \mathcal{F}. It then distributes α=2\alpha=2 symbols to s1s_{1} and s7s_{7} to restore the system reliability. The repair cost of centralized repair is given by:

cC(τ)=α(k+nτ1).c_{C}(\tau)=\alpha\left(k+n-\tau-1\right). (10)

In (10), the subscript CC in cC(τ)c_{C}(\tau) is used to denote the cost of centralized repair. The node departure process does not vary with the repair strategy. Therefore, the same CTMC model shown in Fig. 4 applies for the centralized repair. According to (4), the average repair cost rC(τ)r_{C}(\tau) is given by:

rC(τ)=cC(τ)E[Δ]=λμα(k+nτ1)μHn,τ+λ.r_{C}(\tau)=\frac{c_{C}(\tau)}{\textrm{E}[\Delta]}=\frac{\lambda\mu\alpha(k+n-\tau-1)}{\mu H_{n,\tau}+\lambda}. (11)

The optimal threshold τ\tau^{*} which minimizes r(τ)r(\tau) is obtained in Proposition 3.

Proposition 3.

The optimal repair threshold τ\tau^{*} which minimizes r(τ)r(\tau) for centralized repair is given by

τ={k,ρkHn1,knk11nn1,otherwise\tau^{*}=\begin{cases}k,&\rho\leq\frac{kH_{n-1,k}}{n-k-1}-\frac{1}{n}\\ n-1,&\textrm{otherwise}\end{cases} (12)
Proof.

Proof is provided in Appendix E. ∎

Using Proposition 3, we can determine the optimal repair strategy for any ρ\rho, when centralized repair is employed. We note that according to Lemma 1, the value kHn1,k(nk1)1n\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n} is strictly positive for any code parameters. Therefore, there is always a departure-to-repair ratio for which lazy repair is more efficient than eager repair, independent of the code used for regeneration and reconstruction.

V Analysis of Maintenance Strategies

In this section, we characterize the ρ\rho regime for which lazy repair is more cost-efficient than eager repair. Moreover, we determine the optimal repair strategy (decentralized vs. centralized) as a function of the code parameters, when the departure and repair rates are fixed. To ease the reader to our analysis, we summarize the cost of repair in Table I.

V-A Eager vs. Lazy Repair

According to the results of Propositions 1, 2, and 3, we classify the departure-to-repair ratios into a low departure-to-repair rate regime (ρlow(\rho_{\textrm{low}}) and a high departure-to-repair rate regime (ρhigh)(\rho_{\textrm{high}}). The two regimes are defined by finding the lowest and highest rates, based on the bounds stated in the three propositions.

ρlow\displaystyle\rho_{\textrm{low}} =min{Hn1,dnd11n,γ(nd)Hd,kkα(dk)Hn,d,kHn1,k(nk1)1n}.\displaystyle=\min\Big{\{}\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n},\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d},\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n}\Big{\}}. (13)
ρhigh\displaystyle\rho_{\textrm{high}} =max{Hn1,dnd11n,γ(nd)Hd,kkα(dk)Hn,d,kHn1,k(nk1)1n}.\displaystyle=\max\Big{\{}\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n},\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d},\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n}\Big{\}}. (14)

Noting that Hn1,dnd11n<kHn1,k(nk1)1n\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n}<\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n} for k<d,k<d, the two regime expressions can be simplified to

ρlow=min{Hn1,dnd11n,γ(nd)Hd,kkα(dk)Hn,d}.\displaystyle\rho_{\textrm{low}}=\min\Big{\{}\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n},\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d}\Big{\}}. (15)
ρhigh=max{γ(nd)Hd,kkα(dk)Hn,d,kHn1,k(nk1)1n}.\displaystyle\rho_{\textrm{high}}=\max\Big{\{}\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d},\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n}\Big{\}}. (16)

For any ρρlow\rho\leq\rho_{\textrm{low}}, the repair cost per unit of time is minimized when lazy repair is applied since that choice of ρ\rho would be lower than the bounds found in (8), (9) and (12) and the corresponding repair thresholds are the lowest possible. On the other hand, for any ρρhigh\rho\geq\rho_{\textrm{high}}, eager repair (i.e., repair at τ=n1\tau^{*}=n-1) yields the lowest r(τ)r(\tau). These findings hold for both distributed and centralized repair. If the departure-to-repair rates do not lie in either of the ρ\rho regimes, then the optimal repair policy (eager vs. lazy) depends on the relationship of the code parameters and the repair strategy (centralized or distributed).

V-B Centralized vs. Distributed Repair

We now fix the departure rate λ\lambda and repair rate μ\mu to compare the repair cost of centralized vs. distributed repair per unit of time, as a function of the code parameters. Specifically, we determine relationships between n,k,dn,k,d and the code type (MSR vs. MBR) for which an optimal strategy can be derived. Our results are stated in the following two propositions.

Proposition 4.

For dτn1d\leq\tau^{*}\leq n-1, using MBR codes and distributed repair minimizes the average repair cost per unit of time, if d>n+k13d>\frac{n+k-1}{3}.

Proof.

Proof is provided in Appendix F.∎

We now prove that if τ\tau^{*} lies between kk and dd, using MSR codes with centralized repair is optimal.

Proposition 5.

For kτ<dk\leq\tau^{*}<d, the optimal repair strategy is given by centralized repair with MSR codes.

Proof.

Proof is provided in Appendix G.∎

Refer to caption Refer to caption Refer to caption Refer to caption
(a) (b) (c) (d)
Figure 5: Cost r(τ)r(\tau) vs. repair threshold (τ\tau) for: (a) d>n+k13d>\frac{n+k-1}{3}, (b) d<n+k13>d<\frac{n+k-1}{3}>, (c) ρ=104\rho=10^{-4}, (d) ρ=1\rho=1.

V-C Mean Time to Data Loss for Periodic Repairs

We now examine the Mean Time to Data Loss (MTTDL) for the periodic threshold repair process. For our purposes, we consider that data is lost if the DSS transitions from state τ\tau to state τ1\tau-1 instead of state nn. That is, if a node leaves the system before repairs are completed when initiated at state τ\tau, the repair process is abandoned and the system eventually reaches state k1k-1, at which data is lost. In this case, the file FF is reinstated at the mobile nodes by a central entity. Note that when τ>k\tau>k repairs could be re-initiated at state τ1\tau-1, because at least kk fragments remain available. We opted not to consider this option for the MTTDL calculation to capture the periodic nature of the threshold repair strategy. The MTTDL reflects the period of time at which the DSS oscillates between states nn and τ\tau. The time to reach state k1k-1 assuming no repairs are attempted after state τ\tau is given by:

Proposition 6.

For a threshold-based repair strategy attempting regeneration at state τ\tau, the MTTDL is given by

MTTDL=i=1(iHn,τλ+i1μ+Hτ,k1λ)(1p)(i1)p,\textrm{MTTDL}=\sum_{i=1}^{\infty}\Big{(}\frac{iH_{n,\tau}}{\lambda}+\frac{i-1}{\mu}+\frac{H_{\tau,k-1}}{\lambda}\Big{)}(1-p)^{(i-1)}p, (17)

where p=τλτλ+μp=\frac{\tau\lambda}{\tau\lambda+\mu}.

Proof.

Proof is provided in Appendix H. ∎

The MTTDL is a decreasing function of τ\tau. This is intuitive considering that the number of nodes that need to depart for reaching state k1k-1 increases with τ\tau. Moreover, the average time it takes to reach state τ\tau from state nn increases with τ\tau. This indicates that the periodic repair of the DSS will on average last longer if a lazy repair strategy is adopted.

V-D Numerical Examples

In this section, we validate our theoretical results be providing numerical examples. Fig.  5(a) shows r(τ)r(\tau) when d>n+k13d>\frac{n+k-1}{3} and ρ=104\rho=10^{-4} . According to Proposition 4, for this combination of code parameters, a distributed repair strategy with MBR codes (D-MBR) achieves the minimum r(τ)r(\tau) for all dτn1d\leq\tau^{*}\leq n-1. The minimum occurs at τ=d\tau^{*}=d. Moreover, according to Proposition 5, centralized MSR codes (C-MSR) minimize r(τ)r(\tau) for kτ<d.k\leq\tau<d. This is verified in all plots of Fig. 5, for which the cost is minimized by the C-MSR strategy when τ=k\tau^{*}=k, if τ<d\tau<d. In Fig. 5(b), we show r(τ)r(\tau) when d<n+k13d<\frac{n+k-1}{3} and ρ=104\rho=10^{-4}. For this case, there is no one scheme with optimal cost for any value of dτn1d\leq\tau\leq n-1. For τ>16,\tau>16, D-MBR is optimal, whereas for 10τ1510\leq\tau\leq 15, C-MSR becomes optimal. C-MSR achieves the lowest overall cost at τ=k.\tau=k.

We also studied the impact of ρ\rho, when the code parameters are fixed to (n=30,k=20,d=25)(n=30,k=20,d=25). Fig. 5(c) shows the average cost per unit of time (r(τ)r(\tau)) when ρ=104.\rho=10^{-4}. For this ρ\rho regime, a lazy repair strategy with τ=d\tau^{\ast}=d minimizes r(τ)r(\tau), with D-MBR codes achieving the lowest cost. On the other hand, eager repair becomes optimal for any ρ>ρhigh\rho>\rho_{\textrm{high}}. This is observed in Fig. 5(d), in which the value of ρ\rho has been increased to one. D-MBR codes still remain the optimal option, however, the optimal repair threshold is now shifted to τ=n1\tau^{*}=n-1. Note that at the high ρ\rho regime, all codes exhibit the same behavior. The average cost per unit of time becomes a decreasing function of τ\tau.

Finally, on the right yy-axis of the plots in Fig. 5, we show the MTTDL values for the given set of parameters. As expected, the MTTDL is an decreasing function of τ\tau due to the corresponding increase in departure rate from state τ\tau with the value of τ\tau. The MTTDL becomes impractical in the high ρ\rho regime, because nodes frequently leave area 𝒜\mathcal{A} before repairs can be completed.

VI Codes with Cooperative Repair

In the case of multiple node failures, regenerating the failed nodes individually is not optimal in terms of repair bandwidth. To regenerate multiple failed nodes more efficiently, the newcomers can also communicate with each other to lower the repair bandwidth, which is called cooperative repair. Specifically, the newcomer nodes communicate to not only the existing live nodes but also each of the other newcomers for regeneration. In this section, we analyze examples of such codes and their performance for the Markov-model that is described earlier.

VI-A Cooperative Regenerating Codes

When multiple nodes are to be repaired simultaneously, in addition to contacting live nodes and downloading symbols from those, newcomers can also communicate between each other to complete the recovery process. Formally, assume that tt nodes are to be repaired. Each of the tt newcomer nodes can contact dd live nodes and download β\beta symbols as well as download β\beta^{\prime} from each other. In this scenario, the repair bandwidth can be calculated as γ=dβ+(t1)β\gamma=d\beta+(t-1)\beta^{\prime}. Such codes are studied in [19] (referred to also as coordinated regenerating codes) and the tradeoff between per node storage α\alpha and repair bandwidth γ\gamma is analyzed. Two ends of tradeoff curve is named Minimum Storage Cooperative Regenerating (MSCR) and Minimum Bandwidth Cooperative Regenerating (MBCR). Accordingly, operating points are given as follows:

(αMSCR,βMSCR,βMSCR)=(k,k(dk+t),k(dk+t)).\left(\alpha_{\textrm{MSCR}},\beta_{\textrm{MSCR}},\beta_{\textrm{MSCR}}^{\prime}\right)=\left(\frac{\mathcal{M}}{k},\frac{\mathcal{M}}{k\left(d-k+t\right)},\frac{\mathcal{M}}{k\left(d-k+t\right)}\right). (18)

For MSCR codes, γMSCR=dβMSCR+(t1)βMSCR=(d+t1)k(dk+t)k\gamma_{\textrm{MSCR}}=d\beta_{\textrm{MSCR}}+(t-1)\beta_{\textrm{MSCR}}^{\prime}=\frac{\mathcal{M}(d+t-1)}{k\left(d-k+t\right)}\geq\frac{\mathcal{M}}{k}, where the per-node storage is smaller than the repair bandwidth. On the other hand, MBCR codes provide the minimum repair bandwidth which operates at:

(αMBCR,βMBCR,βMBCR)=((2d+t1)k(2dk+t),2k(2dk+t),k(2dk+t)).\left(\alpha_{\textrm{MBCR}},\beta_{\textrm{MBCR}},\beta_{\textrm{MBCR}}^{\prime}\right)=\left(\frac{(2d+t-1)\mathcal{M}}{k\left(2d-k+t\right)},\frac{2\mathcal{M}}{k\left(2d-k+t\right)},\frac{\mathcal{M}}{k\left(2d-k+t\right)}\right). (19)

Note that for MBCR codes, we have αMBCR=γMBCR=dβMBCR+(t1)βMBCR\alpha_{\textrm{MBCR}}=\gamma_{\textrm{MBCR}}=d\beta_{\textrm{MBCR}}+(t-1)\beta_{\textrm{MBCR}}^{\prime}.

We define rt(τ)r_{t}(\tau) as the average repair cost for a system with repair threshold τ\tau under cooperative repair using groups of nodes of size tt (similarly ct(τ)c_{t}(\tau) for the cost). Since nτn-\tau nodes need to be repaired, any cooperative regenerating codes with tt such that t|nτt|n-\tau can be used in practice. In the following proposition, we compare the performance of cooperative regenerating codes at all possible tt values to find the value of tt that minimizes the average repair cost.

Proposition 7.

The average repair cost of cooperative repair is a monotonically decreasing function of the cooperation group size tt. That is, for two cooperation groups t1t_{1} and t2t_{2}, with t1|nτt_{1}|n-\tau and t2|nτt_{2}|n-\tau and t1<t2t_{1}<t_{2}, it follows that rt1(τ)>rt2(τ)r_{t_{1}}(\tau)>r_{t_{2}}(\tau).

Proof.

Since in both scenarios, repairs are performed after nτn-\tau node departures and node repairs are performed parallel, it’s enough to compare only the required bandwidths. First, assume MSCR case, then we want to show that

(d+t11)(nτ)k(dk+t1)>(d+t21)(nτ)k(dk+t2),\frac{\mathcal{M}(d+t_{1}-1)(n-\tau)}{k(d-k+t_{1})}>\frac{\mathcal{M}(d+t_{2}-1)(n-\tau)}{k(d-k+t_{2})}, (20)

which is equivalent to

(t2t1)(k1)>0.(t_{2}-t_{1})(k-1)>0. (21)

Since t2>t1t_{2}>t_{1} and we can conclude that ct1(τ)>ct2(τ)c_{t_{1}}(\tau)>c_{t_{2}}(\tau) therefore rt1(τ)>rt2(τ)r_{t_{1}}(\tau)>r_{t_{2}}(\tau). Similarly, for MBCR case, we need to have

(2d+t11)(nτ)k(2dk+t1)>(2d+t21)(nτ)k(2dk+t2),\frac{\mathcal{M}(2d+t_{1}-1)(n-\tau)}{k(2d-k+t_{1})}>\frac{\mathcal{M}(2d+t_{2}-1)(n-\tau)}{k(2d-k+t_{2})}, (22)

from which we can obtain the same condition as (21). Henceforth, ct1(τ)>ct2(τ)c_{t_{1}}(\tau)>c_{t_{2}}(\tau) and rt1(τ)>rt2(τ)r_{t_{1}}(\tau)>r_{t_{2}}(\tau). Combining MSCR and MBCR cases, we can conclude that rt1(τ)>rt2(τ)r_{t_{1}}(\tau)>r_{t_{2}}(\tau). ∎

Remark 1.

As a result of the above proposition, one can minimize the average repair cost by performing cooperative repairs with t=nτt=n-\tau. In other words, for the nτn-\tau nodes that are to be repaired, the optimal cooperative regenerating code is with nτn-\tau, all nodes should cooperate at the same time.

In Fig. 6, we show the average repair cost for cooperative regenerating codes at all possible tt values for a given nτn-\tau. We observe that for the same nτn-\tau, if t1<t2t_{1}<t_{2}, then rt1(τ)>rt2(τ)r_{t_{1}}(\tau)>r_{t_{2}}(\tau) and the minimum is achieved when t=nτt=n-\tau.

In the remaining of this section, we suppress the subindex tt from rt(τ)r_{t}(\tau) since we established that t=nτt=n-\tau minimizes the cost, i.e., r(τ)=rnτ(τ)r(\tau)=r_{n-\tau}(\tau) and c(τ)=cnτ(τ)c(\tau)=c_{n-\tau}(\tau). However, we may still need to distinguish γ\gamma and α\alpha values under different cooperative regenerating codes. We denote the per-node storage for cooperative repairs with nτn-\tau, which results in the minimum average repair cost for the system with threshold τ\tau, by ατ\alpha_{\tau}. Similarly we use γτ\gamma_{\tau} to denote the repair bandwidth at τ\tau.

Refer to caption Refer to caption
(a) (b)
Figure 6: Cost r(τ)r(\tau) vs. number of nodes to be repaired (nτn-\tau) for: (a) MSCR, (b) MBCR.

Note that, cooperative regenerating codes, it is required that d+nτnd+n-\tau\leq n. In other words, there should be at least dd live nodes when repairs are initiated. Otherwise, it is not possible to regenerate nτn-\tau nodes from d live nodes. Henceforth, the repair cost c(τ)c(\tau) and the repair cost per time for cooperative codes are as follows:

c(τ)=γτ(nτ),r(τ)=c(τ)E[Δ]=λμ(γτ(nτ))μHn,τ+λ, if τd.c(\tau)=\gamma_{\tau}(n-\tau),\quad r(\tau)=\frac{c(\tau)}{\textrm{E}[\Delta]}=\frac{\lambda\mu(\gamma_{\tau}(n-\tau))}{\mu H_{n,\tau}+\lambda},\quad\mbox{ if }\tau\geq d. (23)

The minimum r(τ)r(\tau) with respect to τ\tau does not have a closed-form analytical expression. In Section VI-C, we present numerical results to study the change of r(τ)r(\tau) with τ\tau and determine the optimal repair threshold τ\tau that minimizes r(τ)r(\tau) for distributed cooperative repair.

VI-B Centralized Repair of Multiple Node Failures

Centralized repair of multiple node repairs is introduced in [22]. Using this model, a dedicated node among the tt newcomers downloads β\beta from any dd live nodes such that it can repair multiple node failures of size tt. Such codes can be used in the centralized repair process that is proposed in Section IV when we set t=nτt=n-\tau. Rawat et al. in [22] characterize the tradeoff between per-node storage and repair bandwidth for this centralized repair model. Accordingly, the following operation points are derived for minimum storage multi-node regeneration (MSMR) and minimum bandwidth multi-node regeneration (MBMR):

(αMSMR,γMSMR)=(k,d(nτ)k(dk+nτ)).\left(\alpha_{\textrm{MSMR}},\gamma_{\textrm{MSMR}}\right)=\left(\frac{\mathcal{M}}{k},\frac{\mathcal{M}d(n-\tau)}{k\left(d-k+n-\tau\right)}\right). (24)

Let k mod(nτ)=bk\textrm{ mod}(n-\tau)=b. If Hb(βnτ)[b(2d+nτ12)(b2)]H_{b}\geq\binom{\beta}{n-\tau}\left[b(\frac{2d+n-\tau-1}{2})-\binom{b}{2}\right] (where HbH_{b} denotes entropy of information stored on bb nodes), then

(αMBMR,γMBMR)=(2dk(2dk+nτ),2d(nτ)k(2dk+nτ)).\left(\alpha_{\textrm{MBMR}},\gamma_{\textrm{MBMR}}\right)=\left(\frac{\mathcal{M}2d}{k\left(2d-k+n-\tau\right)},\frac{\mathcal{M}2d(n-\tau)}{k\left(2d-k+n-\tau\right)}\right). (25)

Under centralized repair model discussed here, a dedicated node first downloads γ=dβ\gamma=d\beta and then distributes α\alpha to remaining nτ1n-\tau-1. The difference between these codes and the earlier proposed method for centralized repair in Section IV-B is that the dedicated node may not need to download the whole file. Therefore, we have the following repair cost

cC(τ)=γ+α(nτ1),c_{C}(\tau)=\gamma+\alpha(n-\tau-1), (26)

from which one can obtain

rC(τ)=cC(τ)E[Δ]=λμ(γ+α(nτ1))μHn,τ+λ.r_{C}(\tau)=\frac{c_{C}(\tau)}{\textrm{E}[\Delta]}=\frac{\lambda\mu(\gamma+\alpha(n-\tau-1))}{\mu H_{n,\tau}+\lambda}. (27)

In order to find the optimal threshold that minimizes the average repair cost, we need to find the minimum value of rC(τ)r_{C}(\tau). We can replace Hn,τH_{n,\tau} with its approximation, ln(nτ)\ln(\frac{n}{\tau}), and take the derivative with respect to τ\tau. Note that both γ\gamma and α\alpha depend on τ\tau and there is no tractable analytical solution for τ\tau that minimizes rC(τ)r_{C}(\tau). However, we can still analyze (27) numerically with respect to τ\tau and observe the optimal threshold from numerical results.

Remark 2.

In this section, we analyzed different cooperative codes that are suitable for mobile clouds. For both scenarios, the problem of finding τ\tau for which r(τ)r(\tau) is minimized does not have a closed-form solution due to the dependence of α\alpha and γ\gamma on τ\tau. We, therefore, resort to the numerical analysis of the optimal threshold. Next, we present numerical results instead, which are presented below. Note that, for the regenerating codes that were analyzed in Section V, α\alpha and γ\gamma do not depend on the threshold τ\tau.

VI-C Numerical Results

We study the performance of cooperative codes with n=30,d=25n=30,d=25 and k=19k=19 under different ρ\rho regimes. In Fig. 7, we compare the codes studied in Sections IV and VI for different ρ\rho regimes. We first compare regenerating codes vs. cooperative regenerating codes for the distributed repair scenario. Note that we focus only on dτn1d\leq\tau\leq n-1 because at least dd live nodes must exist for cooperation (see Section VI-A). We observe that cooperative regenerating codes always have lower cost than regenerating codes for all values of ρ\rho. Additionally, the gap between the cost of D-MBR and D-MBCR is much smaller than the gap between the cost of D-MSR and D-MSCR. Furthermore, we can observe two opposing regimes: In Fig. 7(a), the optimal cost is at τ=d\tau=d, whereas in Fig. 7(b), the cost is minimized at τ=n1\tau=n-1. We also compare the centralized regenerating codes to the centralized repair of multiple node departures. As expected, since in the latter scheme one does not need the whole file for file reconstruction at the dedicated node, centralized repair of multiple node departures results in lower repair cost. At τ=n1\tau=n-1, in Fig. 7(d) average repair cost is minimized for all schemes, on the other hand we observe different optimum τ\tau values for different coding schemes in Fig. 7(c). Finally, we compare all schemes in Fig. 7(e)-(f) for different values of ρ\rho for completeness. It is observed that the centralized repair of multiple node departures model discussed in this section approaches to the distributed repair model in Section IV as τ\tau approaches nn and diverges from the centralized repair model in Section IV. The reason for this behavior is that the dedicated node does not need to download the whole file now (as opposed to the centralized repair model in Section IV, which incurs high average repair cost for large τ\tau).

Refer to caption Refer to caption
(a) (b)
Refer to caption Refer to caption
(c) (d)
Refer to caption Refer to caption
(e) (f)
Figure 7: Cost r(τ)r(\tau) vs. repair threshold (τ\tau) for: (a) distributed regenerating codes vs. cooperative regenerating codes when ρ=0.0001\rho=0.0001, (b) distributed regenerating codes vs. cooperative regenerating codes when ρ=1\rho=1 (c) centralized regenerating codes vs. centralized repair of multiple node failures when ρ=0.0001\rho=0.0001, (d) centralized regenerating codes vs. centralized repair of multiple node failures when ρ=1\rho=1, (e) all schemes when ρ=0.01\rho=0.01, (f) all schemes when ρ=0.1\rho=0.1.

VII A Repair Process Analogous to the number of repaired nodes

In the analysis presented in Sections V-VI, we have assumed that the repair time is exponentially distributed with parameter μ\mu, irrespective of the number of nodes to be repaired. This model is mathematically tractable and we are able to find analytical results on the optimal repair threshold. In this section, we consider a revised model in which the repair time is analogous to the number of nodes that need to be repaired. Specifically, we model the repair process as the maximum of nτn-\tau exponential random variables, each with rate μ\mu. In other words, when the repair process is initiated, one can consider starting nτn-\tau exponential clocks, each with rate μ\mu. The repair process ends when all the clocks end. We note that the maximum value of such clocks is not exponentially distributed (as opposed to the minimum of such clocks), however, its expected value is known, which is enough for the purpose of finding average repair cost. Let TirT_{i}^{r} denote the repair time of ithi^{\textrm{th}} newcomer node, then we have the following [26]

E[max(T1r,,Tnτr)]=i=1nτ1iμ=Hnτ,0μ.\textrm{E}[\max{(T_{1}^{r},\dots,T_{n-\tau}^{r})}]=\sum_{i=1}^{n-\tau}\frac{1}{i\mu}=\frac{H_{n-\tau,0}}{\mu}. (28)

The expected time between two instances of fully operational system with nn live nodes is given by

E[Δ]=Hn,τλ+Hnτ,0μ,\textrm{E}[\Delta]=\frac{H_{n,\tau}}{\lambda}+\frac{H_{n-\tau,0}}{\mu}, (29)

where the first term is the expected time from state nn to state τ\tau, and the second term is the expected time from state τ\tau back to state nn. Accordingly, the resulting average repair cost for the distributed repair case is

rD(τ)=cD(τ)E[Δ]={λμ(kα(dτ)+γ(nd))μHn,τ+λHnτ,0,if τ<dλμ(γ(nτ))μHn,τ+λHnτ,0,if τd.r_{D}(\tau)=\frac{c_{D}(\tau)}{\textrm{E}[\Delta]}=\begin{cases}\frac{\lambda\mu(k\alpha(d-\tau)+\gamma(n-d))}{\mu H_{n,\tau}+\lambda H_{n-\tau,0}},&\textrm{if }\tau<d\\ \frac{\lambda\mu(\gamma(n-\tau))}{\mu H_{n,\tau}+\lambda H_{n-\tau,0}},&\textrm{if }\tau\geq d.\\ \end{cases} (30)

Note that for centralized repair, a dedicated newcomer node first downloads the file, and then distributes symbols to the remaining nτ1n-\tau-1 newcomer nodes. Therefore, the expected repair time is given by 1μ+Hnτ1μ\frac{1}{\mu}+\frac{H_{n-\tau-1}}{\mu}, where we have first one clock with exponential rate of μ\mu, followed by a maximum of nτ1n-\tau-1 clocks with rate μ\mu. Accordingly, we obtain

rC(τ)=cC(τ)E[Δ]=λμα(k+nτ1)μHn,τ+λ(1+Hnτ1,0).r_{C}(\tau)=\frac{c_{C}(\tau)}{\textrm{E}[\Delta]}=\frac{\lambda\mu\alpha(k+n-\tau-1)}{\mu H_{n,\tau}+\lambda(1+H_{n-\tau-1,0})}. (31)

The optimal τ\tau which minimizes the above equation is difficult to track due to the complexity of the formula (due to λH\lambda H in the denominator). Instead, we perform numerical analysis of the average repair cost with respect to the threshold later in this section.

In the context of this model, we next focus on MTTDL. Note that, if we start (nτ)(n-\tau) clocks, the probability that no data loss occurs within a cycle, denoted by 1p1-p, can be calculated as 1p=Pr(Tτ1>Tir,i1,,nτ)1-p=\Pr(T_{\tau-1}>T_{i}^{r},\forall i\in 1,\dots,n-\tau). In other words, the exponential random variable with rate τλ\tau\lambda should be greater than all nτn-\tau exponential random variables with rate μ\mu. Since we have i.i.d. exponential random variables, 1p=(Pr(Tτ1>T1r))(nτ)=(μτλ+μ)(nτ)1-p=(\Pr(T_{\tau-1}>T_{1}^{r}))^{(n-\tau)}=(\frac{\mu}{\tau\lambda+\mu})^{(n-\tau)}. Accordingly, we have

MTTDL=i=1(iHn,τλ+(i1)Hnτ,0μ+Hτ,k1λ)(1p)(i1)p,\textrm{MTTDL}=\sum_{i=1}^{\infty}\Big{(}\frac{iH_{n,\tau}}{\lambda}+\frac{(i-1)H_{n-\tau,0}}{\mu}+\frac{H_{\tau,k-1}}{\lambda}\Big{)}(1-p)^{(i-1)}p, (32)

where p=1(μτλ+μ)(nτ)p=1-(\frac{\mu}{\tau\lambda+\mu})^{(n-\tau)}. Note that the above equation is for the calculation of MTTDL for distributed repair. For centralized repair, the random variable with rate τλ\tau\lambda should be larger than sum of two exponential random variables with rate μ\mu, which is a gamma distribution since first a dedicated node downloads the whole file and then it repairs the other nodes. Henceforth, we did not perform MTTDL analysis for centralized repair. 222The resulting equation is not in compact form, thus we omit this analysis in this text.

In Fig. 8, we compare how the revised model affects the average repair cost relative to the simplified repair model used in Section IV, in which all nodes are repaired under the same clock. We denote the values calculated within this section by appending τ\tau at the end, i.e., D-MBR-τ\textrm{D-MBR-}\tau, to specify that the repair process that takes into account the number of nodes to be repaired (i.e., nτn-\tau). It can be observed that changing the model does not affect the behavior of the r(τ)r(\tau) curves substantially. We observe in the modified model that average cost is decreased slightly. Even though we have the same costs in both cases, the expected times to complete the repair process are different. Specifically, in Sections IV and V, it takes 1μ\frac{1}{\mu} time to finish the repair process. On the other hand, in the modified model, we change this value to maximum of nτn-\tau exponential random variables, each with mean 1μ\frac{1}{\mu} and this maximum value is larger than 1μ\frac{1}{\mu} (unless τ=n1\tau=n-1). Therefore, it takes longer to complete repairs in the modified model, which results in smaller values of average repair cost. On the other hand, in Fig. 9, a different behavior is observed for the MTTDL. In the low ρ\rho regime, the MTTDL decreases with τ\tau for both single clock and the maximum of multiple clock models. However, in the high ρ\rho regime, the increase in τ\tau decreases MTTDL for the single clock model, whereas the MTTDL for the multiple clocks model increases with τ\tau. This is because in (32), pp converges to 1 as we decrease τ\tau in the high ρ\rho regime, which reduces (32). On the other hand, in the low ρ\rho regime, pp converges to zero as we increase τ\tau, which reduces (32). Finally, the model discussed in this section results in lower MTTDL values compared to the previous one.

Refer to caption Refer to caption
(a) (b)
Figure 8: Cost r(τ)r(\tau) vs repair threshold (τ)(\tau) for: (a) ρ=0.01\rho=0.01, (b) ρ=1\rho=1.
Refer to caption Refer to caption Refer to caption
(a) (b) (c)
Figure 9: Mean time to data loss vs repair threshold (τ)(\tau) for: (a) ρ=0.004\rho=0.004, (b) ρ=0.1\rho=0.1, (c) ρ=1\rho=1.

VIII Allowing Node Departures within the Repair Process

Up to this point, we have assumed that once the repair process is started, no live nodes depart from 𝒜\mathcal{A} until the repair is completed. In this section, we analyze the case in which additional node departures are allowed within repair process. Fig. 10 shows the revised CTMC model that accounts for departures during the repair process. The chain consists of two sets of states. In the first row, states represent the phase where nodes depart but no repairs are initiated. Once state τ\tau is reached, repairs are initiated and the chain transitions into the second row of states where departures may occur while repairs are performed. We focus on the case where no data loss occurs as we are interested in the system dynamics, while the system remains operational.

Once the repair process is initiated, nτn-\tau nodes are to be repaired. Since we assume an exponential random variable for repair times (with rate μ\mu), a newcomer is repaired after the minimum of the nτn-\tau exponential random variables, which is also an exponential random variable with rate (nτ)μ(n-\tau)\mu. Due to the memoryless property of the exponential random variable, we can perform the same procedure for the second repair and so on. The corresponding rates are depicted on the second row of states of Fig. 10. Note that if no departures occur during the repair process, the expected repair time would be the same as in the model of Section VII, that is, the maximum of nτn-\tau exponential random variables with rate μ\mu.

Refer to caption
Figure 10: Markov chain for a threshold-based file maintenance.

In such a model, the expected number of node repairs is larger than nτn-\tau due to the possible additional departures during the repair process. In the section, we analyze the system under the condition that the CTMC always chooses the transition ττ+1\tau\rightarrow\tau+1 when in the lower set of states so that all nodes are repaired eventually. Otherwise, the system would suffer from data loss. To find the average repair cost, we are interested in two statistics of the CTMC once it reaches state τ\tau for the first time: i) the total number of lower arc transitions before reaching state nn, i.e., ττ+1,n2n1\tau\rightarrow\tau+1,n-2\rightarrow n-1, which will determine the number of node repairs, ii) the expected total time for reaching state nn from state τ\tau. For simplicity, the states n1,,τ+1n-1,\dots,\tau+1 can be ignored for now since they do not affect any of these two statistics. We are also interested in the number of times the chain revisits state τ\tau before reaching state nn since that will determine the probability of no data loss.

Total number of revisits to state τ\tau: Since we are interested in the case where no data loss occurs, we need to find the number of times the chain revisits state τ\tau. This is equivalent to transitioning from state τ\tau to τ+1\tau+1 at each revisit to state τ\tau, we need the transition ττ+1\tau\rightarrow\tau+1 at each revisit to state τ\tau, which occurs with probability (nτ)μτλ+(nτ)μ\frac{(n-\tau)\mu}{\tau\lambda+(n-\tau)\mu}. For the transitions in the lower row of the CTMC, denote by XjrX^{r}_{j}, the total number of revisits to state τ\tau before reaching state nn at state jj. Then, we can state the following balance equations.

Xn1r\displaystyle X^{r}_{n-1} =Xn2r(n1)λ(n1)λ+μ,\displaystyle=X^{r}_{n-2}\frac{(n-1)\lambda}{(n-1)\lambda+\mu}, (33)
Xn2r\displaystyle X^{r}_{n-2} =Xn1r2μ(n2)λ+2μ+Xn3r(n2)λ(n2)λ+2μ,\displaystyle=X^{r}_{n-1}\frac{2\mu}{(n-2)\lambda+2\mu}+X^{r}_{n-3}\frac{(n-2)\lambda}{(n-2)\lambda+2\mu}, (34)
\displaystyle\vdots (35)
Xτ+2r\displaystyle X^{r}_{\tau+2} =Xτ+3r(nτ2)μ(τ+2)λ+(nτ2)μ+Xτ+1r(τ+2)λ(τ+2)λ+(nτ2)μ,\displaystyle=X^{r}_{\tau+3}\frac{(n-\tau-2)\mu}{(\tau+2)\lambda+(n-\tau-2)\mu}+X^{r}_{\tau+1}\frac{(\tau+2)\lambda}{(\tau+2)\lambda+(n-\tau-2)\mu}, (36)
Xτ+1r\displaystyle X^{r}_{\tau+1} =Xτ+2r(nτ1)μ(τ+1)λ+(nτ1)μ+(1+Xτr)(τ+1)λ(τ+1)λ+(nτ1)μ,\displaystyle=X^{r}_{\tau+2}\frac{(n-\tau-1)\mu}{(\tau+1)\lambda+(n-\tau-1)\mu}+(1+X^{r}_{\tau})\frac{(\tau+1)\lambda}{(\tau+1)\lambda+(n-\tau-1)\mu}, (37)
Xτr\displaystyle X^{r}_{\tau} =Xτ+1r.\displaystyle=X^{r}_{\tau+1}. (38)

The set of equations (33)-(38) can be recursively solved for XτrX^{r}_{\tau}. Then, the probability that no data loss occurs is ((nτ)μτλ+(nτ)μ)1+Xτr(\frac{(n-\tau)\mu}{\tau\lambda+(n-\tau)\mu})^{1+X^{r}_{\tau}} for one cycle of node repairs.

Total number of lower arc transitions: For the transitions of the lower row of the CTMC, denote by XjlX^{l}_{j}, the total number of lower arc transitions at state jj, then we have the following equations.

Xn1l\displaystyle X^{l}_{n-1} =μ(n1)λ+μ+Xn2l(n1)λ(n1)λ+μ,\displaystyle=\frac{\mu}{(n-1)\lambda+\mu}+X^{l}_{n-2}\frac{(n-1)\lambda}{(n-1)\lambda+\mu}, (39)
Xn2l\displaystyle X^{l}_{n-2} =(1+Xn1l)2μ(n2)λ+2μ+Xn3l(n2)λ(n2)λ+2μ,\displaystyle=(1+X^{l}_{n-1})\frac{2\mu}{(n-2)\lambda+2\mu}+X^{l}_{n-3}\frac{(n-2)\lambda}{(n-2)\lambda+2\mu}, (40)
\displaystyle\vdots (41)
Xτ+1l\displaystyle X^{l}_{\tau+1} =(1+Xτ+2l)(nτ1)μ(τ+1)λ+(nτ1)μ+Xτl(τ+1)λ(τ+1)λ+(nτ1)μ,\displaystyle=(1+X^{l}_{\tau+2})\frac{(n-\tau-1)\mu}{(\tau+1)\lambda+(n-\tau-1)\mu}+X^{l}_{\tau}\frac{(\tau+1)\lambda}{(\tau+1)\lambda+(n-\tau-1)\mu}, (42)
Xτl\displaystyle X^{l}_{\tau} =1+Xτ+1l.\displaystyle=1+X^{l}_{\tau+1}. (43)

Finding the total number of lower arc transitions is not enough to calculate the average repair cost per time since not all repairs have the same cost in some repair strategies. That is, if τ<d\tau<d, then some nodes are repaired by downloading kαk\alpha symbols, whereas the remaining nodes are repaired by downloading dβd\beta. To find the number of lower arc transitions which occur between states τ\tau and dd (which are repaired by downloading kαk\alpha), we denote by YjlY^{l}_{j} the number of lower arc transitions between states τ\tau and dd at state jj. Then,

Yn1l\displaystyle Y^{l}_{n-1} =Yn2l(n1)λ(n1)λ+μ\displaystyle=Y^{l}_{n-2}\frac{(n-1)\lambda}{(n-1)\lambda+\mu} (44)
Yn2l\displaystyle Y^{l}_{n-2} =Yn1l2μ(n2)λ+2μ+Yn3l(n2)λ(n2)λ+2μ,\displaystyle=Y^{l}_{n-1}\frac{2\mu}{(n-2)\lambda+2\mu}+Y^{l}_{n-3}\frac{(n-2)\lambda}{(n-2)\lambda+2\mu}, (45)
\displaystyle\vdots (46)
Ydl\displaystyle Y^{l}_{d} =Yd+1l(nd)μdλ+(nd)μ+Yd1ldλdλ+(nd)μ,\displaystyle=Y^{l}_{d+1}\frac{(n-d)\mu}{d\lambda+(n-d)\mu}+Y^{l}_{d-1}\frac{d\lambda}{d\lambda+(n-d)\mu}, (47)
Yd1l\displaystyle Y^{l}_{d-1} =(1+Ydl)(nd+1)μ(d1)λ+(nd+1)μ+Yd2l(d1)λ(d1)λ+(nd+1)μ,\displaystyle=(1+Y^{l}_{d})\frac{(n-d+1)\mu}{(d-1)\lambda+(n-d+1)\mu}+Y^{l}_{d-2}\frac{(d-1)\lambda}{(d-1)\lambda+(n-d+1)\mu}, (48)
\displaystyle\vdots (49)
Yτ+1l\displaystyle Y^{l}_{\tau+1} =(1+Yτ+2l)(nτ1)μ(τ+1)λ+(nτ1)μ+Yτl(τ+1)λ(τ+1)λ+(nτ1)μ,\displaystyle=(1+Y^{l}_{\tau+2})\frac{(n-\tau-1)\mu}{(\tau+1)\lambda+(n-\tau-1)\mu}+Y^{l}_{\tau}\frac{(\tau+1)\lambda}{(\tau+1)\lambda+(n-\tau-1)\mu}, (50)
Yτl\displaystyle Y^{l}_{\tau} =1+Yτ+1l.\displaystyle=1+Y^{l}_{\tau+1}. (51)

If τd\tau\geq d, there is no need to find YτlY^{l}_{\tau} since all nodes download dβd\beta and there are XτlX^{l}_{\tau} node repairs in total whereas if τ<d\tau<d, then YτlY^{l}_{\tau} repairs are performed by downloading kαk\alpha symbols and XτlYτlX^{l}_{\tau}-Y^{l}_{\tau} node repairs are performed by downloading dβd\beta symbols.

Expected total time before reaching state nn: For the transitions of the lower row of the CTMC, denote by XjtX^{t}_{j}, the time it takes to reach state nn from state jj. Then, the balance equations for the CTMC for XjtX^{t}_{j} can be written as

Xn1t\displaystyle X^{t}_{n-1} =1(n1)λ+μ+Xn2t(n1)λ(n1)λ+μ,\displaystyle=\frac{1}{(n-1)\lambda+\mu}+X^{t}_{n-2}\frac{(n-1)\lambda}{(n-1)\lambda+\mu}, (52)
Xn2t\displaystyle X^{t}_{n-2} =1(n2)λ+2μ+Xn1t2μ(n2)λ+2μ+Xn3t(n2)λ(n2)λ+2μ,\displaystyle=\frac{1}{(n-2)\lambda+2\mu}+X^{t}_{n-1}\frac{2\mu}{(n-2)\lambda+2\mu}+X^{t}_{n-3}\frac{(n-2)\lambda}{(n-2)\lambda+2\mu}, (53)
\displaystyle\vdots (54)
Xτ+1t\displaystyle X^{t}_{\tau+1} =1(τ+1)λ+(nτ1)μ+Xτ+2t(nτ1)μ(τ+1)λ+(nτ1)μ+Xτt(τ+1)λ(τ+1)λ+(nτ1)μ.\displaystyle=\frac{1}{(\tau+1)\lambda+(n-\tau-1)\mu}+X^{t}_{\tau+2}\frac{(n-\tau-1)\mu}{(\tau+1)\lambda+(n-\tau-1)\mu}+X^{t}_{\tau}\frac{(\tau+1)\lambda}{(\tau+1)\lambda+(n-\tau-1)\mu}. (55)
Xτt\displaystyle X^{t}_{\tau} =1(nτ)μ+Xτ+1t.\displaystyle=\frac{1}{(n-\tau)\mu}+X^{t}_{\tau+1}. (56)

Using (52)-(56), we can solve for XτtX^{t}_{\tau} which is the time it takes to repair to a fully operational system with nn live nodes from state τ\tau, when departures occur during the repair process. The initial state for the system is nn and therefore the time to revisit state nn is Xτt+i=τ+1n1iλX^{t}_{\tau}+\sum_{i=\tau+1}^{n}\frac{1}{i\lambda}.

This yields an average cost per time equal to

rD(τ|no data loss occurs)=cD(τ|no data loss occurs)E[Δ|no data loss occurs]={Yτlkα+(XτlYτl)dβXτt+i=τ+1n1iλ,if τ<dXτldβXτt+i=τ+1n1iλ,if τd.r_{D}(\tau|\textrm{no data loss occurs})=\frac{c_{D}(\tau|\textrm{no data loss occurs})}{\textrm{E}[\Delta|\textrm{no data loss occurs}]}=\begin{cases}\frac{Y^{l}_{\tau}k\alpha+(X^{l}_{\tau}-Y^{l}_{\tau})d\beta}{X^{t}_{\tau}+\sum_{i=\tau+1}^{n}\frac{1}{i\lambda}},&\textrm{if }\tau<d\\ \frac{X^{l}_{\tau}d\beta}{X^{t}_{\tau}+\sum_{i=\tau+1}^{n}\frac{1}{i\lambda}},&\textrm{if }\tau\geq d.\\ \end{cases} (57)

and a probability of no data loss equal to ((nτ)μτλ+(nτ)μ)1+Xτr(\frac{(n-\tau)\mu}{\tau\lambda+(n-\tau)\mu})^{1+X^{r}_{\tau}}.

VIII-A Numerical Results

We have performed simulations to verify our findings. In the following example, we examine the case where n=30n=30, d=27d=27, k=20k=20, μ=10\mu=10. Different λ\lambda values are used, λ=[0.1,0.2,0.4]\lambda=[0.1,0.2,0.4], as well as different τ\tau values, τ=[25,27]\tau=[25,27]. Simulation results are the average of one million simulations and they are presented in Table VI. Each table entry notes the value obtained from the simulation or the value obtained by analytically evaluation the average repair cost via (57): the first shows the simulation results (S) and the other represents the analytical result (A) as shown before. As expected, increasing λ\lambda results in more revisits to state τ\tau due to an increase in the node departure rate. Furthermore, we see that expected time before reaching state nn decreases as we increase λ\lambda for both cases of τ=25\tau=25 and τ=27\tau=27. For both cases, we observe that the number of nodes repaired by downloading dβd\beta remains the same for a given value of λ\lambda. This is because the critical number of live nodes for a node to be repaired by downloading dβd\beta symbols is at d=27d=27, since if there are less than dd live nodes, then a node must be repaired by downloading kαk\alpha symbols. In other words, once we reach state dd (in the lower row) of the CTMC, we count the number of lower arc transitions between the states dd and nn to calculate the number of node repairs by downloading dβd\beta symbols, which remains the same for τ=25\tau=25 and τ=27\tau=27, since τ\tau is not between dd and nn. Finally, the number of nodes repaired by downloading kαk\alpha increases with λ\lambda as expected. We can observe that simulation results verify our analytical findings.

TABLE II: Numerical results
TABLE III: Total number of revisits to state τ\tau
λ\lambda
0.1 0.2 0.4
S A S A S A
τ\tau 25 1.0718 1.0719 1.1633 1.1638 1.4660 1.4668
27 1.1806 1.1806 1.4439 1.4424 2.2118 2.2096
TABLE IV: Expected total time before reaching state nn
λ\lambda
0.1 0.2 0.4
S A S A S A
τ\tau 25 2.0438 2.0432 1.1770 1.1770 0.8040 0.8034
27 1.2404 1.2392 0.7458 0.7447 0.5402 0.5405
TABLE V: Number of node repairs by downloading dβd\beta
λ\lambda
0.1 0.2 0.4
S A S A S A
τ\tau 25 3.4703 3.4706 4.0263 4.0224 5.3702 5.3696
27 3.4715 3.4706 4.0237 4.0224 5.3727 5.3696
TABLE VI: Number of node repairs by downloading kαk\alpha
λ\lambda
0.1 0.2 0.4
S A S A S A
τ\tau 25 2.1784 2.1782 2.4228 2.4234 3.2620 3.2623
27 0 0 0 0 0 0

In Fig. 11, we compare our previous schemes, namely the distributed repair model in Section IV and the model in Section VII, with the repair model discussed in this section, which is depicted in the figure with D-MBR-F and D-MSR-F to specify that these codes allow failures within repair process. In the low ρ\rho regime, we observe that there is almost no difference between the performance of models in both MSR and MBR cases. This is because for low ρ\rho, the expected number of additional departures during repair is low and the expected time is dominated by terms with λ\lambda (the upper transition in the CTMC model of Fig. 10, which is the same as the CTMC model of Fig. 4). In the high ρ\rho regime, differences are observed in the expected average cost per time. Interestingly, when ρ=0.1\rho=0.1, it can be observed that for τd1\tau\geq d-1, D-MSR-F and D-MBR-F have the highest cost respectively for MSR and MBR cases, whereas for τ<d1\tau<d-1, they are in between the D-MSR and D-MBR. As we keep increasing ρ\rho, we observe that D-MSR-F and D-MBR-F becomes even more costly compared to other schemes. In all cases, our model in Section VII has the lowest r(τ)r(\tau) respectively for MSR and MBR cases. These observations validate that our model in Section IV (that does not have dependency of repair process on the number of nodes to be repaired and neglect failures during repair) can be utilized as an approximate model for the models we consider later in the text in the low ρ\rho regime. Therefore, in the low ρ\rho regime, all the optimal threshold statements for the former model (i.e., Proposition 1, Proposition 2) also hold for the model considered in Sections VII and VIII. Note that, the low ρ\rho regime is the only interesting case for mobile cloud storage. At high λ\lambda, the average repair cost and MTTDL performance become prohibitively high and low, respectively, for the system to be viable.

Refer to caption Refer to caption Refer to caption
(a) (b) (c)
Figure 11: Cost r(τ)r(\tau) vs repair threshold (τ)(\tau) for: (a) ρ=0.004\rho=0.004, (b) ρ=0.1\rho=0.1, (c) ρ=1\rho=1.

IX Conclusion and Future Work

We analyzed threshold-based repair strategies for maintaining files in mobile cloud storage systems. We derived the optimal repair thresholds for both distributed and centralized repair schemes under fragment regeneration and/or reconstruction. Our results showed that optimal thresholds are dependent on system configurations, the underlying code parameters and mobility-to-repair rate ratio. For high mobility-to-repair scenarios, eager repair minimizes the average repair cost per unit of time. Under low mobility-to-repair ratio, lazy repair is optimal in terms of average repair cost. We investigated codes that perform repair through cooperation. We showed that similar to regenerating codes, one can derive optimal thresholds for cooperative regenerating codes. We also investigated the case when the repair process depends on the number of nodes under repair. Finally, we analyzed the case where we lift the restriction that once the repair process is initiated, no more departures occur. We derived set of linear equations to calculate repair cost, which is verified by simulations. We then showed that the initial fixed-rate repair model, which was simple enough to track analytically, is a good approximation of the complex model in the low ρ\rho regime, which is of interest. This allows us to use the optimal threshold results as well as other results we had from the simpler model.

As part of future work, we plan to consider a more advanced repair model in which fragment repairs occur under a fixed bandwidth constraint. This assumption makes the repair rate μ\mu dependent on the repair threshold τ\tau. Finally, generalizing the model to the case where repairs are initiated at every state with some probability and studying the cost vs. MTTDL tradeoff under this model is an interesting avenue for further research.

References

  • [1] N. Golrezaei, A. G. Dimakis, and A. F. Molisch, “Device-to-device collaboration through distributed storage,” in Proc. of the GLOBECOM Conference, 2012.
  • [2] J. Pääkkönen, C. Hollanti, and O. Tirkkonen, “Device-to-device data storage for mobile cellular systems,” in Proc. of the GLOBECOM Workshops, 2013.
  • [3] N. Golrezaei, A. G. Dimakis, and A. F. Molisch, “Scaling behavior for device-to-device communications with distributed caching,” IEEE Trans. on Information Theory, vol. 60, no. 7, pp. 4286–4298, 2014.
  • [4] R. Bhagwan, K. Tati, Y.-C. Cheng, S. Savage, and G. M. Voelker, “Total recall: system support for automated availability management.” in Proc. of the NSDI Conference, 2004.
  • [5] F. Dabek, J. Li, E. Sit, J. Robertson, M. F. Kaashoek, and R. Morris, “Designing a DHT for low latency and high throughput,” in Proc. of the NDSI Symposium, 2004.
  • [6] Y. Hu, Y. Xu, X. Wang, C. Zhan, and P. Li, “Cooperative recovery of distributed storage systems from multiple losses with network coding,” IEEE Journal on Selected Areas in Communications, vol. 28, no. 2, pp. 268–276, 2010.
  • [7] H. Weatherspoon and J. D. Kubiatowics, “Erasure coding vs. replication: A quantitive comparison,” in Proc. of the 1st International Workshop on Peer-to-Peer Systems, 2002.
  • [8] F. Giroire, J. Monteiro, and S. Pérennes, “Peer-to-peer storage systems: a practical guideline to be lazy,” in Proc. of the GLOBECOM Conference, 2010.
  • [9] A. G. Dimakis, P. B. Godfrey, Y. Wu, M. J. Wainwright, and K. Ramchandran, “Network coding for distributed storage systems,” IEEE Trans. on Information Theory, vol. 56, no. 9, pp. 4539–4551, 2010.
  • [10] K. Rashmi, N. Shah, and P. Kumar, “Optimal exact-regenerating codes for distributed storage at the MSR and MBR points via a product-matrix construction,” IEEE Trans. on Information Theory, vol. 57, no. 8, pp. 5227 –5239, Aug. 2011.
  • [11] I. Tamo, Z. Wang, and J. Bruck, “Zigzag codes: MDS array codes with optimal rebuilding,” IEEE Trans. on Information Theory, vol. 59, no. 3, pp. 1597–1616, March 2013.
  • [12] V. Cadambe, S. Jafar, H. Maleki, K. Ramchandran, and C. Suh, “Asymptotic interference alignment for optimal repair of MDS codes in distributed storage,” IEEE Trans. on Information Theory, vol. 59, no. 5, pp. 2974–2987, 2013.
  • [13] D. Borthakur, “HDFS architecture guide,” http://hadoop.apache.org/common/docs/current/hdfs_design.pdf, 2008.
  • [14] R. C. Singleton, “Maximum distance q -nary codes,” IEEE Trans. on Information Theory, vol. 10, no. 2, pp. 116–118, 1964.
  • [15] M. Blaum, J. Brady, J. Bruck, and J. Menon, “EVENODD: An efficient scheme for tolerating double disk failures in RAID architectures,” IEEE Trans. on Computers, vol. 44, no. 2, pp. 192–202, Feb. 1995.
  • [16] C. Huang and L. Xu, “STAR: An efficient coding scheme for correcting triple storage node failures,” in Proc. of the USENIX Conference on File and Storage Technologies, 2005.
  • [17] B. Calder, Wang et al., “Windows Azure Storage: A highly available cloud storage service with strong consistency,” in Proc. of the Twenty-Third ACM Symposium on Operating Systems Principles, 2011.
  • [18] D. Ford, F. Labelle, F. I. Popovici, M. Stokely, V.-A. Truong, L. Barroso, C. Grimes, and S. Quinlan, “Availability in globally distributed storage systems.” in Proc. of the OSDI Conference, 2010.
  • [19] A.-M. Kermarrec, N. Le Scouarnec, and G. Straub, “Repairing multiple failures with coordinated and adaptive regenerating codes,” in Proc. of the International Symposium on Network Coding (NetCod), 2011.
  • [20] K. W. Shum and Y. Hu, “Cooperative regenerating codes,” IEEE Trans. on Information Theory, vol. 59, no. 11, pp. 7229–7258, Nov 2013.
  • [21] X. Wang, Y. Xu, Y. Hu, and K. Ou, “Mfr: Multi-loss flexible recovery in distributed storage systems,” in Proc. of the International Conference on Communications (ICC), 2010.
  • [22] A. S. Rawat, O. O. Koyluoglu, and S. Vishwanath, “Centralized repair of multiple node failures with applications to communication efficient secret sharing,” arXiv preprint arXiv:1603.04822, 2016.
  • [23] J. Pääkkönen, P. Dharmawansa, C. Hollanti, and O. Tirkkonen, “Distributed storage for proximity based services,” in Proc. of the Swedish Communication Technologies Workshop (Swe-CTW), 2012.
  • [24] J. Pääkkönen, C. Hollanti, and O. Tirkkonen, “Device-to-device data storage with regenerating codes,” in Multiple Access Communications. Springer, 2015, pp. 57–69.
  • [25] J. Pedersen, I. Andriyanova, F. Brännström et al., “Distributed storage in mobile wireless networks with device-to-device communication,” arXiv preprint arXiv:1601.00397, 2016.
  • [26] B. Eisenberg, “On the expectation of the maximum of iid geometric random variables,” Statistics & Probability Letters, vol. 78, no. 2, pp. 135–143, 2008.

Appendix A Proof of Proposition 1

Proof.

To determine τ\tau^{*}, we compare rD(d)r_{D}(d) with the average repair cost at all other possible regeneration states d+δd+\delta, for 1δnd11\leq\delta\leq n-d-1, and check if

rD(d)rD(d+δ),δ[1,nd1].r_{D}(d)\leq r_{D}(d+\delta),~~\forall\delta\in[1,n-d-1]. (58)

This method is preferred because a straightforward minimization of rD(τ)r_{D}(\tau) through differentiation is involved due to the harmonic sums. Substituting r(τ)r(\tau) from (7) to (58) yields,

γ(nd)λμμHn,d+λ\displaystyle\frac{\gamma(n-d)\lambda\mu}{\mu H_{n,d}+\lambda} γ(ndδ)λμμHn,d+δ+λ,\displaystyle\leq\frac{\gamma(n-d-\delta)\lambda\mu}{\mu H_{n,d+\delta}+\lambda}, (59)
ρ\displaystyle\rho (nd)Hd+δ,dδHn,d.\displaystyle\leq\frac{(n-d)H_{d+\delta,d}}{\delta}-H_{n,d}. (60)

The inequality in (60) yields the maximum ρ\rho for which rD(τ)r_{D}(\tau) is minimized at state τ=d\tau=d. We now examine the behavior of the right hand side (RHS) in (60) as a function of δ\delta for fixed nn and dd. The RHS in (60) has the same monotonicity as the function f(d,δ)=Hd+δ,dδ.f(d,\delta)=\frac{H_{d+\delta,d}}{\delta}. In Lemma 3, we show that ff is monotonically decreasing with δ\delta. As a result, the departure-to-repair rates ρ\rho for which (58)\eqref{rates} holds are also monotonically decreasing with δ.\delta. Substituting the maximum δ\delta (i.e., δ=nd1\delta=n-d-1) to the RHS in (60) yields a departure rate bound

ρHn1,dnd11n,\rho\leq\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n}, (61)

for which rD(d)rD(d+δ),δ[1,nd1].r_{D}(d)\leq r_{D}(d+\delta),\forall\delta\in[1,n-d-1]. In this case, minimization of rD(τ)r_{D}(\tau) is achieved at τ=d.\tau^{*}=d.

We now prove that for rates ρ>Hn1,dnd11n,\rho>\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n}, the average cost rD(τ)r_{D}(\tau) is minimized when τ=n1\tau=n-1. Following a similar reasoning, we compare rD(τ)r_{D}(\tau) at τ=n1\tau=n-1 with rD(τ)r_{D}(\tau) at any other possible regeneration threshold. We consider rD(n1)r(nδ1)r_{D}(n-1)\leq r(n-\delta-1), where 1δnd11\leq\delta\leq n-d-1. By substituting rD(τ)r_{D}(\tau) from (7) and simplifying, it follows that

ρHn1,nδ1δ1n.\rho\geq\frac{H_{n-1,n-\delta-1}}{\delta}-\frac{1}{n}. (62)

The RHS of (62) has the same monotonicity as the function g(n1,δ)=Hn1,n1δδg(n-1,\delta)=\frac{H_{n-1,n-1-\delta}}{\delta}. In Lemma 4, we show that gg is monotonically increasing with δ\delta. Therefore, the minimum ρ\rho for which rD(n1)rD(n1δ),δ[1,nd1]r_{D}(n-1)\leq r_{D}(n-1-\delta),~\forall\delta\in[1,n-d-1] is obtained when δ=nd1.\delta=n-d-1. Substituting this δ\delta to (62) completes the proof. ∎

Lemma 3.

The function

f(x,δ)=Hx+δ,xδf(x,\delta)=\frac{H_{x+\delta,x}}{\delta} (63)

is a monotonically decreasing function over integers δ>0\delta>0 for any given integer x>0x>0.

Proof.

We will show that f(x,δ+1)<f(x,δ)f(x,\delta+1)<f(x,\delta) for any integer δ>0\delta>0, which implies the monotonically decreasing assertion in the lemma. We have

f(x,δ)f(x,δ+1)\displaystyle f(x,\delta)-f(x,\delta+1)
=1δ(i=x+1x+δ1i)1δ+1(i=x+1x+δ+11i)\displaystyle=\frac{1}{\delta}\left(\sum\limits_{i=x+1}^{x+\delta}\frac{1}{i}\right)-\frac{1}{\delta+1}\left(\sum\limits_{i=x+1}^{x+\delta+1}\frac{1}{i}\right)
=(a)SδS+1x+δ+1δ+1\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\frac{S}{\delta}-\frac{S+\frac{1}{x+\delta+1}}{\delta+1}
=1δ+1(S(δ+1δ1)1x+δ+1)\displaystyle=\frac{1}{\delta+1}\left(S\left(\frac{\delta+1}{\delta}-1\right)-\frac{1}{x+\delta+1}\right)
=1δ(δ+1)(Sδx+δ+1)\displaystyle=\frac{1}{\delta(\delta+1)}\left(S-\frac{\delta}{x+\delta+1}\right)
>(b)0,\displaystyle\stackrel{{\scriptstyle(b)}}{{>}}0,

where in (a) we define the sum S=i=x+1x+δ1iS=\sum\limits_{i=x+1}^{x+\delta}\frac{1}{i}, and (b) follows as there are δ\delta terms in SS and each term is strictly greater than 1x+δ+1\frac{1}{x+\delta+1}. ∎

Lemma 4.

The function

g(x,δ)=Hx,xδδg(x,\delta)=\frac{H_{x,x-\delta}}{\delta} (64)

is a monotonically increasing function over integers δ[0,x1]\delta\in[0,x-1] for any given integer x>0x>0.

Proof.

We will show that g(x,δ+1)>g(x,δ)g(x,\delta+1)>g(x,\delta) for any integer δ>0\delta>0, which implies the monotonically increasing assertion in the lemma. We have

g(x,δ+1)g(x,δ)\displaystyle g(x,\delta+1)-g(x,\delta)
=1δ+1(i=xδx1i)1δ(i=xδ+1x1i)\displaystyle=\frac{1}{\delta+1}\left(\sum\limits_{i=x-\delta}^{x}\frac{1}{i}\right)-\frac{1}{\delta}\left(\sum\limits_{i=x-\delta+1}^{x}\frac{1}{i}\right)
=(a)S+1xδδ+1Sδ\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}\frac{S+\frac{1}{x-\delta}}{\delta+1}-\frac{S}{\delta}
=1δ+1(S(1δ+1δ)+1xδ)\displaystyle=\frac{1}{\delta+1}\left(S\left(1-\frac{\delta+1}{\delta}\right)+\frac{1}{x-\delta}\right)
=1δ(δ+1)(δxδS)\displaystyle=\frac{1}{\delta(\delta+1)}\left(\frac{\delta}{x-\delta}-S\right)
>(b)0,\displaystyle\stackrel{{\scriptstyle(b)}}{{>}}0,

where in (a) we define the sum S=i=xδ+1x1iS=\sum\limits_{i=x-\delta+1}^{x}\frac{1}{i}, and (b) follows as there are δ\delta terms in SS and each term is strictly smaller than 1xδ\frac{1}{x-\delta}. ∎

Appendix B Proof of Lemma 1

In Proposition 1, we determined the ρ\rho regime for which lazy repair is more efficient than eager repair, given fixed code parameters. To prove Lemma 1, it suffices to show that the highest rate ρ=Hn1,dnd11n\rho=\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n} for which τ=d\tau^{\ast}=d is strictly positive for any nn and dd (recall that by definition, n>dn>d). We prove this fact by employing a lower bound on Hn1,dnd1\frac{H_{n-1,d}}{n-d-1} , which is proved in Lemma 5.

Hn1,dnd1\displaystyle\frac{H_{n-1,d}}{n-d-1} 1n1(a)\displaystyle\geq\frac{1}{n-1}\stackrel{{\scriptstyle(a)}}{{\Rightarrow}} (65)
Hn1,dnd1\displaystyle\frac{H_{n-1,d}}{n-d-1} >1n\displaystyle>\frac{1}{n} (66)
Hn1,dnd11n\displaystyle\frac{H_{n-1,d}}{n-d-1}-\frac{1}{n} >0.\displaystyle>0. (67)

where in (a), we substituted 1n1\frac{1}{n-1} with the strictly smaller term 1n.\frac{1}{n}.

Lemma 5.

The function

f(x,δ)=Hx+δ,xδf(x,\delta)=\frac{H_{x+\delta,x}}{\delta} (68)

is bounded by

1x+δHx+δ,xδ<1δ,\frac{1}{x+\delta}\leq\frac{H_{x+\delta,x}}{\delta}<\frac{1}{\delta}, (69)

for all positive integers xx and δ\delta.

Proof.

First, we show that Hx+δ,xδ1x+δ\frac{H_{x+\delta,x}}{\delta}\geq\frac{1}{x+\delta}, for all x>0x>0 and δ>0\delta>0.

Hx+δ,xδ\displaystyle\frac{H_{x+\delta,x}}{\delta} =i=1x+δ1ii=1x1iδ\displaystyle=\frac{\sum_{i=1}^{x+\delta}\frac{1}{i}-\sum_{i=1}^{x}\frac{1}{i}}{\delta}
=1x+1+1x+2++1x+δδ\displaystyle=\frac{\frac{1}{x+1}+\frac{1}{x+2}+\ldots+\frac{1}{x+\delta}}{\delta}
>(a)1x+δ+1x+δ++1x+δδ\displaystyle\stackrel{{\scriptstyle(a)}}{{>}}\frac{\frac{1}{x+\delta}+\frac{1}{x+\delta}+\ldots+\frac{1}{x+\delta}}{\delta}
=δ1x+δδ\displaystyle=\frac{\delta\frac{1}{x+\delta}}{\delta}
=1x+δ,\displaystyle=\frac{1}{x+\delta},

where (a) follows by substituting the first δ1\delta-1 terms in the nominator with strictly smaller terms. The equality in this lower bound holds when δ=1\delta=1. We now show the upper bound.

Hx+δ,xδ\displaystyle\frac{H_{x+\delta,x}}{\delta} =i=1x+δ1ii=1x1iδ\displaystyle=\frac{\sum_{i=1}^{x+\delta}\frac{1}{i}-\sum_{i=1}^{x}\frac{1}{i}}{\delta}
=1x+1+1x+2++1x+δδ\displaystyle=\frac{\frac{1}{x+1}+\frac{1}{x+2}+\ldots+\frac{1}{x+\delta}}{\delta}
<(b)1x+1x++1xδ\displaystyle\stackrel{{\scriptstyle(b)}}{{<}}\frac{\frac{1}{x}+\frac{1}{x}+\ldots+\frac{1}{x}}{\delta}
=δ1xδ\displaystyle=\frac{\delta\frac{1}{x}}{\delta}
=1x,\displaystyle=\frac{1}{x},

where (b) follows by substituting the δ\delta terms in the nominator with strictly larger terms. ∎

Appendix C Proof of Proposition 2

Proof.

The proof follows along the same lines as Proposition 1. We compare the repair cost at r(d)r(d) with the repair cost at any other possible state dδd-\delta for 1δdk1\leq\delta\leq d-k to check when the inequality

r(d)r(dδ),δ[1,dk]r(d)\leq r(d-\delta),\quad\delta\in[1,d-k] (70)

is satisfied. Substituting for r(τ)r(\tau) using (7), we obtain

λμ(nd)γμHn,d+λλμ(kαδ+(nd)γ)μHn,dδ+λ,\frac{\lambda\mu(n-d)\gamma}{\mu H_{n,d}+\lambda}\leq\frac{\lambda\mu(k\alpha\delta+(n-d)\gamma)}{\mu H_{n,d-\delta}+\lambda}, (71)

from which we get:

ρ(nd)γHd,dδkαδ1nHn1,d\rho\geq\frac{(n-d)\gamma H_{d,d-\delta}}{k\alpha\delta}-\frac{1}{n}-H_{n-1,d} (72)

Expression (72) yields a bound on the minimum ρ\rho for which the optimal repair threshold is τ=d\tau^{*}=d. We notice that RHS of the inequality above has the same monotonicity as the function g(d,δ)=Hd,dδδg(d,\delta)=\frac{H_{d,d-\delta}}{\delta} defined in Lemma 4 in Appendix A, from which we observe that this function is a monotonically increasing function of δ\delta. Substituting the maximum δ=dk\delta^{*}=d-k yields the departure-to-repair rate bound,

ργ(nd)Hd,kkα(dk)Hn,d,\rho\geq\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d}, (73)

for which r(d)r(dδ),δ[1,dk].r(d)\leq r(d-\delta),\forall\delta\in[1,d-k]. For this rate regime, the optimal repair threshold is at τ=d.\tau^{*}=d.

We now prove that for rates ργ(nd)Hd,kkα(dk)Hn1,d1n\rho\leq\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n-1,d}-\frac{1}{n}, the average cost r(τ)r(\tau) per unit of time is minimized when τ=k\tau=k. We compare r(k)r(k) with r(k+δ)r(k+\delta) to analyze when the following inequality holds.

r(k)r(k+δ),δ[1,dk].r(k)\leq r(k+\delta),\quad\delta\in[1,d-k]. (74)

On substituting for r(τ)r(\tau) from (7), we get:

λμ(kα(dk)+γ(nd))μHn,k+λλμ(kα(dkδ)+γ(nd))μHn,k+δ+λ,\displaystyle\frac{\lambda\mu(k\alpha(d-k)+\gamma(n-d))}{\mu H_{n,k}+\lambda}\leq\frac{\lambda\mu(k\alpha(d-k-\delta)+\gamma(n-d))}{\mu H_{n,k+\delta}+\lambda},

from which we obtain

ρ(kα(dk)+γ(nd))Hk+δ,kkαδ1nHn1,k.\rho\leq\frac{(k\alpha(d-k)+\gamma(n-d))H_{k+\delta,k}}{k\alpha\delta}-\frac{1}{n}-H_{n-1,k}. (75)

The expression above yields a bound on the maximum departure-to-repair rate ρ\rho for which the optimal repair threshold is τ=k\tau^{*}=k. We now study the behavior of (75) as a function of δ\delta for fixed n,kn,k and dd. We notice that RHS of the inequality above has the same monotonicity as the function f(k,δ)=Hk+δ,kδf(k,\delta)=\frac{H_{k+\delta,k}}{\delta} defined in Lemma 3 in Appendix A, from which we observe that this function is a monotonically decreasing function of δ\delta. Therefore, δ=dk\delta^{*}=d-k yields the minimum value for the RHS of (75), which implies that when

ρ\displaystyle\rho \displaystyle\leq (kα(dk)+γ(nd))Hd,kkα(dk)Hn1,k1n\displaystyle\frac{(k\alpha(d-k)+\gamma(n-d))H_{d,k}}{k\alpha(d-k)}-H_{n-1,k}-\frac{1}{n} (76)
=\displaystyle= γ(nd)Hd,kkα(dk)Hn,d,\displaystyle\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d},

r(τ)r(\tau) is optimized at τ=k.\tau^{*}=k.

Appendix D Proof of Lemma 2

Proof.

We prove Lemma 2 by finding the relationship between n,k,γ,n,k,\gamma, and α\alpha for which the upper bound on the rate ρ\rho when τ=k\tau^{*}=k becomes negative.

γ(nd)Hd,kkα(dk)Hn,d\displaystyle\frac{\gamma(n-d)H_{d,k}}{k\alpha(d-k)}-H_{n,d} =(nd)(γHd,kkα(dk)Hn,dnd)\displaystyle=(n-d)\left(\frac{\gamma H_{d,k}}{k\alpha(d-k)}-\frac{H_{n,d}}{n-d}\right)
<(a)(nd)(γk2αHn,dnd)\displaystyle\stackrel{{\scriptstyle(a)}}{{<}}(n-d)\left(\frac{\gamma}{k^{2}\alpha}-\frac{H_{n,d}}{n-d}\right)
(b)(nd)(γk2α1n)\displaystyle\stackrel{{\scriptstyle(b)}}{{\leq}}(n-d)\left(\frac{\gamma}{k^{2}\alpha}-\frac{1}{n}\right)
=ndk2α(nγk2α).\displaystyle=\frac{n-d}{k^{2}\alpha}\left(n\gamma-k^{2}\alpha\right).

where in (a) we have used Lemma 5 of Appendix B to substitute term Hd,kdk\frac{H_{d,k}}{d-k} with its upper bound 1k\frac{1}{k} and in (b), we have used the same lemma to substitute Hn,dnd\frac{H_{n,d}}{n-d} with its lower bound 1n\frac{1}{n}. Setting ndk2α(nγk2α)<0\frac{n-d}{k^{2}\alpha}\left(n\gamma-k^{2}\alpha\right)<0 yields nγ<k2αn\gamma<k^{2}\alpha since the multiplicative term is strictly positive. ∎

Appendix E Proof of Proposition 3

Proof.

To determine τ\tau^{*}, we compare r(k)r(k) with other possible repair states k+δk+\delta, i.e., we analyze when

r(k)r(k+δ),r(k)\leq r(k+\delta), (77)

for 1δnk11\leq\delta\leq n-k-1. On substituting for r(τ)r(\tau) from (11), we obtain

λμα(k+nk1)μHn,k+λλμα(k+nkδ1)μHn,k+δ+λ.\displaystyle\frac{\lambda\mu\alpha(k+n-k-1)}{\mu H_{n,k}+\lambda}\leq\frac{\lambda\mu\alpha(k+n-k-\delta-1)}{\mu H_{n,k+\delta}+\lambda}.

We have

ρ(kα+α(nk1))Hk+δ,kαδ1nHn1,k.\rho\leq\frac{(k\alpha+\alpha(n-k-1))H_{k+\delta,k}}{\alpha\delta}-\frac{1}{n}-H_{n-1,k}. (78)

Inequality (78) yields the maximum departure-to-repair rate ρ\rho for which it is more cost-efficient to repair at state τ=k\tau=k than any other state τ=k+δ.\tau=k+\delta. We now examine the behavior of the RHS of (78) as a function of δ\delta for fixed kk and dd. We notice that RHS of the inequality above has the same monotonicity as the function f(k,δ)=Hk+δ,kδf(k,\delta)=\frac{H_{k+\delta,k}}{\delta} defined in Lemma 3 in Appendix A, from which we observe that this function is a monotonically decreasing function of δ\delta. Substituting δ=nk1\delta^{*}=n-k-1 to the RHS of (78) yields

ρkHn1,k(nk1)1n,\rho\leq\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n}, (79)

for which the optimal repair threshold is at τ=k.\tau^{*}=k.

We now evaluate if there is a departure rate regime for which the average cost per unit of time is minimized at τ=n1\tau^{*}=n-1. That is, we analyze when

r(n1)r(nδ1).r(n-1)\leq r(n-\delta-1). (80)

where 1δnk11\leq\delta\leq n-k-1. On substituting for r(τ)r(\tau) from (11), we get

λμαkμHn,n1+λ\displaystyle\frac{\lambda\mu\alpha k}{\mu H_{n,n-1}+\lambda} \displaystyle\leq λμα(k+δ)μHn,nδ1+λ\displaystyle\frac{\lambda\mu\alpha(k+\delta)}{\mu H_{n,n-\delta-1}+\lambda}\Rightarrow (81)
ρ\displaystyle\rho \displaystyle\geq kHn1,nδ1δ1n.\displaystyle\frac{kH_{n-1,n-\delta-1}}{\delta}-\frac{1}{n}. (82)

We notice that RHS of the inequality above has the same monotonicity as the function g(n1,δ)=Hn1,n1δδg(n-1,\delta)=\frac{H_{n-1,n-1-\delta}}{\delta} defined in Lemma 4 in Appendix A, from which we observe that this function is a monotonically increasing function of δ\delta. Substituting δ=nk1\delta^{*}=n-k-1 yields

ρkHn1,k(nk1)1n,\rho\geq\frac{kH_{n-1,k}}{(n-k-1)}-\frac{1}{n}, (83)

for which the optimal repair threshold is at τ=n1\tau^{*}=n-1.

Appendix F Proof of Proposition 4

Proof.

Let us consider the following inequality:

rD(τ)<rC(τ).r_{D}(\tau)<r_{C}(\tau). (84)

According to (11), the average repair cost rC(τ)r_{C}(\tau) of centralized repair depends only on α\alpha, when nn, kk, and dd are fixed. As αMSRαMBR\alpha_{MSR}\leq\alpha_{MBR}, MSR codes minimize rC(τ)r_{C}(\tau). Thus, we select MSR codes for centralized repair in our comparison. Similarly, for given n,k,n,k, and dd, the average repair cost rD(τ)r_{D}(\tau) of distributed repair depends only on the repair bandwidth γ\gamma. As γMBRγMSR\gamma_{MBR}\leq\gamma_{MSR}, MBR codes are selected to minimize rD(τ)r_{D}(\tau). Substituting (1) and (2) in rC(τ)r_{C}(\tau) and rD(τ)r_{D}(\tau), respectively, we obtain

(2d)(nτ)λμk(2dk+1)(μHn,τ+λ)<(k+nτ1)λμk(μHn,τ+λ),\frac{\mathcal{M}(2d)(n-\tau)\lambda\mu}{k(2d-k+1)(\mu H_{n,\tau}+\lambda)}<\frac{\mathcal{M}(k+n-\tau-1)\lambda\mu}{k(\mu H_{n,\tau}+\lambda)}, (85)

which implies

k+nτ1<2d.k+n-\tau-1<2d. (86)

Inequality (86) determines the minimum number of surviving nodes for which MBR distributed repair emerges as the most cost-efficient strategy. The left hand side (LHS) of (86) is a decreasing function of τ\tau. Maximizing the LHS yields the relationship between n,k,n,k, and dd for which distributed MBR always outperforms centralized MSR. This occurs when τ=d\tau=d. Substituting τ=d\tau=d results in d>n+k13d>\frac{n+k-1}{3}. If we reverse the direction of the inequality in (84), we obtain

2d<n+kτ1.2d<n+k-\tau-1. (87)

Minimizing the RHS of (87) yields the relationship between n,k,n,k, and dd for which centralized MSR always outperforms distributed MBR. This occurs when τ=n1\tau=n-1. Substituting τ=n1\tau=n-1 results in d<k2d<\frac{k}{2}. However, by the definition of regenerating codes, we have dk.d\geq k. Therefore, there is no condition for which centralized MSR repair always outperforms distributed MBR repair. ∎

Appendix G Proof of Proposition 5

Proof.

To determine the optimal repair strategy we compare rC(τ)r_{C}(\tau) with rD(τ)r_{D}(\tau) for kτ<dk\leq\tau^{*}<d

rC(τ)<rD(τ)r_{C}(\tau)<r_{D}(\tau).

Substituting r(τ)r(\tau) for distributed repair and centralized repair from (7) and (11), respectively, we obtain:

(α(k+nτ1))λμHn,τ+λ<(αk(dτ)+γ(nd))λμHn,τ+λ.(\alpha(k+n-\tau-1))\frac{\lambda\mu}{H_{n,\tau}+\lambda}<(\alpha k(d-\tau)+\gamma(n-d))\frac{\lambda\mu}{H_{n,\tau}+\lambda}. (88)

For MSR codes, αMSRγMSR\alpha_{MSR}\leq\gamma_{MSR} and for MBR codes, αMBR=γMBR\alpha_{MBR}=\gamma_{MBR}. Thus, for each case, we have αγ\alpha\leq\gamma. By choosing the lowest γ\gamma, we consider when the parameters satisfy

α(k+nτ1)\displaystyle\alpha(k+n-\tau-1) <\displaystyle< αk(dτ)+α(nd)\displaystyle\alpha k(d-\tau)+\alpha(n-d)
k1\displaystyle\Rightarrow k-1 <\displaystyle< k(dτ)(dτ)\displaystyle k(d-\tau)-(d-\tau)
k1\displaystyle\Rightarrow k-1 <\displaystyle< (k1)(dτ)\displaystyle(k-1)(d-\tau)
τ\displaystyle\Rightarrow\tau <\displaystyle< d.\displaystyle d. (89)

As kτ<dk\leq\tau^{*}<d, inequality (89) is always true and hence, centralized repair outperforms distributed repair. As explained in Proposition 4, for centralized repair, MSR codes minimize the average repair cost rate per unit of time as compared to MBR codes. Thus, centralized repair using MSR codes yields the optimal repair strategy. ∎

Appendix H Proof of Proposition 6

Starting from state nn, expected time to reach state τ\tau is i=τ+1n=1iλ=Hn,τλ\sum_{i=\tau+1}^{n}=\frac{1}{i\lambda}=\frac{H_{n,\tau}}{\lambda}. Once the system is at state τ\tau, with probability p=τλτλ+μp=\frac{\tau\lambda}{\tau\lambda+\mu}, the system will transition to state τ1\tau-1. If this occurs, the recovery will not be possible since the number of fragments are below the repair threshold. However, DSS can still serve the users if τ1k\tau-1\geq k. Until we reach state k1k-1, the data is not lost. The expected time to reach state k1k-1 from state τ\tau is i=kτ1iλ=Hτ,k1λ\sum_{i=k}^{\tau}\frac{1}{i\lambda}=\frac{H_{\tau,k-1}}{\lambda}. On the other hand, with probability 1p1-p, recovery will be initiated and the system will be back to state nn, which takes 1μ\frac{1}{\mu} time. At that point, we will go thorough the same process again. Accordingly, we have

TDL={Hn,τλ+Hτ,k1λ, w.p p2Hn,τλ+1μ+Hτ,k1λ w.p. (1p)p3Hn,τλ+2μ+Hτ,k1λ w.p. (1p)2piHn,τλ+i1μ+Hτ,k1λ w.p. (1p)i1pTDL=\begin{cases}\frac{H_{n,\tau}}{\lambda}+\frac{H_{\tau,k-1}}{\lambda},&\textrm{ w.p }p\\ \frac{2H_{n,\tau}}{\lambda}+\frac{1}{\mu}+\frac{H_{\tau,k-1}}{\lambda}&\textrm{ w.p. }(1-p)p\\ \frac{3H_{n,\tau}}{\lambda}+\frac{2}{\mu}+\frac{H_{\tau,k-1}}{\lambda}&\textrm{ w.p. }(1-p)^{2}p\\ \dots&\dots\\ \frac{iH_{n,\tau}}{\lambda}+\frac{i-1}{\mu}+\frac{H_{\tau,k-1}}{\lambda}&\textrm{ w.p. }(1-p)^{i-1}p\end{cases} (90)

from which the expected time to data loss, E[TDL]E[\textrm{TDL}], can be calculated.