Strip merging method based on concatenated pair local repairable code and storage medium
Through the locally repairable code stripe merging method based on cascade pairing, the performance problem of stripe merging under the hierarchical network structure is solved, efficient redundancy conversion and system resource optimization are achieved, and the fault tolerance and availability of the data center storage system are improved.
Patent Information
- Application Number
- CN202211143785.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-09-20
AI Technical Summary
Existing stripe merging methods for locally repairable codes cannot achieve optimal performance under hierarchical network structures, do not support cascade merging, and have restrictions on the layout between stripes, resulting in low practicality.
A stripe merging method based on cascade pairing for locally repairable codes is adopted. By obtaining the stripe coding parameters and request type, the stripe layout is converted into a segment vector. The merging cost is calculated and the cost matrix is constructed. The stripe pairing scheme is selected using the minimum weighted matching algorithm for stripe merging.
Effectively reduce cross-cluster data transmission, save bandwidth, improve system network resource utilization, and maintain high fault tolerance and high availability of the system.
Smart Images

Figure CN115664589B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of erasure code fault tolerance of computer storage systems, and in particular to a method for merging locally repairable code stripes based on cascade pairing and a storage medium. Background Art
[0002] In the information age, the internet generates data constantly, and the demand for storing massive amounts of data has driven research in storage technologies. As single-server storage has reached capacity bottlenecks, distributed storage systems comprised of multiple servers have become mainstream. Node failures are inevitable in distributed environments, so systems must ensure that stored data is not lost. Erasure codes, compared to multi-copy replication, offer low storage overhead and flexible parameter adjustments, making them a hot topic in fault-tolerant storage research. Erasure codes organize data into blocks and encode a fixed number of blocks to calculate data check blocks, forming a stripe. If data is lost, the remaining blocks in the stripe are decoded and calculated, allowing the lost data to be repaired, provided that the data is repairable. Partially repairable codes are a special type of erasure code that enhances local repair capabilities. Compared to full-stripe decoding and repair, they are more efficient, reduce repair time, and are more suitable for deployment in systems with hierarchical network structures.
[0003] To cope with changes in cluster size and storage overhead requirements, storage systems need to adjust additional fault-tolerant storage overhead to achieve data distribution rebalancing and fault tolerance adjustments. The 2015 USENIX Conference on File and Storage Technologies emphasized the importance of parameter adjustment for erasure coding stripes, considering the lifespan of storage media. The 2021 USENIX Conference on File and Storage Technologies research on ultra-wide stripes noted that by adjusting the number of redundant check blocks, varying reliability guarantees can be achieved for ultra-wide stripes. Therefore, an efficient redundancy conversion mechanism is crucial for modern storage systems for data centers.
[0004] However, current research on fault-tolerant storage focuses on redundancy conversion from multiple replicas to erasure codes, with little research on erasure codes themselves. Large data centers typically have hierarchical network structures, and existing conversion mechanisms ignore this particularity, thus failing to achieve optimal performance. The only study on locally repairable codes, published in the 2022 IEEE International Conference on Computer Communications, proposed a stripe merging mechanism that is a general mechanism for achieving redundancy conversion. However, the proposed stripe merging method has significant limitations in practical applications. This is because the method imposes strong constraints and specific assumptions on the placement of data between different stripes, thus not supporting continuous conversion and having low practicality.
[0005] Therefore, a new method for merging stripes of locally repairable codes is needed, which not only achieves the optimal performance under the hierarchical network structure, but also supports cascade merging without restricting the layout between stripes. Summary of the Invention
[0006] The purpose of the present invention is to overcome the shortcomings of the existing technology. To achieve the above purpose, a local repairable code strip merging method based on cascade pairing and a storage medium are adopted to solve the problems raised in the above background technology.
[0007] A method for merging locally repairable code strips based on cascade pairing, comprising:
[0008] Step S1: obtaining the slices encoded by the locally repairable code before merging, the slice coding parameters, and the type of requested slice merging, and converting all slice layouts into segment vectors;
[0009] Step S2: Based on the type of stripe merging requested and the segmentation vector, calculate the cost of merging each stripe and output the cost matrix;
[0010] Step S3: merging the stripes by comparing the merging costs and obtaining the stripe pairing merging solution with the minimum cost.
[0011] As a further solution of the present invention: the specific steps of step S1 include:
[0012] First, merging the stripes encoded by the local repair code and the stripe encoding parameters, wherein the stripe encoding parameters include the number of data blocks k, the number of local check blocks l, and the number of global check blocks g;
[0013] Based on the type of stripe merge requested, the number of global parity blocks required for the merged stripe is determined, and all stripe layouts before the merge are converted into segment vectors.
[0014] As a further solution of the present invention: the specific steps of step S2 include:
[0015] According to the quantitative relationship of the number of global check blocks after merging and the obtained segmentation vector, the cost of merging different stripes is calculated, and the cost is measured by the generated network traffic overhead. At the same time, the cost values obtained between different stripes are converted into matrix form.
[0016] As a further solution of the present invention: the specific steps of step S3 include:
[0017] S31. Construct a weighted undirected complete graph based on the obtained cost matrix, and use any minimum weighted matching algorithm to obtain a pairing scheme for the stripes;
[0018] S32. In each cluster where the data blocks in the two stripes to be merged are distributed, select a server whose computer stores the most data blocks in the two stripes, and refer to all selected servers as intermediate servers.
[0019] Based on the segmentation vectors of the two stripes generated in step 1 and the number of global check blocks g' of the merged stripe, the intermediate server downloads all the data blocks of the original stripe in the cluster, forwards the downloaded data blocks or calculates the intermediate blocks before forwarding them to the servers where the final g' new global check blocks are located;
[0020] Finally, g' final nodes calculate and store the global parity block for the new stripe. After the calculation is complete, the data blocks belonging to a particular stripe are moved to the new cluster.
[0021] S33: Update the layout information of the new stripe, that is, complete a stripe merge, and the merged new stripe can be used according to the new request;
[0022] S34. Repeat steps S1 to S3 to perform cascade merging until all merged requests are completed.
[0023] Another aspect of the technical solution is a storage medium storing processor-executable instructions, which are used to implement a method for merging locally repairable code strips based on cascade pairing as described in any one of the above items when executed by the processor.
[0024] Compared with the prior art, the present invention has the following technical effects:
[0025] By adopting the above technical solution and using stripe merging for redundancy conversion, the data transmission across the cluster during the conversion process can be effectively reduced. In the cluster deployment scenario, it effectively saves bandwidth and improves the utilization of system network resources. Moreover, through single-stripe and multi-stripe placement strategies, the system can maintain high fault tolerance and high availability before and after redundancy conversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings:
[0027] Figure 1 A schematic diagram of the steps of the stripe merging method disclosed in the embodiment of the present application;
[0028] Figure 2 A flowchart of a stripe merging method provided in an embodiment disclosed in this application;
[0029] Figure 3 A schematic diagram of the optimal layout of a single stripe in a hierarchical network structure provided by the embodiment disclosed in this application;
[0030] Figure 4A schematic diagram of the optimal stripe layout of the locally repairable code provided in the embodiment disclosed in this application;
[0031] Figure 5 A schematic diagram of merging two bands provided in an embodiment disclosed in the present application using a pairing scheme while maintaining the check blocks unchanged after merging;
[0032] Figure 6 A schematic diagram of sequentially merging two bands provided in an embodiment disclosed in the present application with the check block remaining unchanged after merging;
[0033] Figure 7 A schematic diagram of merging two bands using a pairing scheme in an embodiment disclosed in the present application with doubled parity blocks after merging. DETAILED DESCRIPTION
[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0035] Please refer to Figure 1 and Figure 2 In an embodiment of the present invention, a method and storage medium for merging locally repairable code strips based on cascade pairing include:
[0036] Step S1: Obtain the stripes encoded with the locally repairable code before merging, stripe coding parameters, and the type of requested stripe merging, and convert all stripe layouts into segment vectors. The specific steps include:
[0037] First, merging the stripes encoded by the local repair code and the stripe encoding parameters, wherein the stripe encoding parameters include the number of data blocks k, the number of local check blocks l, and the number of global check blocks g;
[0038] Based on the type of stripe merge requested, the number of global parity blocks required for the merged stripe is determined, and all stripe layouts before the merge are converted into segment vectors.
[0039] In this embodiment, the number of data blocks k, the number of local check blocks l, and the number of global check blocks g corresponding to the local repairable code encoding parameters in the current system are recorded;
[0040] Records the type of stripe merge requested, specifically the number g' of global parity blocks in the new stripe after the merge.
[0041] In this embodiment, data blocks and both types of parity blocks are numbered. Data blocks are numbered Di, local parity blocks are numbered Li, and global parity blocks are numbered Gi. The numbers, from smallest to largest, represent the order in which the data blocks are encoded within the stripe. For example, L0 is a local parity block obtained by encoding data blocks starting from D0 to D((k / l)-1), and so on.
[0042] In the stripe layout shown in the figure of this embodiment, the dotted box represents the cluster, and the solid box in the dotted box represents the server storing the corresponding data block or check block. This embodiment will subsequently directly use data blocks and check blocks to represent the servers where they are stored and directly omit the server description. The transmission of data blocks between clusters requires cross-cluster communication; under this two-layer network structure, the bandwidth resources across clusters are more limited. Therefore, in this embodiment, the data transmission overhead only considers the network traffic that plays a decisive role in the transmission across clusters, and is counted in blocks.
[0043] In this embodiment, the step of converting the local repairable code strip layout into a segmented vector representation includes:
[0044] 1) According to the cluster numbers stored in the data blocks in the stripe, k cluster numbers are arranged sequentially into a vector.
[0045] 2) Based on the k-dimensional vector obtained in 1), divide the k / l numbers into segments, and divide them into l segments in total to obtain a segmented vector representation.
[0046] In this embodiment, Figure 3 As shown in the figure, the steps of converting the stripe layout of the local repairable code into a segmented vector representation are shown. The figure shows the optimal layout of a single stripe of the local repairable code under the hierarchical network structure. The coding parameters of the stripe are (6,2,2), corresponding to 6 data blocks, 2 local check blocks, and 2 global check blocks. Among them, the data blocks D0D1D2 are stored in cluster 1, and D3D4D5 are stored in cluster 2, resulting in a k=6-dimensional vector (1,1,1,2,2,2), which is further divided into l=2 segments, that is, the segmented vector representation is (1,1,1), (2,2,2);
[0047] Step S2: Based on the requested stripe merging type and segment vector, the cost of merging each stripe is calculated and a cost matrix is output. The specific steps include:
[0048] According to the quantitative relationship of the number of global check blocks after merging and the obtained segmentation vector, the cost of merging different stripes is calculated, and the cost is measured by the generated network traffic overhead. At the same time, the cost values obtained between different stripes are converted into matrix form.
[0049] In this embodiment, according to the number of global parity blocks g' of the recorded new stripe, the cost of stripe merging achieved by pairing stripes can be calculated in two cases;
[0050] When g'=g, the two segmented vectors converted in step 1 are first deduplicated and then unioned to obtain a set C of two stripe data block storage clusters. Calculate the total number of data blocks in the two stripes stored in each cluster Ci in C, denoted as ai=ai1+ai2. Simultaneously, calculate the total number of local parity blocks associated with these ai blocks, denoted as li=li1+li2. The number of blocks in these li blocks that exist in cluster Ci is denoted as l'=l'i1+l'2. Then, based on the set T of structural types of the l-segment vectors, pairwise combinations are performed to obtain b combinations, corresponding to b weight parameters W1, W2, ..., Wb.
[0051] When m = ai + l'i - li - g' < = 0, W is min(ai, g'); when m = ai + l'i - li - g' > 0, ki is calculated for each stripe. When li' is 0, ki = ai, and when l'i > 0, ki = ai / l'i + 1. W is min(ai, g') + min(ceil(m / kij) * kij), where ceil(x) represents the ceiling function. The smaller the value of this weight, the better. For all clusters in set C, calculate the corresponding weight Wi using the above method. Add up the corresponding weights of all clusters to obtain the final quantized merge cost W.
[0052] When g' = 2*g, the two segmented vectors converted in step 1 are first deduplicated and then unioned to obtain a set C of two stripe data block storage clusters. Calculate the sum of the number of data blocks in the two stripes stored in each cluster Ci in C, denoted as a. If a <= g', the corresponding weight is a; if a > g', the corresponding weight is g'. Sum the weights Wi corresponding to all clusters in set C to obtain the final quantized merge cost W.
[0053] The following example uses two stripe layouts encoded with locally repairable codes with 6-2-2 parameters, and two merge requests with the goal of generating a new stripe with 12-4-2 parameters or a new stripe with 12-4-4 parameters. The costs calculated for the two requests after following the above steps are shown. The layout before stripe pairing and merging is as follows: Figure 4 As shown, the calculation of the merging cost of stripe 1 and stripe 2 is taken as an example.
[0054] When g'=g, the segment vectors of stripe 1 are (1,1,1), (2,2,2), and the segment vectors of stripe 2 are (1,1,1), (5,5,5). After deduplication and merging, the union C{1,2,5} is obtained. Cluster 1 contains 6 data blocks, and the number of local check blocks associated with these data blocks is 2. This block also has 0 blocks in cluster 1. Therefore, the m value corresponding to this cluster is 2, and the ki value is 3. Therefore, the value of Wi is 3+2=5. Similarly, the m value of clusters 2 and 5 can be calculated to be 0, and the Wi value is 2. Adding them together, the cost value of merging stripes 1 and 2 is 9.
[0055] When g'=2*g, the segmented vectors of stripes 1 and 2 are deduplicated and merged to obtain the union C{1,2,5}. Cluster 1 contains 6 data blocks, which is larger than g'=4. Therefore, the cost value corresponding to this cluster is 4. Similarly, the cost of clusters 2 and 5 can be calculated to be 3. Adding them together, the cost value of merging stripe 12 is 10.
[0056] Step S3: merging the stripes by obtaining the stripe pairing merging solution with the minimum cost based on the merging cost comparison. The specific steps include:
[0057] S31. Construct a weighted undirected complete graph based on the obtained cost matrix, and use any minimum weighted matching algorithm to obtain a pairing scheme for the stripes;
[0058] S32. In each cluster where the data blocks in the two stripes to be merged are distributed, select a server whose computer stores the most data blocks in the two stripes, and refer to all selected servers as intermediate servers.
[0059] Based on the segmentation vectors of the two stripes generated in step 1 and the number of global check blocks g' of the merged stripe, the intermediate server downloads all the data blocks of the original stripe in the cluster, forwards the downloaded data blocks or calculates the intermediate blocks before forwarding them to the servers where the final g' new global check blocks are located;
[0060] Finally, g' final nodes calculate and store the global parity block for the new stripe. After the calculation is complete, the data blocks belonging to a particular stripe are moved to the new cluster.
[0061] S33: Update the layout information of the new stripe, that is, complete a stripe merge, and the merged new stripe can be used according to the new request;
[0062] S34. Repeat steps S1 to S3 to perform cascade merging until all merged requests are completed.
[0063] In this embodiment, the specific implementation steps include:
[0064] Step 1:
[0065] Let the total number of input stripes to be merged be N. For stripe s1, use step 2 to calculate the merging cost generated by merging s1 with stripes s2, s3, s4, ..., sN respectively. For stripe s2, use step S2 to calculate the merging cost generated by merging it with stripes s3, s4, s5, ..., sN, and so on. These costs are expressed as a cost matrix M.
[0066] by Figure 4 For example, after calculating in step 1, the cost matrix of the strips before merging with four parameters of 6-2-2 is shown as follows:
[0067] When g'=g=2, [[#,9,8,8],[9,#,8,10],[8,8,#,8],[8,9,8,#]];
[0068] When g'=2*g=4, [[#,10,12,12],[10,#,12,10],[12,12,#,12],[,12,10,12,#]]
[0069] Considering the cost matrix as an adjacency matrix and running the minimum weighted matching algorithm, we can get the minimum weight matching solution as follows:
[0070] When g'=g=2, {(1,4),(2,3)}; when g'=2*g=4, {(1,2),(3,4)}.
[0071] Step 2:
[0072] According to the pairing scheme obtained in step 1, the strips are merged pairwise. The specific steps are as follows:
[0073] When g'=g=2
[0074] Step a: In the two stripes that need to be merged, select all clusters that store data blocks, and select an intermediate server in each selected cluster. The server first makes a judgment and records the number of data blocks in the current cluster that contain the two stripes to be merged as a'. The number of local check blocks associated with the a blocks in the cluster is l'. The cost generated by the cluster is a'. All data blocks in the two stripes to be merged that are located in this cluster are downloaded and stored in the memory of the intermediate server. According to the size relationship between a' and g', if a' is larger, different local calculation results of g' blocks are calculated locally and stored in the memory of this server. Figure 5In this example, cluster 1 is used as an example. The server containing data block D0 is selected as cluster 1's worker server. It is responsible for downloading data blocks from the servers containing data blocks D1 and D2 in stripe 1 and performing local intermediate calculations on them together with the locally available data block D0. The resulting two local intermediate results are stored in local memory. Clusters 2, 5, and 6 operate similarly, but their descriptions are omitted for brevity.
[0075] Step b: Select a cluster to store the global check block of the new stripe, and select g'=2 servers to store the global check block of the new stripe; then, the intermediate server in step a sends the local intermediate results in the temporary memory to the g' servers respectively; finally, after the g' servers each receive 1 block of intermediate calculation results from the working servers of clusters 1, 2, 5, and 6, they aggregate and calculate the global check block of the merged new stripe and store it in the persistent storage medium. Figure 6 In the example of cluster 3, the intermediate server sends the two intermediate calculation results obtained in step a to the two final servers selected by cluster 3. After each final server has received the local calculation results sent by the intermediate servers of the four other clusters, it calculates the global check block of the new stripe and stores it in the persistent storage medium, such as Figure 5 As shown, please refer to the arrows in the figure for explanation and understanding.
[0076] Step c: In some clusters, data blocks are migrated to new clusters as a whole unit with the local check group. If the cluster Ci has two stripes with a' number of data blocks before merging, and the total number of local check blocks associated with them is li blocks, and the number of blocks in the li blocks that exist in cluster Ci is recorded as l'i blocks, then migration is required if and only if the calculated value of ai+l'i-li-g' is a positive number. The actual number of data blocks that need to be migrated is recorded as A. These A data blocks (or local check blocks) need to belong to the same local check group and be migrated as a whole with the associated local check group. Assume that Figure 4 If stripes 1 and 2 are paired, there are 3 + 3 = 6 data blocks in cluster 1. These blocks belong to two local parity groups, and the local parity blocks in these two local parity groups are not in cluster 1. Therefore, the value of ai + l'i-li-g' is 2, which is a positive number, requiring data block migration. The number of data blocks to be migrated is calculated based on the entire local parity group. In this case, the local parity group contains 3 data blocks, excluding the local parity block, so the calculation is based on 3 data blocks as a whole. At least 3 blocks must be migrated for the value of ai + l'i-li-g' to return to 0. This ensures the optimality of the new stripe layout and facilitates cascade pairing operations.
[0077] As a control, Figure 6Given a case of sequential stripe pairing, under this pairing scheme, a new stripe with 12-4-2 parameters is merged. Then, stripes 1 and 2 are paired, requiring 3*2=6 local computation blocks to be transmitted across clusters. Cluster 1 needs to migrate 1*3=3 data blocks, so the merger of stripes 1 and 2 requires 9 blocks to be transmitted across clusters. Similarly, it can be calculated that the merger of stripes 3 and 4 requires blocks to be transmitted across clusters, so a total of 9+8=17 blocks of local intermediate computation results need to be transmitted. Since cross-cluster data transmission is the decisive factor, this requirement under the patented scheme of the present invention requires a total of blocks, and the comparison shows the superiority of the patented scheme of the present invention.
[0078] When g'=2*g=4, the merging is performed by pairing scheme. Figure 7 To match the instructions
[0079] Steps a and b are exactly the same as those in the case of g'=g. The only difference is that the value of g' is now 2*g instead of g. Figure 7 In the example, stripes 1 and 2 are merged. Cluster 1 contains 3+3=6 data blocks, which is larger than g'=4. Therefore, an intermediate server is needed to calculate the intermediate result. Stripes 3 and 4 are merged, and the cluster contains only 3 data blocks, which is smaller than g'=4. Therefore, the 3 data blocks of this cluster are directly forwarded to an intermediate server in the final cluster. The server distributes the data blocks to the other three servers for calculation within the cluster. In this case, only 3 data blocks need to be transmitted across the cluster at one time. When the global check block of the new stripe is finally calculated, it only needs to be downloaded within the final cluster, and no additional cross-cluster transmission traffic will be generated.
[0080] Step c: This step is different from the case where g'=g. In the case where g'=2*g, no data block needs to be migrated.
[0081] like Figure 7 As shown, the diagram shows the pairing scheme obtained by operating according to this embodiment, which is combined into a new stripe with 12-4-4 parameters. Therefore, a total of 6 local calculation results need to be transmitted, and 0 data blocks need to be migrated. Because cross-cluster data transmission is the decisive factor, the patented solution of this invention requires a total of 8 blocks. However, practitioners of this patent can understand and verify that other pairing schemes are not superior to this patented solution.
[0082] After completing the above operations, the original stripes have been converted from parameters to parameters through stripe pairing. At this time, each new stripe also meets the optimal stripe layout. If stripe merging is required again, the current layout and the new stripe parameters can be used as inputs for step one, and steps one to three can be repeated. Through the above process, based on the stripe pairing method proposed in this patent, any round of stripe merging can be completed. At the same time, professional and technical personnel in this field can understand and verify by themselves that the use of the above pairing strategy of the present invention has the lowest overhead compared to random pairing or sequential pairing stripe merging methods.
[0083] Another aspect of the technical solution is a storage medium storing processor-executable instructions, which are used to implement a method for merging locally repairable code strips based on cascade pairing as described in any one of the above items when executed by the processor.
[0084] Although the embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents, and all should be included within the scope of protection of the present invention.
Claims
1. A method for merging locally repairable code strips based on cascade pairing, characterized in that: include: Step S1: obtaining slices encoded with locally repairable codes before merging, slice coding parameters, and the type of requested slice merging, and converting all slice layouts into segment vectors, wherein the step of converting the slice layout into segment vector representation includes: S11. Arrange k cluster numbers sequentially into a vector according to the cluster numbers stored in the data blocks in the stripe; S12, based on the k-dimensional vector obtained in S11, divide the k / l numbers into one segment, and divide them into l segments in total to obtain a segmented vector representation; Step S2: Based on the requested stripe merging type and segment vector, the cost of merging each stripe is calculated and a cost matrix is output. The specific steps include: According to the number of global check blocks g' of the recorded new stripe, the cost of stripe merging achieved by pairing stripes is calculated in two cases; Case 1: When g'=g, the two segment vectors converted in step S1 are first deduplicated and then unioned to obtain a set C of two stripe data block storage clusters. The total number of data blocks in the two stripes stored in each cluster Ci in C is calculated, denoted as ai=ai1+ai2. The total number of local check blocks associated with the ai block is also calculated, denoted as li=li1+li2. The number of blocks in these li blocks that exist in cluster Ci is denoted as l'=l'i1+l'2. Then, according to the set T of structure types of the l-segment vectors, pairwise combinations are performed to obtain b combinations, corresponding to b weight parameters W1, W2, ..., Wb. When m=ai+l'i-li-g'<=0, W is min(ai,g'); when m=ai+l'i-li-g'>0, ki is calculated for each stripe, when li' is 0, ki=ai, and when l'i>0, ki=ai / l'i+1; W is min(ai,g')+min(ceil(m / kij)*kij), where ceil(x) represents the ceiling rounding function; the smaller the weight value, the better; for all clusters in the C set, calculate the corresponding weight value Wi according to the above steps, accumulate the corresponding weights of all clusters, and obtain the final quantized merge cost value W; Case 2: When g'=2*g, the two segmented vectors converted in step S1 are first deduplicated and then unioned to obtain a set C of two stripe data block storage clusters. The sum of the number of data blocks in the two stripes stored in each cluster Ci in C is calculated, denoted as a. If a<=g', the corresponding weight is a; if a>g', the corresponding weight is g'. The weight values Wi corresponding to all clusters in set C are accumulated to obtain the final quantized merge cost W. Step S3: merging the stripes by comparing the merging costs and obtaining the stripe pairing merging solution with the minimum cost.
2. The method for merging locally repairable code strips based on cascade pairing according to claim 1, characterized in that: The specific steps of step S1 include: First, a stripe encoded by a local repair code before merging and stripe encoding parameters are obtained, wherein the stripe encoding parameters include the number of data blocks k, the number of local check blocks l, and the number of global check blocks g; Based on the type of stripe merge requested, the number of global parity blocks required for the merged stripe is determined, and all stripe layouts before the merge are converted into segment vectors.
3. The method for merging locally repairable code strips based on cascade pairing according to claim 1, characterized in that: The specific steps of step S2 include: According to the quantitative relationship of the number of global check blocks after merging and the obtained segmentation vector, the cost of merging different stripes is calculated, and the cost is measured by the generated network traffic overhead. At the same time, the cost values obtained between different stripes are converted into matrix form.
4. The method for merging locally repairable code strips based on cascade pairing according to claim 1, characterized in that: The specific steps of step S3 include: S31. Construct a weighted undirected complete graph based on the obtained cost matrix, and use any minimum weighted matching algorithm to obtain a pairing scheme for the stripes; S32. In each cluster where the data blocks in the two stripes to be merged are distributed, select a server whose computer stores the most data blocks in the two stripes, and refer to all selected servers as intermediate servers. Based on the segmentation vectors of the two stripes generated in step 1 and the number of global check blocks g' of the merged stripe, the intermediate server downloads all the data blocks of the original stripe in the cluster, forwards the downloaded data blocks or calculates the intermediate results and then forwards them to the servers where the final g' new global check blocks are located; Finally, g' final nodes calculate and store the global parity block for the new stripe. After the calculation is complete, the data blocks belonging to a particular stripe are moved to the new cluster. S33: Update the layout information of the new stripe, that is, complete a stripe merge. The merged new stripe can repeat steps S1 to S3 again according to the new request, and perform cascade merge until all merge requests are completed.
5. A storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions are used to implement the method for merging locally repairable code strips based on cascade pairing as claimed in any one of claims 1 to 4 when executed by the processor.
Citation Information
Patent Citations
Erasure code optimization method for distributed storage system
CN107094186A
Method, device and system for improving LRC code repair performance in distributed storage cluster
CN110347526A