{'fraction_non_alphanumeric': 0.061065861826601064, 'fraction_numerical': 0.013933104560300988, 'mean_word_length': 3.7131722525331257, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 60, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Sytematic Piggybacking Design for Minimum Storage Regenerating Codes

Piggybacking is an efficient method to decrease the repair bandwidth of Maximum Distance Separable (MDS) codes or Minimum Storage Regenerating (MSR) codes. In this paper, for minimizing the repair bandwidth of parity nodes of the known MSR codes with high rate, which is usually the whole size of the original data, i.e., the maximal, a new systematic piggybacking design is proposed through an in-depth analysis of the design of piggybacking. As a result, new MSR codes are obtained with almost optimal repair bandwidth of parity nodes while retaining the optimal repair bandwidth of systematic nodes. Furthermore, MSR codes with balanced download during node repair process are presented based on the new piggybacking design.


Introduction
Distributed storage systems provide reliable storage service by storing data on distributed storage nodes with redundancy. Since any individual storage node may fail, redundancy is essential to ensure the reliability. Basically, there are two mechanisms of redundancy: replication and erasure coding. Compared with erasure coding, replication is simpler but has lower storage efficiency. Therefore, with data growing much faster than before, erasure coding has been adopted by more and more distributed storage systems, such as Google Colossus (GFS2) [3], Microsoft Azure [6], HDFS Raid [5], and OceanStore [7].
Maximum Distance Separable (MDS) codes are typical optimal erasure codes in terms of the redundancyreliability tradeoff. A (k + r, k) MDS storage code, composed of k + r nodes, can tolerate the failure of any r nodes, i.e., any k nodes suffice the reconstruction of the original data. In particular, if the original data is partitioned into k parts and stored in k nodes without coding, called as systematic nodes, and the other r nodes, termed as parity nodes, store parity data of k nodes, then the (k + r, k) MDS storage code is said to be systematic. In principle, systematic MDS storage codes are preferred in practical systems.
As mentioned above, any individual storage node is not very stable. Once a node fails, we must repair it to maintain the redundancy. Accordingly, the cost to repair a failed storage node is crucial for evaluating the performance of erasure codes. Generally speaking, there are four metrics for the cost of node repair, such as computation load, disk I/O, network bandwidth, and the number of accessed disks. The repair bandwidth, defined as the amount of data downloaded to repair a failed node, is the primary concern because the available bandwidth is becoming more and more scarce. Unfortunately, for a (k + r, k) MDS storage code with each node storing α data, the repair bandwidth of a single failed node is equal to M = kα, the amount of the whole original data.
Recently, Dimakis et al. studied a symmetric repair scenario of (k + r, k) MDS storage codes for distributed storage systems, where the failed node is repaired by downloading β ≤ α data from each of any d ≥ k surviving nodes, i.e., the repair bandwidth is γ = dβ. As a result, they derived a tradeoff between storage and repair bandwidth in [2]. Codes lying on this tradeoff are called Regenerating Codes, in which MBR corresponding to minimum repair bandwidth and MSR corresponding to the minimum storage are the most important. In this paper, we focus on systematic (k + r, k) MSR codes with high rate, i.e., r ≪ k. In fact, systematic (k + r, k) MSR codes can be regarded as a special class of systematic (k+r, k) MDS storage codes with minimal repair bandwidth γ MSR = dα/(d−k+1) where β = α/(d−k+1). In order to further reduce the repair bandwidth, we specifically set d = k + r − 1 throughout this paper, i.e., In [8,9,11,12], several explicit constructions of high rate MSR codes have been proposed. However, though any of these MSR codes can optimally repair the systematic nodes with respect to the theoretic bound in (1), all of them except for the (k + 2, k) Hadamard MSR code in [9] repair the parity nodes trivially by downloading the whole original data from all the systematic nodes, i.e., In [10], the method called piggybacking was presented to reduce the amount of data read and downloaded for node repair of MDS codes and MSR codes. The basic idea of piggybacking is taking multiple instances of a given base code, which can be a MDS code or a MSR code, and adding functions of the data of some instances to the other. Several designs of piggybacking were presented in [10] to improve the repair efficiency of systematic nodes of MDS codes, so were designs of piggybacking for repair of parity nodes of MDS codes and MSR codes as supplement. Consequently, an average saving of 25% to 50% in the amount of download could be achieved during the node repair. However, this result is still far away from the bound in (1), which gives γ/M ≈ 1/r for r ≪ k.
Inspired by the piggybacking designs in [10] and motivated by the inefficiency of repair of parity nodes of most MSR codes, a systematic analysis on the design of piggybacking in order to minimize the average repair bandwidth of parity nodes of MSR codes is done in this paper. As a result, a new piggybacking design based on given MSR codes which can generate new MSR codes with almost optimal repair bandwidth for parity nodes is proposed. Moreover, since the new piggybacking design doesn't have the property of balanced download during node repair similar to MDS codes, a method is proposed to construct piggybacked codes with balanced download based on the new piggybacking design.
The remainder of this paper is organized as follows. In Section 2, the model of systematic MSR codes and the piggybacking design for repair of parity nodes of MSR codes presented in [10] are briefly reviewed. In Section 3, a detailed analysis of the design of piggybacking is elaborated and consequently our new piggybacking design is proposed. Based on the new piggybacking design, a method to construct piggybacked codes with balanced download is proposed in Section 4. Finally, the conclusion is given in Section 5.
2 Systematic (k + r, k) MSR code and Piggybacking A systematic (k + r, k) MSR code consists of k systematic nodes and r parity nodes. Assume that the amount of the original data is M = kα ′ , it can be equally partitioned into k parts f = [f T 1 , f T 2 , · · · , f T k ] T and placed on k systematic nodes, where f i is an α ′ × 1 vector. In general, r parity nodes hold parity data, namely r vectors f k+1 , · · · , f k+2 , of all the systematic data f 1 , · · · , f k . Precisely, for 1 ≤ j ≤ r, the jth parity data is a linear combination of all the systematic data f 1 , · · · , f k as is called the coding matrix of the jth parity node for the ith systematic node. Table 1 illustrates the structure of such a (k + r, k) MSR code. Parity data 1 . . .
Recall that all the known MSR codes have the optimal repair ability to repair the systematic nodes. Once the ith systematic node fails, one downloads data S i,j f j , 1 ≤ j = i ≤ k + r, from all the surviving Parity Node Parity data Parity data 1 f nodes by an α ′ r ×α ′ matrix S i,j of rank α ′ r , and then recover the original data f i . That is, only a proportion 1/r of data is needed from each of other k + r − 1 nodes to repair a failed systematic node. So, totally (k + r − 1)α ′ /r data is downloaded, which is optimal with respect to the theoretic bound in (1). But for repair of a failed parity node, all the known MSR codes have to download all the α ′ data from each of k systematic nodes, i.e., totally M data, much bigger than the optimal value, except for (k + 2, k) Hadamard MSR code whose parity nodes can be repaired similar to the systematic nodes.
In the rest of this paper, we always assume S i,j = S i for all 1 ≤ i ≤ k, 1 ≤ j = i ≤ k + r to simplify the repair strategy, and call it the repair matrix of the ith systematic node. It should be noted that all the known constructions have such repair matrices, for example Zigzag code [11], Hadamard MSR code [9], long MDS code [12], invariant subspace codes [8], etc.
In [10], a piggybacking design devoted to efficient repair of parity nodes of MSR codes was presented. By taking two instances of a systematic (k + r, k) MSR code and denoting by f (i) j the data of jth node in instance i, 1 ≤ j ≤ k + r and 1 ≤ i ≤ 2, the piggybacking design is illustrated in Table 2 where the only piggyback is deployed on the first node of instance 2, which is the sum of all parity data of instance 1 except the first one.
The resultant piggybacked (k + r, k) MSR code stores α = 2α ′ data at each node. In principle, there are two distinct repair strategies for parity nodes: (1) To repair the first parity node, one downloads all the systematic data of the two instances, totally 2kα ′ data; (2) To repair the ith parity node, i = 1, one downloads all the systematic data of instance 2, the parity data f k+r of instance 1, and the data f Hence, the average repair bandwidth of the parity nodes is which is far away from the bound in (1), especially when k ≫ r, however. Throughout this paper, we always assume that k ≫ r since the high rate MSR codes with k ≫ r are usually of great interest. In this case, the 2kα ′ data downloaded in the first strategy is much larger than (k + r − 1)α ′ data downloaded in the second strategy. Note from Table 2 that the larger downloading is caused by the missing of f (1) k+1 in the piggyback so that one has to download all the kα ′ systematic data of instance 1 instead of using less (at most 2(r − 1)α ′ ) parity data in the r − 1 parity nodes and the piggyback. This observation immediately gives us a hint that f (1) k+1 should be included in a piggyback. As an example shown in Table 3, the average repair bandwidth of the parity nodes can be reduced as Inspired by the effect of the new piggybacking, we will discuss how to design piggybacking systematically for minimizing the average repair bandwidth of the parity nodes in the next section.
Remark 1. In [10], a smaller average repair bandwidth, but still much larger than the bound in (1), can be obtained by partitioning the r parity nodes into g = max(1, ⌊ r √ k+1 ⌋) groups as equally as possible, i.e., each of group 1 to group g − 1 has h = ⌊ r g ⌋ nodes and group g has h ′ = r − (g − 1)h nodes. For simplicity we only consider g = 1 herein due to k ≫ r.
3 New Piggybacking for Parity Repair of (k + r, k) MSR code In this section, we present a general transform for MSR codes based on the piggybacking method, which can give MSR codes with almost optimal repair bandwidth of parity nodes.
Consider s instances of a (k + r, k) MSR code, where 2 ≤ s ≤ r. Denote by vectors f k+r respectively the systematic data and parity data of the ith instance of the MSR code. Next, we apply the piggybacking method to the s instances: • Keep the first s − 1 instances unchanged; • Keep the systematic data of the instance s unchanged but add to the i-th parity data f (s) k+i , 1 ≤ i ≤ r, the piggyback P i , which is a linear combination of f (j) k+l for 1 ≤ l = i ≤ r and 1 ≤ j < s, i.e., where A l is a (s − 1) × r matrix of rank s − 1 with the lth column being the all-zero column for any 1 ≤ l ≤ r. For convenience, we call A 1 , · · · , A r piggybacking matrices which define the piggyback set {P 1 , · · · , P r }.
Let α ′ denotes the data amount of a node of the original (k+r, k) MSR code. Then, we get a s-piggybacked (k + r, k) MSR code having k systematic nodes and r parity nodes, each storing α = sα ′ data, whose structure is depicted in Table 4.
Theorem 1. The s-piggybacked (k + r, k) MSR code has MDS property.
Proof : For any k nodes out of all the k + r nodes, if they are all systematic nodes, then we are done. Otherwise, noting that the first s − 1 instances are unchanged, we can reconstruct all their systematic data by means of the MDS property of the original MSR code. Next, we cancel the parity data of the first s − 1 instances in the involved piggybacks with the help of the systematic data of the first s − 1 instances so that we are able to reconstruct the unchanged systematic data of the last instance still by the MDS property of the original MSR code.
Specifically, if the piggyback set {P 1 , · · · , P r } leads to the minimal average repair bandwidth of the parity nodes of a s-piggybacked (k + r, k) MSR code, then it is said to be optimal. From now on, we focus on the design of the optimal piggyback set {P 1 , · · · , P r }. For a s-piggybacked (k + r, k) MSR code, recall from the discussion in the previous section that we already have Principle of Repair of Parity Nodes: If parity node 1 ≤ i ≤ r fails, then the parity data f (1) k+i , · · · , f (s−1) k+i are repaired as follows: Step 1 Download the systematic data f Step 2 Recover each of the parity data f k+j + P j from instance s and other parity data involved in P j from instances 1, · · · , s − 1, with f (s) k+j calculated in Step 1, for some integer 1 ≤ j = i ≤ r; Step 3 Recover f If a piggyback p is composed of parity data including f , then we say f appears in p. Now, we prove Lemma 1. There exists an optimal piggyback set {P 1 , · · · , P r } such that any parity data f (j) k+i for 1 ≤ j < s and 1 ≤ i ≤ r appears exactly once. More precisely, the piggybacking matrix A i in (3) is formed by an identity matrix of order s − 1 and r − s + 1 zero columns for all 1 ≤ i ≤ r.
Proof : Suppose that parity node 1 fails. By the Principle of Repair of Parity Nodes, rank(A 1 ) = s − 1 is necessary to recover f (1) k+1 , · · · , f (s−1) k+1 from (3). That is, there are s − 1 independent columns in A 1 . Denote by l 1 , · · · , l s−1 the indices of these independent columns respectively, and let {1, · · · , r} \ {l 1 , · · · , l s−1 } = {l s , · · · , l r } . Then, after removing f (1) k+1 , · · · , f (s−1) k+1 from the piggybacks P ls , · · · , P lr , we get new piggybacks as where A ′ 1 is formed from A 1 by replacing its columns l s , · · · , l r with all-zero columns. Obviously, the new piggybacks would not increase the repair bandwidth since the repair process of any parity node 1 ≤ i ≤ r does not incur more download to cancel the interference data from other parity nodes in the new piggybacks.
Further, we modify piggybacks as where A ′′ 1 is formed by replacing the submatrix of A ′ 1 consisting of its columns l 1 , · · · , l s−1 with the identity matrix. It is easily checked that in contrast to {P ′ 1 , · · · , P ′ r }, the new piggyback set {P ′′ 1 , · · · , P ′′ r } keeps the same repair bandwidth for the repair of parity node 1, and does not increase the repair bandwidth for the repair of parity node 2 ≤ i ≤ r since no more download is needed to cancel the interference data from other parity nodes.
Recursively applying the above procedure to node 2 to r, we can change the original piggybacks to those having the piggybacking matrices in the desired form, whose average repair bandwidth of parity nodes is no more than that of the former. This completes the proof.
Regarding the optimal piggyback set in Lemma 1, denote p i (j) = l if f (j) k+i , 1 ≤ i ≤ r, 1 ≤ j < s, appears in the piggyback P l , 1 ≤ l ≤ r. In particular, set p i (s) = i. Then, p i is an injective function from {1, · · · , s} into {1, · · · , r} for all 1 ≤ i ≤ r. Accordingly, we can rewrite the piggyback as Define L(P i ) = |S i |. We have the following lemma about L(P i ).
Proof : Suppose that the parity node 1 ≤ i ≤ r fails. According to the Principle of Repair of Parity Nodes, one has to download Step 1 kα systematic data from instance s and then calculate f Step 2 P l + f (s) k+l and all the data f k+i , 1 ≤ j < s, from (4); Step 3 All the data f and then the average repair bandwidth of the parity nodes is s j=1 L(P pi(j) ). In fact, we can see that the term L(P i ) appears exactly L(P i ) + 1 times in this sum since the repair of needs to download L(P i ) data according to Steps 2 and 3 where 1 ≤ i ′ ≤ r and 1 ≤ j ′ < s satisfy p i ′ (j ′ ) = i. Thus, When the piggyback set is optimal, its γ parity must be minimized, so does 1). Then, the piggyback set is optimal if and only if L(P i ) = s − 1 for all 1 ≤ i ≤ r by the well-known Cauchy-Schwarz inequality.
Based on Lemmas 1 and 2, we are ready to construct a class of optimal piggyback sets for s-piggybacked (k + r, k) MSR codes, i.e., the piggyback sets {P 1 , · · · , P r } given in (4) with the constraint that L(P i ) = s − 1 for all 1 ≤ i ≤ r. In what follows, we give the concrete repair strategy for node failure of the s-piggybacked (k + r, k) MSR code. Precisely, we use two distinct repair strategies to respectively deal with the failure of a systematic node and the failure of a parity node.
(I) When systematic node i fails, 1 ≤ i ≤ k, we repair it by the following steps: Step 1 Download data S i f k+l from parity nodes 1 ≤ l ≤ r of each instance 1 ≤ j < s, and data S i (f (s) k+l + P l ) from parity nodes 1 ≤ l ≤ r of instance s, by the repair matrix S i ; Step 2 Compute S i P l according to (4), and then get S i f (s) k+l by cancelling the piggyback term S i P l from Step 3 Recover data f l , 1 ≤ l = i ≤ k + r, by using the repair method of the original MSR code, for each instance 1 ≤ j ≤ s.
(II) When parity node i fails, 1 ≤ i ≤ r, we repair it as follows.
Step 1 Download all the systematic data f Step 2 Download f (s) k+pi(j) + P pi(j) and the other s − 2 parity data f k+i for each 1 ≤ j < s; Step 3 Download all f Then, the s-piggybacked (k + r, k) MSR code has two kinds of repair bandwidth Obviously, the former is optimal and the latter is not with respect to the bound in (1). But compared with the original (k + r, k) MSR code, the s-piggybacked (k + r, k) MSR code maintains optimal repair property of the systematic nodes, and reduces the repair bandwidth of the parity nodes dramatically. Most notably, the repair bandwidth of the parity nodes in the r-piggybacked (k + r, k) MSR approaches the optimal value in (1) when k tends to infinity.
Theorem 2. The r-piggybacked (k + r, k) MSR code constructed by r instances has almost optimal repair property: (1) Any systematic node has optimal repair property with repair bandwidth (k + r − 1)α/r; (2) Any parity node has almost optimal repair property with repair bandwidth (k + r(r − 1))α/r From the above analysis, the injections p i , 1 ≤ i ≤ r, which result in |S l | = s − 1 for all 1 ≤ l ≤ r, are crucial to the optimal piggyback set. Fortunately, there are plenty of such functions. For example, p i (j) = ((i − j + s − 1) mod r) + 1 (5) and p i (j) = ((i + j − s − 1) mod r) + 1 (6) are two classes of injective functions from {1, · · · , s} into {1, · · · , r} obtained from the diagonals of slopes 1 and -1 of a r × s matrix. Finally, we demonstrate two illustrative examples of the optimal piggyback set for (k + 4, k) MSR codes.
Example 1. Two optimal piggyback sets for 3-piggybaced (k + 4, k) MSR codes are respectively and which are based on the injective functions (5) and (6) respectively. In fact, these two injective functions can be obtained from the diagonals of slopes 1 and -1 of a 4 × 3 matrix as depicted in Figure 1.
By the two optimal piggyback sets, the repair bandwidth of the parity nodes is (k+6)α/3 where α = 3α ′ . Recall that the optimal repair bandwidth of (k + 4, k) MSR codes given in (1) is (k + 3)α/4. Further, we can approach the optimal value by adding another instance to get 4-piggybaced (k + 4, k) MSR codes. 3 optimal piggyback sets are listed for 4-piggybaced (k + 4, k) MSR codes. and where the fist two are based on the injective functions (5) and (6) respectively.
For these new three 4-piggybaced (k + 4, k) MSR codes, the data amount of a node is α = 4α ′ and the repair bandwidth of the parity nodes is (k + 12)α/4, which is asymptotically optimal with respect the bound (k + 3)α/4 given in (1).

Remark 2.
Recall that the (k + 2, k) Hadamard MSR code is special for its optimal repair property of any node. In the following table, we give a comparison between the (k + 2, k) Hadamard MSR code, the (k + 2, k) Piggybacked Zigzag code and the (k + 2, k) Piggybacked Long MDS code. For simplicity, the same data amount α = 2 m is adopted.
(k + 1)α/2 (k + 1)α/2 γ parity (k + 1)α/2 (k + 2)α/2 (k + 2)α/2 From Table 5, we can see that both of the two piggybacked codes, whose γ system and γ parity are (k+1)α/2 and (k + 2)α/2 respectively, have optimal repair property of the systematic nodes and almost optimal repair property of the parity nodes, with respect to the theoretic bound in (1). For a given α = 2 m , the piggybacked Zigzag code and the piggybacked Long MDS code respectively support 1 and 2(m − 1) more nodes than the Hadamard code. Hence, our new piggybacking method shows a clear advantage over the number of systematic nodes.

Piggybacked (k + r, k) MSR code with Balanced Download
According to the repair strategy in the last section, node repair of the r-piggybacked (k + r, k) MSR code has the following characteristics: C1 To repair a systematic node, β 1 = α ′ r data should be downloaded from each surviving node; C2 To repair a parity node, β 1 = α ′ r and β 2 = α ′ data should be downloaded from each systematic node and each surviving parity node respectively, where α ′ is the data amount of each node. In the sense of load balance, the download is not balanced. In this section, by using the so-called layer technique presented in [13,14] , we give a construction of the piggybacked (k + r, k) MSR code with balanced download.  a pair (I n , A) where I n is an n-set and A is a collection of b r-subsets of I n (blocks) such that each element of I n is contained in exactly e blocks and any 2-subset of I n is contained in exactly λ blocks.
For an (n, r, λ; e, b)-BIBD, the parameters e, b can be determined by the other three as For simplicity, we use (n, r, λ)-BIBD to denote (n, r, λ; e, b)-BIBD.
Based on BIBDs, we are able to construct the piggybacked (k+r, k) MSR code with balanced download as follows: Step 1 Choose an (n = k + r, r, λ)-BIBD (I n , A), where I n = {1, 2, · · · , n} and A = {A i |1 ≤ i ≤ b}; Step 2 Generate b instances of a r-piggybacked (k + r, k) MSR code; Step 3 For each 1 ≤ i ≤ b, distribute r parity data and k systematic data of the ith instance onto nodes in A i and I n \A i respectively, we then obtain a (b · r)-piggybacked (k + r, k) MSR code.
Below is an example of the new code.
Example 2. Let (I 13 , A) be an (k + r = 13, r = 4, λ = 1)-BIBD defined by where % denotes the modulo operation. A new (13r)-piggybacked (k + r, k) MSR code with balanced download can be expressed by a matrix as where the row denotes the node, the column denotes the instance of the r-piggybacked MSR code, and 0, 1 denote systematic data and parity data respectively.
Assume that the data amount of each node of the r-piggybacked (k + r, k) MSR code is α ′ . If node i fails, following the repair strategy in the last section we repair the failed node of the new (b·r)-piggybacked (k + r, k) MSR code instance by instance. According to C1 and C2, we download data from node j = i with instance l ranging from 1 to b as follows: (1) If node i in instance l is a systematic node, α ′ r data is downloaded; (2) If node i in instance l is a parity node, (2.1) If node j in instance l is a systematic node, α ′ r data is downloaded; (2.2) If node j in instance l is a parity node, α ′ data is downloaded.
Theorem 3. The (b ·r)-piggybacked (n = k + r, k) MSR code constructed above has the balanced download property that when repairing a failed node, the amount of data that each surviving node needs to transmit is β = (r−1) 2 n(n−1) + 1 r α, which is 1 + r(r−1) 2 n(n−1) times of the optimal case.

Conclusion
In this paper, we gave a systematic discussion on the design of piggybacking to achieve the minimal average repair bandwidth of parity nodes of MSR codes, and then presented a new piggybacking design which can give MSR codes with almost optimal repair bandwidth of parity nodes, while retaining the optimal repair bandwidth of systematic nodes. Moreover, a construction of MSR codes with balanced download during node repair process based on the new piggybacking design was also proposed.