A method, system, device and medium for improving TP-RAID decoding speed
By improving the encoding method of TP-RAID, dividing it into stripe groups and optimizing load balancing, the problem of limited TP-RAID decoding speed was solved, and the number of data blocks read in the event of a single or two errors was reduced, thus improving the working speed.
Patent Information
- Application Number
- CN202210832068.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-07-15
AI Technical Summary
The current TP-RAID decoding speed is limited by the amount of data read when a single disk fails, affecting the operating speed, especially in distributed storage servers, where RAID5 and 6 cannot meet the current needs of large-scale data storage.
By improving the encoding method of TP-RAID, it is divided into stripe groups. When a single error occurs, only the remaining disks in the disk group where the error occurred and any stripe in the remaining disk group are read, reducing the number of data blocks read. The encoding and decoding process is optimized by using load balancing.
When a single error occurs in TP-RAID, the number of data blocks read is reduced by mn/3, and when two errors occur, the number of data blocks read is reduced by mn/6, thus improving decoding speed.
Smart Images

Figure CN115185462B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data storage, and particularly relates to a method, system, device and medium for improving the decoding speed of TP-RAID. BACKGROUND
[0002] With the rapid development of communication technology and network technology, digital information is growing exponentially, and data storage technology has thus faced great challenges. The reliability of data in storage systems and the energy consumption of storage systems are increasingly concerned by people. Nowadays, in the face of such a huge data size, the reliability of data in storage systems and the number of components contained in storage systems are inversely proportional, that is, the more the number of components of the storage system, the lower the reliability of data in the storage system. According to relevant investigations, in an Internet data center composed of 600 disks, about 30 disks will be damaged every month, and in a large-scale storage system, the data reliability decline caused by disk failure is a serious problem, and people have carried out research on related fault-tolerant technologies.
[0003] RAID technology has been widely used in today's distributed storage servers, and RAID5 and 6 can recover one or two error data blocks, but each data recovery is still limited by the speed of reading a large amount of data from each disk. With the development of technology, the life of the disk is increasing, and the amount of data stored in the server is larger, and the RAID technology has gradually failed to meet the current storage needs, so there is a demand for TP-RAID, which can support three error RAID algorithms at the same time compared to RAID5 and 6. A small number of manufacturers have begun to study TP-RAID, but it has not yet formed a fixed implementation method. In the prior art, when the common error application scenario of TP-RAID (99.75% of errors occur in single disk errors) occurs, all of its disks need to be read, which affects the decoding speed and thus the working speed. SUMMARY
[0004] Therefore, the application provides a method, system, device and medium for improving the decoding speed of TP-RAID. The method for improving the decoding speed of TP-RAID is designed based on the traditional RAID, and is improved for the common application scenarios (99.75% errors occur in a single disk error). In this way, when a single error occurs, the number of strips is m and the number of disks is n, the reading of mn / 3 data blocks can be reduced for the recovery (degraded reading) of any error, and the reading of mn / 6 data blocks can be reduced for two errors. Therefore, the data reading is reduced and the working speed is improved.
[0005] To achieve the above object, one aspect of an embodiment of the application provides a method for improving the decoding speed of TP-RAID, which comprises the following steps: setting a strip unit for reading TP-RAID, dividing the TP-RAID into combinations of strip groups according to the strip unit; setting a disk group for encoding and decoding the TP-RAID according to the number of disks, obtaining a data disk group and a check disk group; establishing a relationship between each strip group and the corresponding data disk group and check disk group, and realizing the encoding of the TP-RAID according to the relationship; in response to a single error occurring in the TP-RAID, reading the remaining disks of the disk group where the single error occurs and the disks of any strip in the remaining disk group, and realizing the decoding of the TP-RAID according to the relationship.
[0006] In some embodiments, the step of setting a strip unit for reading TP-RAID and dividing the TP-RAID into combinations of strip groups according to the strip unit comprises: setting the strip unit for reading TP-RAID as 3 strips, and dividing the TP-RAID into combinations of 3 strips according to the 3 strips.
[0007] In some embodiments, the method further comprises: in response to two errors occurring in the TP-RAID and the two errors occurring in the same disk group, reading the remaining disks of the disk group where the two errors occur and the disks of any two strips in the remaining disk group, and realizing the decoding of the TP-RAID according to the relationship.
[0008] In some embodiments, the method further comprises: in response to two errors occurring in the TP-RAID and the two errors occurring in different disk groups, selecting any disk group to read the disks without errors, and reading the disks of any two strips in the remaining disk group, and realizing the decoding of the TP-RAID according to the relationship.
[0009] In some embodiments, the step of setting disk groups for encoding and decoding of the TP-RAID according to the number of disks includes: in response to the number of disks being even, equally dividing the TP-RAID into data disk groups and check disk groups; and in response to the number of disks being odd, dividing the TP-RAID into data disk groups and check disk groups with a difference of 1 in the number of groups.
[0010] In some embodiments, the step of establishing a relationship between each stripe group and corresponding data disk groups and check disk groups, and implementing encoding of the TP-RAID according to the relationship includes: establishing a relationship between each stripe in the stripe group and corresponding data disks and check disks according to the disk position of the check code of the TP-RAID, and obtaining a specific value of the check code according to the relationship to implement encoding of the TP-RAID.
[0011] In some embodiments, the step of establishing a relationship between each stripe group and corresponding data disk groups and check disk groups, and implementing encoding of the TP-RAID according to the relationship further includes: left-rotating the position of the stripe corresponding to the disk where the check code is located in the stripe group to achieve load balancing.
[0012] Another aspect of the embodiments of the present application also provides a system for improving decoding speed of a TP-RAID, the system comprising the following modules: a first module configured to set a stripe unit for reading the TP-RAID, and divide the TP-RAID into a combination of stripe groups according to the stripe unit; a second module configured to set disk groups for encoding and decoding of the TP-RAID according to the number of disks, to obtain data disk groups and check disk groups; a third module configured to establish a relationship between each stripe group and corresponding data disk groups and check disk groups, and implement encoding of the TP-RAID according to the relationship; and a fourth module configured to, in response to a single error occurring in the TP-RAID, read the remaining disks of the disk group where the single error is located and the disks of any stripe in the remaining disk group, and implement decoding of the TP-RAID according to the relationship.
[0013] Another aspect of the embodiments of the present application also provides a computer device comprising at least one processor, and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of any of the above methods.
[0014] Another aspect of the embodiments of the present application also provides a computer readable storage medium storing a computer program executable by a processor to implement the steps of any of the above methods.
[0015] The present application has at least the following beneficial effects: the present application provides a method, system, device and medium for improving the decoding speed of TP-RAID. Among them, the method for improving the decoding speed of TP-RAID improves the encoding mode, architecture division and decoding mode of TP-RAID, which can reduce the reading of disk amount and improve the decoding speed in the common application scenario of TP-RAID error (99.75% error occurs in single disk error). Generally speaking, the strip division meets the multiple of 3, the disk amount meets the even number n, and the use of the present application can reduce the reading of mn / 3 data blocks in the recovery (degradation reading) scene of any error. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained without creative labor on the basis of these drawings.
[0017] Figure 1 The schematic diagram of an embodiment of the method for improving the decoding speed of TP-RAID provided by the present application is shown in the figure.
[0018] Figure 2 The schematic diagram of another embodiment of the method for improving the decoding speed of TP-RAID provided by the present application is shown in the figure.
[0019] Figure 3 The schematic diagram of an embodiment of the system for improving the decoding speed of TP-RAID provided by the present application is shown in the figure.
[0020] Figure 4 The schematic diagram of an embodiment of the computer device provided by the present application is shown in the figure.
[0021] Figure 5 The schematic diagram of an embodiment of the computer readable storage medium provided by the present application is shown in the figure. DETAILED DESCRIPTION
[0022] The embodiments of the present application are described below. However, it should be understood that the disclosed embodiments are only examples, and other embodiments can take various alternative forms.
[0023] In addition, it needs to be explained that all the expressions of "first" and "second" in the embodiments of the application are used to distinguish two same name non-same entities or non-same parameters, and it can be seen that "first" and "second" are only for the convenience of description, and should not be understood as the limitation of the embodiments of the application, and the subsequent embodiments will not be described one by one. The terms "include", "contain" or any other variation thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device containing a series of elements not only includes those elements, but also can include elements not explicitly listed or inherent to these processes, methods, articles or devices.
[0024] One or more embodiments of the present application will be described below with reference to the accompanying drawings.
[0025] As a high-performance and high-reliability storage technology, RAID technology has been widely used in people's production and life. RAID mainly uses data striping, data checking and mirroring technology to obtain strong performance, higher reliability, better fault tolerance and strong scalability. According to different data application requirements, the strategies and architectures of the three technologies can be used or combined, so according to different strategies and architectures, RAID can be divided into different levels: RAID0, 1, 5, 6, 10.
[0026] Among them, RAID0 is the earliest RAID mode, that is, data stripping technology. RAID0 is the simplest form of building a disk array, which only needs two or more hard disks, has low cost, and can improve the performance and throughput of the entire disk. RAID0 does not provide redundancy or error correction capability, but the implementation cost is the lowest.
[0027] The simplest implementation of RAID0 is to connect N same hard disks together in a large volume set through a hardware intelligent disk controller or a software disk driver in the operating system. In use, computer data is written to each hard disk in turn, and its greatest advantage is that it can increase the capacity of the hard disk by an integer multiple. For example, if three 80GB hard disks are used to form a RAID0 mode, the disk capacity will be 240GB. In terms of speed, it is exactly the same as a single hard disk. The biggest disadvantage is that if any hard disk fails, the entire system will be destroyed, and the reliability is only 1 / N of a single hard disk.
[0028] RAID1 is called disk mirroring, the principle is to mirror the data of a disk to another disk, that is, the data is written to a disk at the same time, and a mirror file is generated on another idle disk, which maximizes the reliability and repairability of the system without affecting performance, as long as at least one of any pair of mirror disks in the system can be used, even when half the number of hard drives fail, the system can still run normally, when a hard drive fails, the system will ignore the hard drive and use the remaining mirror disk to read and write data, with good disk redundancy. Although this is absolutely safe for data, the cost will also increase significantly, the disk utilization is 50%, with four 80GB capacity hard drives, the available disk space is only 160GB. In addition, the RAID system with a hard drive failure is no longer reliable, and the damaged hard drive should be replaced in time, otherwise the remaining mirror disk will also be damaged, and the entire system will crash. After replacing the new disk, the original data needs to be synchronized for a long time, and the data access from the outside will not be affected, but the performance of the entire system will be reduced. Therefore, RAID1 is mostly used in situations where important data needs to be saved.
[0029] RAID5 (Distributed Parity Independent Disk Structure). Its parity code exists in all disks, where p0 represents the parity value of the 0th band area, and the others have the same meaning. The read efficiency of RAID5 is very high, the write efficiency is general, and the block collective access efficiency is good. Because the parity code is on different disks, the reliability is improved. However, it does not solve the parallelism of data transmission well, and the design of the controller is also quite difficult. For RAID5, most data transmission only operates on one disk, which can be operated in parallel. In RAID5, there is "write loss", that is, each write operation will generate four actual read / write operations, two of which read old data and parity information, and two of which write new data and parity information.
[0030] RAID6 is an independent disk structure with two kinds of distributed storage parity codes. It is an extension of RAID5, mainly used in situations where data cannot be absolutely wrong. Since the second parity value is introduced, N+2 disks are required, and the design of the controller becomes very complex, further improving the data reliability of the disk array. More space is needed to store the check value, and there is a higher performance loss in the write operation.
[0031] RAID technology is widely used in today's distributed storage servers, RAID5 and 6 can recover one or two error blocks respectively, but each time data recovery is still limited by the speed of a large amount of data reading of each disk. Therefore, there is a demand for TP-RAID, compared with RAID5, 6, TP-RAID, as the name implies, is a RAID algorithm that can support three errors at the same time. It has not formed a fixed implementation way, but based on the algorithm principle, that is, the RAID relationship constructed by the three linear equations can have a unique solution, the application proposes an improved implementation way of decoding the traditional three linear equations constructed TP-RAID. Through such improvement, the TP-RAID group formed can have less data reading and faster decoding speed when a single error occurs.
[0032] Based on the above purpose, the first aspect of the embodiment of the application provides an embodiment of a method for improving the decoding speed of TP-RAID. Figure 1 The embodiment of the method for improving the decoding speed of TP-RAID provided by the application is shown in the schematic diagram. Figure 1 The method for improving the decoding speed of TP-RAID provided by the embodiment of the application comprises the following steps:
[0033] S1, setting the strip unit of reading TP-RAID, and dividing the TP-RAID into a combination of strip groups according to the strip unit;
[0034] S2, setting the disk group of the TP-RAID for encoding and decoding according to the number of disks, obtaining the data disk group and the check disk group;
[0035] S3, establishing the relationship between each strip group and the corresponding data disk group and check disk group, and realizing the encoding of the TP-RAID according to the relationship;
[0036] S4, in response to a single error of the TP-RAID, reading the remaining disks of the disk group where the single error is located and the disks of any strip in the remaining disk group, and realizing the decoding of the TP-RAID according to the relationship.
[0037] The first aspect of the embodiment of the application provides an embodiment of a method for improving the decoding speed of TP-RAID. Figure 2 Another embodiment of the method for improving the decoding speed of TP-RAID provided by the application is shown in the schematic diagram.
[0038] The algorithm principle of the traditional TP-RAID uses:
[0039]
[0040] P1P2P3 represents the three checks generated when TP-RAID encoding, a represents the parameters used in the encoding, in order to achieve a cubic equation solution this purpose, the key is the selection of a, based on the algorithm relationship of the three linear equations we know, based on Gaussian elimination, we know that the unknown number has and has a unique solution condition is:
[0041] Let:
[0042] Let:
[0043]
[0044] Let:
[0045]
[0046] Equation (2) using Gaussian elimination for TP-RAID deformation, we know that in order to get the encoding information p1p2p3 solution, assuming the value of a*d on the left side of the xyz, respectively, can have the relationship of formula (2), and then based on the change of Gaussian elimination, finally get as shown in formula (2). We know that if the above TP-RAID can have a solution condition is:
[0047]
[0048] We know that the condition is that the unknown number corresponding to the parameter of the 3*3 matrix must be full rank, then there is and only one solution. Because the encoding is for the matrix relationship of p1p2p3, decoding is the matrix relationship of any three corresponding parameters of d and p, then it is explained that in order to be effective, TP-RAID in formula (1) corresponding to any three column parameter matrix must be full rank, that is, as formula (4) represents:
[0049]
[0050] x, y, z in formula (1) represent the positions of p1, p2, p3 in the formula, the positions are determined by the strip relationship in the disks corresponding to the RAID group, when the server is built, in order to ensure that the IO pressure of each disk is the same, load balancing is achieved, usually the load balancing algorithm is used to evenly place them on each disk. At this time, there are 6 disks, RAID6 is built, so 3 of them are user data disks, and 3 are check disks, in order to meet the load balancing, the left-handed unaligned mode is selected for example. Correspondingly, the common method of load balancing also has left-handed alignment, right-handed unaligned and right-handed alignment, the four are similar in actual performance, and are randomly used in actual application. Therefore, left-handed unaligned is used for example here. In the above example, p1, p2, p3 of strip 1 are respectively at positions 4, 5, and 6, so the corresponding xyz is 456, and similarly, the xyz of strip 2 is 345.
[0051] Based on the relationship of formula (1), the encoding method is adjusted, and the minimum unit of encoding and decoding after adjustment is 3 strips, that is, whether encoding or decoding, the minimum unit of data reading each time is the reading data block involved in the encoding and decoding requirement of three strips. After reading three strips, the encoding and decoding data values involved in three strips are completed at the same time.
[0052] Three strips are read at the same time, satisfying the same algorithm principle relationship of formula (1) (satisfying formula (4) formed). When encoding, first divide the disks into group A and group B according to the total amount of the disks, the division method is to divide by 2, when the amount of the disks is odd, the difference between group A and group B is 1. After dividing group A and group B, each strip does not only encode the data of its own strip, but also satisfies the three relationships in formula (1) at the same time.
[0053]
[0054] Based on formula (5), the calculation of check code p1-p9 is completed, and the encoding of RAID6 is completed.
[0055] And the calculation of p1-p9, we know that we realize the related operation of every three strips here, so the relationship of formula (4) also becomes the premise condition that the 9*9 matrix is all full rank and invertible. Taking formula (5) as an example, the relationship of p1-p9 can be represented as:
[0056]
[0057] For formula (6), based on p1-p9 as unknowns, the parameter setting matrix H9 can be represented as:
[0058]
[0059] The condition that p1-p9 has and has only one solution is that the matrix H9 is full rank. A matrix transformation is performed on H9 to obtain H9':
[0060]
[0061] Based on the observation of H9', it is divided into three 3*9 matrices according to p1-p3, p4-p6 and p7-p9, each sub-matrix is full rank, and based on the matrix transformation of formula (7), the diagonal is full rank, and the non-diagonal is obtained based on the Gaussian elimination operation and the condition of formula (4). The final H9' has a rank of 9, so it is full rank and has only one solution, which satisfies the encoding relationship of TP-RAID. Similarly, test the relationship under different load balancing, the basic relationship of realizing full rank under the condition of formula (4) does not change, so the encoding scheme realized by the application is feasible.
[0062] The encoding method of the realized TP-RAID is to perform matrix inversion on the matrix H9, and set the value on the right side of formula (6) as a column vector A, and the calculation relationship is:
[0063]
[0064] In the implementation of the application described above, the division of the strip is determined by the designer under normal circumstances, so it can be directly divided into a multiple of 3, and encoded according to every 3 strips. If the user decides that the number of strips is not a multiple of 3, the basic TP-RAID encoding in formula (1) can be realized for the remaining strips that do not meet the multiple of 3.
[0065] The decoding case is considered below.
[0066] For one to three error cases, the decoding (degraded reading) of the traditional TP-RAID is the same as the encoding, and all the remaining data needs to be taken out. The application sets every three strips for encoding and decoding, and in different scenarios:
[0067] a. Single error
[0068] When decoding a single error, first determine whether the error occurs in group A or group B, read all the data blocks in the surviving (correct) group where the error occurs, and then read all the data blocks in any strip in the other group (the group where the error does not occur) to complete the decoding.
[0069] Because disk 1 has an error, it is in group A, so first read all the data of disks 2 and 3. Then select the data of any strip in group B to read. In order to illustrate, here strip 1 is selected to read, that is, p1p2p3 three data blocks are read, and the corresponding decoding relationship based on formula (5) is:
[0070]
[0071] The same method is applicable to reading the strip 2 or strip 3 of group B.
[0072] Under such a decoding method, when an error of any one disk occurs, only 9 data blocks are needed, while under the algorithm of the conventional RAID, all data blocks are needed, i.e. 15 data blocks. In comparison, the reading of 6 data blocks can be reduced. Nowadays, the working speed of storage is limited only by the reading and writing speed of the disk. Therefore, the less the data blocks are read, the faster the working speed is.
[0073] Under such an implementation, assuming that the strip quantity satisfying the multiple relationship of 3 under strip division is m, and the disk quantity satisfying the even number is n, then under the recovery (degraded reading) scenario of any one error of the present application, the reading of mn / 3 data blocks can be reduced.
[0074] b. Two errors
[0075] When any two errors occur, the conventional RAID needs to read all the remaining data.
[0076] In the present embodiment, if errors of the disks 1 and 2 occur, then the decoding mode is as follows:
[0077] b.1 When two errors occur in the same group, taking the errors of the disks 1 and 3 as an example for illustration. At this time, for the example of the errors of the six data blocks d1d3d4p4d7p7 needing to be recovered, the data in the group (group A) where the errors are located needs to be read completely, and the data of the other group (group B) can be read from two strips. Here, for the purpose of example, the first and second strips are read, and the data relationship is as follows:
[0078]
[0079] Based on the above description, it can be known that the formula (10) can complete the decoding based on the RAID6 mode (two unknowns). According to the labels 1, 2 and 3 in the formula (10), three groups of RAID6 are formed, and the decoding is performed. At this time, it can be known that the data blocks read are 12, and the reading of 3 blocks is reduced.
[0080] In the same way, according to the above mode, the reading of mn / 6 data blocks can be reduced.
[0081] b.2 When two errors occur in different groups, taking the errors of the disks 1 and 4 as an example for illustration. At this time, for the example of the errors of the six data blocks d1d4d7p1p5p9 needing to be recovered, the data relationship is as follows:
[0082]
[0083] At this time, the data in the error group (group A) needs to be read completely, and the data in the other group (group B) can be read by two strips optionally, and here, we read the first and second strips for example. The decoding relationship achieved is described in formula (11), and the unknowns need to be solved by inverse matrix of the six relationships established in formula (11) due to the cross relationship, so as to achieve decoding. However, the parameters are known in advance, and different value modes affect the values on the right side of the matrix. Similarly, according to the above mode, the reading of mn / 6 data blocks can be reduced.
[0084] The second aspect of the embodiment of the present application provides a system for improving the decoding speed of TP-RAID. Figure 3 The embodiment of the system for improving the decoding speed of TP-RAID provided by the present application is shown in the schematic diagram. As shown in the figure, Figure 3 The embodiment of the system for improving the decoding speed of TP-RAID provided by the present application includes: a first module configured to set the strip unit for reading TP-RAID, and divide the TP-RAID into combinations of strip groups according to the strip unit; a second module configured to set the disk group for encoding and decoding the TP-RAID according to the number of disks, to obtain the data disk group and the check disk group; a third module configured to establish the relationship between each strip group and the corresponding data disk group and check disk group, and to realize the encoding of the TP-RAID according to the relationship; and a fourth module configured to read the remaining disks in the disk group where the single error occurs and the disks in any strip in the remaining disk group in response to the occurrence of the single error in the TP-RAID, and to realize the decoding of the TP-RAID according to the relationship.
[0085] Based on the above purpose, the third aspect of the embodiment of the present application provides a computer device, Figure 4 The embodiment of the computer device provided by the present application is shown in the schematic diagram. As shown in the figure, Figure 4 As shown in the figure, the embodiment of the computer device provided by the present application includes the following modules: at least one processor 021; and a memory 022, which stores computer instructions 023 executable on the processor 021.
[0086] The present application also provides a computer readable storage medium. Figure 5 The embodiment of the computer readable storage medium provided by the present application is shown in the schematic diagram. As shown in the figure, Figure 5 As shown in the figure, the computer readable storage medium 031 stores a computer program 032 which is executed by the processor to perform the above method.
[0087] Finally, it needs to be explained that all or part of the processes in the above-mentioned embodiment methods can be implemented by a computer program to instruct relevant hardware to complete, and the program of the method of setting system parameters can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. Among them, the storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding any method embodiments.
[0088] In addition, the method disclosed in the embodiments of the present application can also be implemented as a computer program executed by a processor, which can be stored in a computer readable storage medium. When the computer program is executed by the processor, the above-mentioned functions defined in the method disclosed in the embodiments of the present application are executed.
[0089] In addition, the above-mentioned method steps and system units can also be implemented by using a controller and a computer readable storage medium for storing a computer program for enabling the controller to implement the above-mentioned steps or unit functions.
[0090] Those skilled in the art will also appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the functions in various ways for each particular application, but such an implementation decision should not be interpreted as causing a departure from the scope of the embodiments disclosed herein.
[0091] In one or more exemplary designs, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or other wire-based, fiber-based, or wireless technologies, then the coaxial cable, fiber optic cable, twisted pair, DSL, or other wire-based, fiber-based, or wireless technologies are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0092] The foregoing is a summary of the example embodiments disclosed herein, but it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the claims. The functions, steps and / or actions of the method claims described herein need not be performed in any particular order. Furthermore, although elements of the embodiments disclosed herein can be described or claimed in individual form, other embodiments can also include a plurality of those elements in combination.
[0093] It should be understood that, as used herein, "a" or "an" can mean one or more things unless context clearly indicates otherwise. It should also be understood that "and / or" as used herein means any and all possible combinations of one or more of the associated listed items.
[0094] The above example embodiment numbers of the embodiments disclosed herein are merely for description, and do not represent the advantages or disadvantages of the embodiments.
[0095] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0096] Those skilled in the art shall understand that the above discussion of any embodiment is only exemplary, and is not intended to imply that the scope (including claims) of the embodiments of the present application is limited to these examples; the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A method for improving TP-RAID decoding speed, characterized in that, include: Setting the stripe unit for reading TP-RAID, and dividing the TP-RAID into a combination of stripe groups based on the stripe unit, includes: setting the stripe unit for reading TP-RAID to 3 stripes, and dividing the TP-RAID into a combination of 3 stripes based on the 3 stripes; Based on the number of disks, the disk groups for encoding and decoding of the TP-RAID are set to obtain data disk groups and parity disk groups, which includes: in response to the even number of disks, dividing the TP-RAID into data disk groups and parity disk groups; in response to the odd number of disks, setting the difference between the number of data disk groups and parity disk groups divided by the TP-RAID to 1; Establish the relationship between each stripe group and its corresponding data disk group and parity disk group, and implement the encoding of the TP-RAID according to the relationship; In response to a single error occurring in the TP-RAID, the remaining disks in the disk group where the single error occurred and the disks in any stripe of the remaining disk group are read, and the TP-RAID is decoded according to the relationship. In response to the occurrence of two errors in the TP-RAID and the occurrence of the two errors in the same disk group, the remaining disks in the disk group where the two errors occur and the disks of any two stripes in the remaining disk group are read, and the TP-RAID is decoded according to the relationship. In response to the occurrence of two errors in the TP-RAID and the two errors occurring in different disk groups, any disk group is selected to read the disks that did not experience errors, and any two stripes of disks in the remaining disk groups are read, and TP-RAID decoding is performed according to the relationship.
2. The method according to claim 1, characterized in that, The process of establishing the relationship between each stripe group and its corresponding data disk group and parity disk group, and implementing the TP-RAID encoding based on the relationship, includes: Based on the disk location of the TP-RAID checksum, establish the relationship between each stripe in the stripe group and its corresponding data disk and checksum disk, and obtain the specific value of the checksum based on the relationship to realize the encoding of the TP-RAID.
3. The method according to claim 2, characterized in that, The step of establishing the relationship between each stripe group and its corresponding data disk group and parity disk group, and implementing the TP-RAID encoding based on the relationship, further includes: In the stripe group, the position of the stripe corresponding to the disk where the check code is located is rotated left and misaligned to achieve load balancing.
4. A system for improving TP-RAID decoding speed, characterized in that, include: The first module is configured to set the stripe unit for reading TP-RAID and to divide the TP-RAID into a combination of stripe groups according to the stripe unit. The second module configures the disk groups for encoding and decoding the TP-RAID according to the number of disks, resulting in a data disk group and a parity disk group; The third module is configured to establish the relationship between each stripe group and the corresponding data disk group and parity disk group, and to implement the encoding of the TP-RAID according to the relationship; as well as The fourth module is configured to, in response to a single error occurring in the TP-RAID, read the remaining disks in the disk group where the single error occurred and the disks in any stripe of the remaining disk group, and decode the TP-RAID according to the relationship. The first module is also used to set the stripe unit for reading TP-RAID to 3 stripes, and to divide the TP-RAID into a combination of 3 stripes according to the 3 stripes; The second module is further configured to, in response to an even number of disks, divide the TP-RAID into data disk groups and parity disk groups; and in response to an odd number of disks, set the difference between the number of data disk groups and parity disk groups in the TP-RAID to 1. as well as Modules used to implement the following functions: In response to the occurrence of two errors in the TP-RAID and the occurrence of the two errors in the same disk group, the remaining disks in the disk group where the two errors occur and the disks of any two stripes in the remaining disk group are read, and the TP-RAID is decoded according to the relationship. In response to the occurrence of two errors in the TP-RAID and the two errors occurring in different disk groups, any disk group is selected to read the disks that did not experience errors, and any two stripes of disks in the remaining disk groups are read, and TP-RAID decoding is performed according to the relationship.
5. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-3.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Data coding method and device, equipment and medium
CN114153651A