Disk reconstruction performance optimization method based on erasure codes
By using the directed acyclic shortest path model and depth-first traversal pruning technology in erasure coded disk arrays, the disk reconstruction process is optimized, solving the problem of low efficiency when a single disk error occurs, and improving the reconstruction performance of the disk array. .
Patent Information
- Application Number
- CN202410244903.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In disk arrays based on erasure coding, the efficiency of the disk reconstruction process is limited by the generation time and execution time of the plan. Especially in the case of a single disk error, the existing technology cannot effectively optimize the total amount of data read and the degree of load balancing. , resulting in low reconstruction efficiency.
Using the directed acyclic shortest path model, through depth-first traversal and pruning operations, comprehensively considering the total amount of data read and load balancing indicators, the optimal disk reconstruction plan is generated and selected to optimize the disk array reconstruction process.
It significantly improves the performance of the disk array during disk reconstruction, reduces the time complexity and the amount of read data, improves the degree of load balancing, and achieves more efficient selection and execution of disk reconstruction solutions.
Smart Images

Figure CN118535375A
Abstract
Description
Technical Field
[0001] The present application relates to the fields of data storage, disaster backup, and data security management, and more specifically, to a method for optimizing the performance of a disk reconstruction process in a disk array based on erasure coding. Background Art
[0002] With the development of computer technology and big data technology, data is growing faster and faster, but the development of storage systems is relatively slow. Storage systems are facing great challenges, so their performance has received extensive attention from the academic community. Disks are widely used in storage systems, but as a physical device, they are prone to errors and damage, which is inevitable. In order to reduce the loss caused by data loss in the disk, cheap disk array technology (RAID for short) can be used in the storage system.
[0003] RAID is widely used in current storage systems. Its principle is to organize several independent disks together to form a disk array, and adopt specific coding and fault-tolerant technology so that the disks in the disk array can read and write data in parallel, and when a disk in the disk array fails or is damaged, the lost data can be reconstructed based on the data information or verification information stored in other disks. Among all the error situations, single-disk errors dominate, so this patent is aimed at the situation of single-disk errors.
[0004] The simplest fault-tolerance technology in RAID is multi-way mirroring technology, which means that multiple copies of data on a disk are copied and then stored in other disks of the disk array. This method is very simple and efficient in the process of reading, writing and restoring data, because it does not involve encoding and decoding technologies, but simply copies, so the time efficiency is the highest. However, this method is very unfriendly to space and brings a lot of extra overhead. At least twice the space is required for fault tolerance, so this method is rarely used in practice.
[0005] RAID can adopt the method of erasure coding. Its principle is to divide the original data that needs to be backed up or fault-tolerant into multiple copies, and use these data to calculate some redundant data according to the encoding rules of the corresponding erasure code, and store these original data and redundant data in different disks of the disk array. When some data is lost, the original data can still be reconstructed according to the remaining data. The use of erasure codes can improve space utilization, use less space, and achieve higher fault tolerance. It is currently widely used in disk arrays. Erasure codes can be divided into erasure codes based on Galois fields and erasure codes based on exclusive OR operations (XOR) according to the rules of operation. This patent is aimed at erasure codes based on XOR.
[0006] In a disk array based on erasure codes, once data is erroneous or lost, data recovery and reconstruction are required. In the process of data reconstruction, there are two main aspects that affect the efficiency of disk reconstruction. One is the time to generate a disk reconstruction plan. Currently, there is insufficient research in this area, and generally all plans are brute-force traversed, which has a high time complexity. The second is the execution time of the disk reconstruction plan. Current research mainly targets a specific type of erasure code, so it does not fully consider factors such as the total amount of data read during the disk reconstruction process and the load balancing degree of the disk array. Summary of the invention
[0007] This patent proposes a disk reconstruction performance optimization method based on erasure code to address the above core issues. The main purpose is to generate a disk reconstruction plan more quickly when disk reconstruction is performed due to errors or loss in the disk array based on erasure code, and the plan can optimize the efficiency of disk reconstruction based on any XOR operation erasure code.
[0008] There are many types of erasure codes. Different erasure codes have different focuses. The focus during disk reconstruction is also different. Some erasure codes focus on the total amount of data read during disk reconstruction, while others are not sensitive to this. The factors affecting disk reconstruction mainly include the total amount of data read and the degree of load balancing. The total amount of data read indicates how much data the disk array must read to reconstruct the erroneous data during disk reconstruction; RAID is read in parallel, so in some cases, the disk with the largest load in the disk array, that is, the disk with the largest amount of data read, affects the reconstruction efficiency. The degree of load balancing refers to the balance of the amount of data read by each disk in the disk array. We use load balancing indicators to represent the degree of load balancing. The data read amount of the disk with the largest amount of data read in the disk array can be used to represent the load balancing indicator. The larger the load balancing indicator, the worse the load balancing degree of the disk array. This patent comprehensively considers the total amount of data read and the load balancing indicator during disk reconstruction. The following is the search process of this patent for disk reconstruction solutions.
[0009] In the process of generating disk reconstruction schemes, this patent adopts a directed acyclic shortest path model. The principle is to use the disk reconstruction scheme as a node in the model, and prune it by reading the total amount of data and the load balancing index of the disk array during the traversal process, thereby reducing the time complexity of model traversal. In the shortest path model, a node is a vector, which represents the disk reconstruction scheme when traversing from the root node to the node. The number of elements in the vector is the sum of the number of data blocks and check blocks in the disk array. The 1 and 0 elements in the vector indicate whether it is necessary to read the block represented by the element in the vector. The traversal method is depth-first traversal. The root node is a vector of all 0s, indicating that no data in the disk needs to be read at the starting point of the shortest path model. In the depth-first traversal process, the i-th layer node (i starts from 0) represents the reading of the disk block by the reconstruction scheme when reconstructing the i-th disk error block. E i represents the set of reconstruction solutions for the i-th disk error block. During the traversal process, the vector value of the i+1-th layer node Y is the sum of the vector of the i-th layer node X and E i The edge from node X to node Y is also represented by a vector, which contains three elements, namely the total amount of read data and load balancing index of the disk reconstruction scheme when traversing to node Y and the weighted sum of the first two elements. The smaller the element in the vector, the higher the priority of the scheme. The elements of the vector are used to perform pruning operations of the shortest path model during the traversal process. Please note that a scheme must be completely traversed before the subsequent scheme can be pruned, that is, there must be a path traversed to the leaf node first.
[0010] The overall architecture of the disk reconstruction performance optimization method based on erasure coding described in this patent is as follows: Figure 1As shown in FIG. 1 , the system mainly consists of three parts, namely: (1) an erasure code system, including an erasure code encoding and decoding rule module and a disk reconstruction focus analysis module. The encoding and decoding rule module is used to provide erasure code encoding and decoding rules and generate a set of disk reconstruction solutions; the disk reconstruction focus analysis module is used to analyze the importance of different influencing factors in the disk reconstruction process, expressed as weights. (2) a disk reconstruction performance optimization system, which optimizes and selects disk reconstruction solutions according to the erasure code system. It includes an error or lost data acquisition module, a disk reconstruction solution acquisition module, and a disk reconstruction solution selection module. The error or lost data acquisition module is used to obtain a data set that needs to be reconstructed. The disk reconstruction solution acquisition module obtains all disk reconstruction solutions based on the data set that needs to be reconstructed and the erasure code system. The disk reconstruction solution selection module selects the optimal disk reconstruction solution from all disk reconstruction solutions according to the importance of different erasure code influencing factors. The selection process is the search process for disk reconstruction solutions. (3) a disk reconstruction execution system, including a disk reconstruction execution module and a disk reconstruction performance analysis module. The disk reconstruction execution module makes a reconstruction plan for the disk array based on the selected theoretically optimal disk reconstruction solution. The disk reconstruction performance analysis module is used to record and provide feedback on the performance of the disk reconstruction process.
[0011] The process of the disk reconstruction performance optimization method based on erasure coding described in this patent is as follows: Figure 2 The detailed description is as follows:
[0012] Step 1: To optimize the disk reconstruction performance based on erasure codes, it is first necessary to parse the encoding and decoding rules of the erasure code system and save the interfaces provided by the erasure code system for operating the erasure code system, including the encoding interface, decoding interface, and interface for generating a set of disk reconstruction solutions.
[0013] Step 2: After parsing the encoding and decoding rules of the erasure code system, it is necessary to obtain the set of erroneous or lost elements in the disk array. The ultimate goal of this patent is to find the optimal method to reconstruct the set.
[0014] Step 3: Evaluate the importance of various influencing factors in disk reconstruction. The influencing factors in this patent mainly include the total amount of data read and the load balancing index. The weight method can be used to express their importance.
[0015] Step 4: Generate a set of disk reconstruction schemes based on the encoding and decoding rules provided by the erasure code system and the set of erroneous or lost elements in the disk array. Each erroneous or lost element may have multiple reconstruction schemes.
[0016] Step 5: Through the disk reconstruction scheme search process in this patent, search for the theoretically optimal disk reconstruction scheme among all generated disk single block error disk reconstruction schemes.
[0017] Step 6: After obtaining the theoretically optimal solution, execute the optimal solution through the disk reconstruction execution module. If the efficiency of the optimal solution meets expectations, the process ends and the results are fed back; if the efficiency is low, it is fed back to the erasure code system, and the importance of the factors affecting disk reconstruction is adjusted, and the optimal solution is obtained and tested again.
[0018] The disk reconstruction performance optimization method based on erasure codes described in this patent solves the problem of selecting a solution when a disk array is reconstructed after a single disk error occurs. First, the erasure code system is used to obtain interfaces related to the erasure code, and all disk reconstruction solutions are obtained based on the erroneous disk blocks and the interfaces provided by the erasure code system. Then, a shortest path model is established to search for disk reconstruction solutions, and a series of pruning operations are performed during the traversal process. The total amount of data read and load balancing indicators during the disk reconstruction process are comprehensively considered to obtain the theoretically optimal disk reconstruction solution. After the theoretically optimal disk reconstruction solution is executed, if the execution result does not meet expectations, it can be fed back to the erasure code system to adjust the importance of the influencing factors to obtain a more efficient disk reconstruction solution. Through a series of means, the performance of the disk array during disk reconstruction can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of this patent, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this patent. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 The overall architecture diagram of the disk reconstruction performance optimization method based on erasure coding provided by this patent;
[0021] Figure 2 A flow chart of the disk reconstruction performance optimization method based on erasure coding provided by this patent;
[0022] Figure 3 A collection of disk reconstruction solutions provided by this patent;
[0023] Figure 4 The shortest path model diagram of the disk reconstruction solution provided by this patent; DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of this patent clearer, the technical solution in the embodiments of this patent will be clearly and completely described below in conjunction with the drawings in the embodiments of this patent. Obviously, the described embodiments are part of the embodiments of this patent, not all of them. Based on the embodiments in this patent, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this patent.
[0025] In the embodiments of this patent, since the business systems of different users are different to varying degrees, the core applications and the complexity of the architecture are all different, and this example is only used as an example. In this example, the Jerasure library is used to conduct experiments, which provides a series of commonly used erasure code systems and scalable Galois field operations. The erasure code system uses Liberation encoding, and the encoding and decoding module is provided by the Liberation encoding library in Jerasure. The structure of this encoding is very beautiful in mathematics, and the load balancing degree in the reconstruction process is good. Therefore, it mainly focuses on the total amount of read data during the disk reconstruction process. The focus analysis module in disk reconstruction can set the influence weight of the total amount of read data to 0.7, and set the influence weight of the load balancing index to 0.3. The total amount of data read is represented by m, and the load balancing index n is represented by the data read amount of the disk with the largest amount of data read in the disk array. The erroneous or lost data is the data in disk X. The set of reconstruction schemes for a certain error i is E i . In order to reconstruct all the data in X, the set of disk reconstruction solutions is F. Then for the element F in F i , the weighted sum of the total amount of data read by this solution and the load balancing index s = 0.7*m+0.3*n. The smaller s is, the higher the priority of this solution.
[0026] The search process of the shortest path model in this patent is as follows: i represents the set of reconstruction schemes for the i-th disk error block (i starts from 0), such as Figure 3 As shown, where e a,b represents the reading of disk blocks by the b-th reconstruction scheme of the a-th error block during reconstruction (a and b both start from 0). For the sake of convenience, assume that the scheme consists of two disks, each with four blocks, then e a,b The first four elements represent the read status of the four blocks of the first disk during reconstruction, and the last four elements represent the read status of the four blocks of the second disk during reconstruction. a,b If the element is 0, it means that the data block represented by the element does not need to be read. Otherwise, it means that the data block represented by the element needs to be read. For example, e 0,0is 10100111, which means that the 0th reconstruction scheme when reconstructing the 0th error block is: read the 0th and 2nd blocks from the first disk, and read the 1st, 2nd, and 3rd blocks from the second disk. The shortest path model of the disk reconstruction scheme is as follows: Figure 4 As shown, the root node is a vector of all 0s, and the vector value of the i+1th layer node is the sum of the vector of the i-th layer node and E i The edge from the i-th layer node to the i+1-th layer node is also represented by a vector, which contains three elements, namely the total amount of read data and load balancing index of the disk reconstruction solution when traversing to the i+1-th layer node and the weighted sum of the first two elements. Figure 4 Part of the shortest path model is drawn in the figure. Pruning operations can be performed when traversing the shortest path model. In this example, the weighted sum of two elements is used to prune the subsequent paths, so that the disk reconstruction schemes can be traversed as little as possible, and then the best scheme can be found among these schemes. The weight in the path to the leaf node is the amount of data that needs to be read and the load balancing index obtained when traversing to the end of the disk reconstruction scheme, as well as the weighted sum of the first two parameters. Then, the theoretically optimal disk reconstruction scheme is selected from all the schemes that can traverse to the leaf node. Figure 4 It can be seen that in Figure 4 The second leaf node in the scheme (Scheme 2) represents a weighted sum of the total amount of data read and the load balancing index of 5.1, so pruning can be performed in the subsequent traversal process without the need for further traversal. Figure 4 Other solutions with larger weighted sums of total read data and load balancing indicators are shown (Scenarios 3 and 4).
[0027] After obtaining the theoretical optimal solution, the solution is executed through the disk reconstruction execution module to test the efficiency of the theoretical optimal solution. In this embodiment, the disk reconstruction efficiency of the theoretical optimal solution meets expectations, so the execution result is recorded and the process ends.
[0028] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this patent, rather than to limit it. Although this patent has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of this patent.
Claims
1. A method for optimizing the performance of a disk reconstruction process in a disk array based on erasure coding, characterized in that: In the process of optimizing disk reconstruction performance, a directed acyclic shortest path model is established to optimize the search for disk reconstruction solutions. By considering the emphasis of different erasure codes, the corresponding disk reconstruction solution is obtained and executed.
2. The method according to claim 1, characterized in that The total amount of data read and load balancing indicators during the disk reconstruction process are taken as the main influencing factors in the disk reconstruction process, and the erasure code system is used as the data and operation providing system. The disk reconstruction performance optimization system establishes the shortest path model and processes various data to obtain the theoretical optimal solution. The disk reconstruction execution system executes the solution and feeds back the execution results.
3. The erasure code system according to claim 2, wherein: The erasure code system can provide an operation interface for encoding and decoding the erasure code and an operation interface for generating a disk reconstruction plan based on erroneous data. At the same time, it is also necessary to provide the focus of the erasure code on the factors affecting the disk reconstruction process, so as to realize the dynamic selection of the disk reconstruction plan.
4. The disk reconstruction performance optimization system according to claim 2, characterized in that: Through a series of operation interfaces provided by the erasure code system and the data that needs to be reconstructed, the shortest path model is used for traversal, and the search process is optimized through pruning operations to obtain the priority of the disk reconstruction plan and select the theoretically optimal plan.
5. The disk reconstruction execution system according to claim 2, characterized in that: After executing the theoretically optimal disk reconstruction plan, the execution efficiency will be recorded. If the reconstruction efficiency does not meet expectations, it can be fed back to the erasure code system and the focus of the erasure code can be modified before re-executing the optimization method.
Citation Information
Patent Citations
Caching method and system for single disk restoration of disk array
CN106294032A
Heterogeneous network single node repairing method and system based on erasure codes
CN113721851A
Method for repairing invalid storage block in erasure code storage system and related equipment
CN114237985A
