A data block placement method, system and storage medium for an erasure code storage system

By mapping the data blocks of the erasure coded storage system into hypergraphs and partitioning, the small-write problem is solved and the performance of the distributed storage system is improved.

CN114625560BActive Publication Date: 2025-09-02CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210136986.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-15
Publication Date
2025-09-02
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

The existing erasure coded storage system is greatly affected by the small-write problem in the data block placement method, resulting in lower performance of distributed storage systems.

Method used

The data blocks in the access sequence are mapped into hypergraphs, the correlation degree of each data block is determined based on hyperede edges, and the hypergraph files are divided into N hypergraph partition files, and the data blocks are placed based on N hypergraph partition files and preset placement methods to reduce the performance loss caused by lowercase operations.

Benefits of technology

By reducing the number of IO times and network overhead of the storage system during update, the performance of the distributed storage system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625560B_ABST
    Figure CN114625560B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of cloud storage technology, and discloses a data block placement method, system, and storage medium for an erasure code storage system. The method maps data blocks in an access sequence into a hypergraph, determines the relevance of each data block based on hyperedges, partitions the hypergraph file into N hypergraph partition files based on the relevance of the data blocks, and places the data blocks based on the N hypergraph partition files and a preset placement method. This method utilizes a data block placement scheme that takes relevance into account, and placing relevance-related data blocks in the same stripe can significantly mitigate the performance loss caused by small-write issues, thereby reducing the number of I / O operations and network overhead during storage system updates and improving the performance of distributed storage systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud storage technology, and in particular to a method, system and storage medium for placing data blocks in an erasure code storage system. Background Art

[0002] Data availability and reliability are crucial for storage systems. As the number of nodes in storage systems increases and storage media becomes more diverse and complex, the probability of media errors or potential sector errors within the storage media increases. To achieve high scalability and ensure high data availability and reliability, distributed storage systems retain redundant data to facilitate data recovery in the event of failures. Adding data replicas is a common redundancy mechanism, but replicas can consume significant bandwidth and cause data congestion during data writes and restores, significantly increasing storage overhead. Erasure coding is another redundancy scheme that encodes data blocks into check blocks and stores them in separate locations. This ensures the same reliability as replicas while significantly reducing storage redundancy. Erasure coding is increasingly being used in storage system design due to its high fault tolerance and efficient space utilization. For example, the fault tolerance capabilities of storage systems such as RAID, Robustore, and OceanStored are based on erasure coding.

[0003] Erasure coding technology is used in storage systems primarily to encode raw data using an erasure coding algorithm to create redundancy, and then store both the data and the redundancy together to achieve fault tolerance. Taking the most common Reed Solomon (RS) code as an example, it takes k raw data blocks as input and calculates r parity blocks as output. This RS code, denoted as (k,r), can retrieve all the original data from any k of the data and parity blocks. Typically, these blocks are placed on different servers to maximize the storage system's fault tolerance, ensuring reliable data service even when any r servers fail. Both RS(4,2) and the default three-way replication mode (3-way replication) provided by the Hadoop Distributed File System (HDFS) can tolerate the failure of two servers simultaneously. However, RS(4,2) only consumes 1.5 times the storage space of the original data, while the three-way replication mode requires 3 times the storage space of the original data.

[0004] Compared to replication, erasure coding offers a compromise between storage overhead, data reliability, and data access performance, but it inevitably introduces new challenges. Data in erasure coding is dispersed across different nodes, resulting in inefficient data updates and recovery. For example, to update a single RS(k,r)-encoded data block, it is necessary to retrieve other data blocks, regenerate the parity block, and write it to the node where the original parity block resides. This is the small-write problem, which severely restricts the performance of distributed storage systems. Existing data block placement methods are significantly affected by the small-write problem, resulting in poor performance in distributed storage systems. Summary of the Invention

[0005] The present invention provides a data block placement method, system and storage medium for an erasure code storage system, so as to solve the problem that the existing data block placement method is greatly affected by the small-write problem, thereby resulting in low performance of the distributed storage system.

[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for placing data blocks in an erasure code storage system based on a hypergraph, comprising:

[0008] Mapping the data blocks in the access sequence into a hypergraph, the hypergraph comprising vertices and hyperedges, and converting the hypergraph into a hypergraph file, wherein each vertex is a data block;

[0009] determining a degree of relevance of each data block based on the hyperedge;

[0010] Dividing the hypergraph file into N hypergraph partition files based on the correlation degree of the data blocks, wherein the correlation degree of the data blocks in the same hypergraph partition file is higher than a first preset value, and the correlation degree of the data blocks in different hypergraph partition files is lower than a second preset value, and the first preset value is greater than the second preset value;

[0011] The data blocks are placed based on the N hypergraph partition files and a preset placement method.

[0012] Optionally, placing the data blocks based on the N hypergraph partition files and a preset placement method includes:

[0013] Mapping each hyperedge in each of the N hypergraph partition files into a stripe;

[0014] The data block corresponding to the hyperedge is obtained, and the data block corresponding to the hyperedge is placed in the stripe.

[0015] Optionally, mapping the data block into a hypergraph includes:

[0016] Determining the number of data blocks in an access sequence and setting a preset number of data blocks in each stripe;

[0017] Traversing the access sequence in sequence, when the number of data blocks obtained is equal to the preset number, intercepting the subsequence, mapping the data blocks to vertices of a hypergraph, connecting all data blocks in the subsequence to form a hyperedge, and using the number of times the data blocks appear in the subsequence as the weight of the data block, wherein the weight of each hyperedge is the sum of the weights of all vertices in the hyperedge;

[0018] And so on, until the entire access sequence is traversed, and a hypergraph is formed based on all subsequences intercepted during the traversal process.

[0019] Optionally, when the number of data blocks in a hypergraph partition file among N hypergraph partition files is inconsistent with the preset number, the excess data blocks in the hypergraph partition file are placed in a separate sequence, and when the number of data blocks in the hypergraph partition file is less than the preset number in the subsequent sequence, data blocks are taken out from the separate sequence to supplement the number.

[0020] Optionally, according to the data block placement method for an erasure coded storage system according to claim 1, mapping the data blocks in the access sequence into a hypergraph comprises:

[0021] Obtain all access sequences and divide all access sequences into a first partial sequence and a second partial sequence, wherein the data blocks in the first partial sequence are used to be mapped into a hypergraph; and the second partial sequence is used for write request access to the data blocks;

[0022] The proportion of the first part of the sequence to the entire access sequence is used as the analysis ratio, and the timing of mapping the data blocks in the first part of the sequence to the hypergraph is optimized according to the analysis ratio.

[0023] Optionally, before mapping the data blocks in the access sequence into a hypergraph, the method further includes:

[0024] Construct the total performance loss model cost(F) as:

[0025]

[0026] Where a ij Indicates whether data block i is in data stripe j. If so, the value is 1, otherwise the value is 0. j indicates the stripe number involved in the file modification, t indicates the number of check blocks in each stripe, i indicates the data block number involved in the file modification, S j Represents the set of all data blocks in stripe j.

[0027] Before placing the data blocks based on the N hypergraph partition files and the preset placement method, the method further includes:

[0028] The preset placement mode is set according to the total performance loss model.

[0029] In the second aspect, the present application also provides an edge unloading system based on Zhongzhiji, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, and when the processor executes the computer program, the steps of the method described in the first aspect above are implemented.

[0030] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method steps described in the first aspect.

[0031] Beneficial effects:

[0032] The data block placement method for an erasure code storage system provided by the present invention maps data blocks in an access sequence into a hypergraph, determines the relevance of each data block based on hyperedges, partitions the hypergraph file into N hypergraph partition files based on the relevance of the data blocks, and places the data blocks based on these N hypergraph partition files and a preset placement method. This implements a data block placement scheme that takes relevance into account. Placing relevance-sensitive data blocks into the same stripe can significantly mitigate the performance loss caused by small-write issues, thereby reducing the number of I / O operations and network overhead during storage system updates and improving the performance of distributed storage systems.

[0033] In a preferred embodiment of the present invention, an intuitive and easy-to-use total performance loss model is constructed to represent the performance loss brought to the storage system, which can unify the benchmark for measuring performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a specific example of RS code RS(4,2);

[0035] Figure 2 This is a specific example of LRC(4,2,2);

[0036] Figure 3 This is a flow chart of a data block placement method for an erasure code storage system according to a preferred embodiment of the present invention;

[0037] Figure 4 A schematic diagram of related data blocks in different stripes;

[0038] Figure 5 A schematic diagram showing related data blocks in the same stripe;

[0039] Figure 6A schematic diagram of a hypergraph described in Table 1 of a preferred embodiment of the present invention;

[0040] Figure 7 Comparison of the number of IO times for different erasure codes when updating data;

[0041] Figure 8 Schematic diagram of the number of check block updates in a fixed time interval of the stripe organization algorithm under different analysis rates in this embodiment;

[0042] Figure 9 is the number of data recovery times triggered by read requests in different access sequences in this embodiment. DETAILED DESCRIPTION

[0043] The following is a clear and complete description of the technical solutions of the present invention. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.

[0044] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.

[0045] First, it should be noted that in a distributed storage system, the block storing data is called a data block, and the block storing redundant information is called a redundant block or a parity block. Existing erasure codes can be divided into two categories: maximum-distance-separable (MDS) codes and non-MDS codes (such as GRID codes and STAR codes). The MDS code property is an important property of erasure codes. It ensures that any m disks out of n = m + r disks can recover data, or it can be expressed as the code tolerating the failure of any r = nk disks without losing data. Traditional RS codes and CRS codes both have the MDS property. Some recently proposed codes such as Rotated RS and Local Repair Codes

[20] often sacrifice the MDS property to reduce the repair overhead.

[0046] like Figure 1 As shown, Figure 1 A specific example of the RS code RS(4,2) is given, where m = 4 and r = 2. It can tolerate two node failures simultaneously. It satisfies the MDS property. The original data (D) is divided into m equal-sized data blocks (D1, D2, D3, D4). Parity check blocks P1 and P2 are generated by operations on a reversible coding matrix (also known as a generator matrix or distribution matrix). The data blocks and check blocks are stored on different nodes.

[0047] In traditional RS coding, when a single data fragment is lost, it is necessary to read all data fragments and some check blocks to repair the data. For example, if one data fragment of RS (4,2) code is lost, it is necessary to read 3 data blocks and 1 check block to calculate the lost data. Local RS Code (LRC) is an improvement based on RS code. Its basic idea is to divide the check block into a global check block and a local check block, that is, to improve the efficiency of data recovery through a certain amount of data redundancy. For example, when data fragment D1 is lost, the data can be recovered only through the local check blocks L1 and D2. Figure 2 As shown, Figure 2 A specific example of LRC(4,2,2) is given. When only one data block is damaged, it can be reconstructed within the group it belongs to. The worst case scenario for single data block damage is global parity block damage, requiring all data blocks to be read for reconstruction.

[0048] Based on this, this application provides a data block placement method for an erasure code storage system. Figure 3 As shown, the method includes:

[0049] Mapping the data blocks in the access sequence into a hypergraph, the hypergraph including vertices and hyperedges, and converting the hypergraph into a hypergraph file, wherein each vertex is a data block;

[0050] Determine the relevance of each data block based on the hyperedge;

[0051] Dividing the hypergraph file into N hypergraph partition files based on the correlation degree of the data blocks, wherein the correlation degree of the data blocks in the same hypergraph partition file is higher than a first preset value, the correlation degree of the data blocks in different hypergraph partition files is lower than a second preset value, and the first preset value is greater than the second preset value;

[0052] Place data blocks based on N hypergraph partition files and preset placement methods.

[0053] The data block placement method for an erasure code storage system described above maps data blocks in an access sequence into a hypergraph and determines the relevance of each data block based on hyperedges. Based on the relevance of the data blocks, the hypergraph file is divided into N hypergraph partition files, and data blocks are placed based on these N hypergraph partition files and a preset placement method. This implements a data block placement scheme that takes relevance into account. Placing related data blocks in the same stripe can significantly mitigate the performance loss caused by small-write issues, thereby reducing the number of I / O operations and network overhead during storage system updates, and improving the performance of distributed storage systems.

[0054] Optionally, before mapping the data blocks in the access sequence into a hypergraph, the method further includes:

[0055] Construct the total performance loss model cost(F) as:

[0056]

[0057] Where a ij Indicates whether data block i is in data stripe j. If so, the value is 1, otherwise the value is 0. j indicates the stripe number involved in the file modification, t indicates the number of check blocks in each stripe, i indicates the data block number involved in the file modification, S j Represents the set of all data blocks in stripe j.

[0058] Before placing the data blocks based on the N hypergraph partition files and the preset placement method, the method further includes:

[0059] The preset placement mode is set according to the total performance loss model.

[0060] In this optional embodiment, in an n-of-(n+t) erasure coded storage system with t fault tolerance, a stripe consists of n data blocks and t check blocks, which satisfy the following linear equation:

[0061]

[0062] Among them, X i,j (1≤i≤t,1≤j≤n) is a binary coefficient matrix, typically composed of the identity matrix and a Vandermonde matrix or a Cauchy matrix. ⊕ represents binary matrix addition, and ⊙ represents binary matrix multiplication. D represents different data blocks, and P represents the check block.

[0063] When a small-write operation updates data block D j(1≤j≤n), it will use read-modify-write to update all t parity blocks in the same stripe (i.e. P1, P2...Pt). In this process, the old data block First the new data block is read from disk, then At the same time, all t old check blocks (ie, P1, P2..., P i ), calculate the new check block (i.e. The generated check block will be placed in location).

[0064]

[0065] Among them, Incr i Represents the parity block P i The increment of The calculation shows that the final t new parity checks are written to the disk where the original checksum is located. Assuming that each read / write of a single checksum block consumes 1 unit of IO resource, the IOs and bandwidth loss involved in the process of modifying a single data block are as follows:

[0066] cost(F)=2(t+1);

[0067] When a stripe contains multiple data blocks, the modification cost is calculated as:

[0068] cost=2(t+i) (2)

[0069] Therefore, if the user's modification operation on file F involves i data blocks in j stripes, the total performance loss is:

[0070]

[0071] a ij Indicates whether data block i is in data stripe j. If so, the value is 1; otherwise, the value is 0.

[0072] When modifying the same number of data blocks, i.e., i remains unchanged, formula (3) shows that the performance of small-write operations is directly linearly positively correlated with the concentration of data blocks in different stripes. For example, assume two extreme cases: when all data blocks involved in the modified file are located in different stripes, i.e., j = i, cost = i·2(t+1), the performance is the worst; when all data blocks involved in the modified file are concentrated in a few stripes as much as possible, i.e., j = i÷n, j is the smallest, the performance is the best, and cost = (i / n)·2(t+i). The summary is as follows:

[0073]

[0074] In reality, the modifications that users make to storage system files during use often involve more than just a single stripe. Therefore, when setting the preset placement method, consider placing the relevant data blocks involved in user file modifications into as few stripes as possible.

[0075] Below, we will use an example as a basis to verify the feasibility of the factors considered when setting the preset placement method above.

[0076] In an n-of-(n+α) erasure code storage system with α fault tolerance, we use the configuration n=4, α=2, i.e. RS(4,2). The two cases of formula (3) are discussed separately. When a user modifies a file, four different data blocks are involved, namely D1, D5, D6, and D7. Figure 4 As shown in Figure 1, Di is a data block and Pi is a parity block. Data blocks and parity blocks in the same row belong to the same stripe, and data blocks or parity blocks in the same column are placed on the same server.

[0077] When modifying a file, the system first reads and modifies the four data blocks D1, D5, D9, and D13. The system then reads all the parity blocks in the stripe containing these four data blocks: (P1, P2), (P3, P4), (P5, P6), and (P7, P8). The system then calculates the new parity blocks and writes them to the original parity blocks.

[0078] According to Formula 3, cost = 4 × 2 (2 + 1) = 24. If we place the data blocks involved in this file modification into the same stripe, that is, when j is minimized, as shown in Figure 5 As shown, cost = (4 / 4) × 2 (2 + 4) = 12 times.

[0079] In the preceding example, by placing related data blocks in the same stripe, the number of small-write operations with regard to I / O and network transmission is reduced by 12 times, significantly reducing the impact of small-write operations on the performance of the erasure code storage system.

[0080] In summary, placing related data blocks in the same stripe is an effective way to reduce the impact of small-write operations on the performance of erasure coded storage systems.

[0081] Optionally, mapping the data block into a hypergraph includes:

[0082] Determining the number of data blocks in an access sequence and setting a preset number of data blocks in each stripe;

[0083] Traversing the access sequence in sequence, when the number of data blocks obtained is equal to the preset number, intercepting the subsequence, mapping the data blocks to vertices of a hypergraph, connecting all data blocks in the subsequence to form a hyperedge, and using the number of times the data blocks appear in the subsequence as the weight of the data block, wherein the weight of each hyperedge is the sum of the weights of all vertices in the hyperedge;

[0084] And so on, until the entire access sequence is traversed, and a hypergraph is formed based on all subsequences intercepted during the traversal process.

[0085] Optionally, placing the data blocks based on the N hypergraph partition files and a preset placement method includes:

[0086] Mapping each hyperedge in each of the N hypergraph partition files into a stripe;

[0087] The data block corresponding to the hyperedge is obtained, and the data block corresponding to the hyperedge is placed in the stripe.

[0088] It's important to note that a hypergraph is a generalization of a graph, where edges can be sets of any given vertices, rather than just sets of two vertices like in a regular graph. Using a simple graph to assess the correlation between two vertices can only be done by adding weights between adjacent nodes, making it difficult to account for correlations between non-adjacent vertices in the same access sequence. Therefore, the hypergraph model overcomes the drawback of a simple graph, which can only represent bidirectional relationships between two vertices, and can represent local aggregate information between multiple vertices. In erasure-coded storage systems, the correlations between data blocks can be represented using a hypergraph.

[0089] For a given hypergraph G = (V, E, w), V is the set of vertices in the hypergraph G, E is the set of hyperedges in the hypergraph, and w is the set of hyperedge weights. For any hyperedge, e∈E is a subset of vertices in V. For a hyperedge e∈E, the degree of the hyperedge is defined as the number of vertices contained in the hyperedge: δ(e) = |e|. In the hypergraph, the degree of a vertex v∈E is defined as the sum of the weights of all hyperedges containing that vertex:

[0090] dv)=∑ {e∈E|v∈V} w(e)

[0091] For a given hypergraph G = (V, E, w), hypergraph partitioning means that there exists a hypergraph cut (HypergraphCut) that partitions the vertex set of the hypergraph into vertex set S and its complement S c Two subsets. For subset S, it is the same as S c The boundary of is defined as a hyperedge set:

[0092] This hyperedge set splits the vertex set of the hypergraph H into S and S cTwo subsets. The degree volS of a subset S is defined as the sum of the degrees of the vertices in S:

[0093]

[0094] The volume of the boundary hyperedge set, volδS, is defined as:

[0095]

[0096] For a subset S and its complement S c , the volumes at the boundaries of the two are equal, that is, volδS=volδS c =vol(S,S c ). The volume of the hyperedge boundary can be regarded as the degree of connection between two vertex subsets, while the volume of the vertex subset can be regarded as the degree of connection between the vertices within the subset. Therefore, it is necessary to find a hypergraph cut to split the hypergraph into two subsets. The connection between these two subsets is sparse, while the connection between the vertices within the subset is dense. Therefore, the hypergraph partitioning problem can be transformed into the following optimization problem, that is, the normalized partitioning of the hypergraph G can be defined as:

[0097]

[0098] The hypergraph mapped by the data blocks in the storage system is divided into two subgraphs. The connection between the subgraphs is sparse, and the connection within the subsets is tight, which means that the vertices (i.e., data blocks) within the subgraphs have a certain degree of correlation.

[0099] In order to evaluate the correlation between data blocks, DISH needs to first construct a hypergraph G(V,E,w). n In the initialization of the hypergraph G(V,E,w), the data block set D is mapped to the vertex set V and the hyperedge set E: F(D)→(V,E,w). D={d0,…,d n} is the set of data blocks in the access stream. F is a mapping function that maps all data blocks in the access stream into vertices in the hypergraph, and hyperedges are sets of vertices at different time distances. (D i ∈λ j )→E i , where λ j (j=1,2...n) represents n different data blocks in the order of access. In actual application scenarios, w i The weight of the hyperedge is the sum of the weights of all vertices in the hyperedge, w i The larger the value of i Vertices (i.e. data blocks) v1, v2...v n The stronger the correlation between ∈V.

[0100] In summary, the process of mapping the access sequence into a hypergraph can be expressed as:

[0101] Obtain the number of data blocks in the sequence (BlockNums), set the number of data blocks in each stripe (m), and traverse the access sequence in sequence. When the number of data blocks obtained equals m, intercept the subsequence. Data blocks are mapped to vertices of the hypergraph. All data blocks (i.e., vertices) in the subsequence are used as a hyperedge. The number of occurrences of a data block in the subsequence serves as the weight of the data block. The weight of the hyperedge is the sum of the weights of all vertices in the hyperedge. The resulting hypergraph file format is shown in Table 1.

[0102] Table 1 Hypergraph files

[0103]

[0104] The hypergraph described in Table 1 is as follows Figure 6 shown.

[0105] After the hypergraph is initialized, the hypergraph is partitioned to find related data blocks and place them in the same stripe. The hypergraph G(V,E,w) is divided into k disjoint (non-empty, union is V) subsets V0, V1, V2, V3...V k-1 , then P={V0,…,V k-1} is called k-way partitioning of the hypergraph G, and its subset is called a partition.

[0106] The commonly used objective function for hypergraph partitioning is to minimize the hyperedge-cut. Another frequently used objective is to minimize the sum of external degrees of all hyperedges across multiple partitions (minimize the sum of external degrees SOED). For a k-way hypergraph partition and a hyperedge e, if the hyperedge e is not partitioning (cut), the external degree is equal to 0, otherwise the external degree is equal to the number of partitions spanned by the hyperedge e. If the hyperedge contains vertices belonging to different partitions, the hyperedge will be cut, and we seek to minimize the cut metric. Where, λ i (H,P)≤k is the number of partitions spanned by hyperedge i in partition P. This metric is called the (k-1)-cut.

[0107]

[0108] HMETIS provides the Shmetis program, which can be used to calculate k-way partitions. After obtaining the hypergraph partition file, data block placement is performed. This program performs partitioning using the V-Cycle Refinement algorithm. The idea behind this refinement algorithm is to further improve the quality of the hypergraph partitioning using a multi-level paradigm. The algorithm consists of two phases: coarsening and refinement. The coarsening phase preserves the initial partitioning input to the algorithm. In the coarsening scheme, vertices in the vertex groups of the coarse graph correspond to belonging to only one of the two partitions. The original assignment is preserved through the coarsening process and becomes the initial partition for refinement in the unadjusted phase. The refinement algorithm moves vertices between partitions as long as this action improves the quality of the assignment. The original hypergraph is further improved through coarsening and refinement, helping to climb out of local minima.

[0109] In summary, data block placement using hypergraph partition files can be expressed as:

[0110] In the hypergraph partition file, each hyperedge is mapped to a stripe, and each vertex in the hyperedge is used as a data block in the stripe. After the hypergraph is split, there may be an inconsistency in the number of partition data blocks. In this case, the extra vertices are placed at the end of the sequence to make up for it. For example, if the erasure code setting is RS(4,2), that is, four data blocks per stripe, and a hypergraph has 22 vertices, the hypergraph may be split into 6 subgraphs (for example, 5 subgraphs with 4 vertices and 1 subgraph with only 2 vertices). The vertices in the first 5 subgraphs correspond to the data blocks of a stripe, but there are 2 extra vertices. Here, the extra 2 vertices will be placed in a separate sequence. If the number of vertices in the split subgraph is less than the set number of stripe data blocks, data blocks will be taken from this sequence to make up for it. Finally, if there are still data blocks left in this sequence, these data blocks will be divided into stripes according to the original method (a continuous number of blocks constitutes a stripe).

[0111] Thus, taking the hypergraph file as input, the hypergraph partitioning algorithm can generate a hypergraph partition file, which contains the relationship between the data blocks and the stripes they belong to. The hypergraph partition file consists of V lines, each with a number. The i-th line of the file contains the partition number to which the i-th vertex belongs.

[0112] Optionally, mapping the data blocks in the access sequence into a hypergraph includes:

[0113] Obtain all access sequences and divide all access sequences into a first partial sequence and a second partial sequence, wherein the data blocks in the first partial sequence are used to be mapped into a hypergraph; and the second partial sequence is used for write request access to the data blocks;

[0114] The proportion of the first part of the sequence to the entire access sequence is used as the analysis ratio, and the timing of mapping the data blocks in the first part of the sequence to the hypergraph is optimized according to the analysis ratio.

[0115] In this optional embodiment, the data blocks in the first partial sequence are used to be mapped into a hypergraph; the second partial sequence is used for write requests to access the data blocks. In this way, the accuracy of the hypergraph partitioning scheme can be verified. Generally, the more parts used for analysis, the higher the accuracy.

[0116] The performance of the method of the present application and the comparative example is verified by experiments. Specifically, DISH, which uses the data block placement algorithm proposed in the present application, is tested and compared with CASO and BSO.

[0117] The data block access sequences in the distributed storage system used in the experiment are derived from real block-level traces from MSR CambridgeTraces, describing the various access characteristics of enterprise storage servers. These access sequences were collected from 36 volumes across 179 disks on 13 servers over a period of one week. Each trace records the starting location and size of the I / O request. Access sequences prefixed with wdev and rsrch were collected from web applications, research projects, and hardware monitoring.

[0118] The parameter tables of wdev_1, wdev_2, wdev_3, and rsrch_1 must be given to express the selected data information.

[0119] wdev_1, wdev_2, wdev_3, and rsch_1 are access sequences primarily based on write requests. The access sequence is shown in Table 2 below.

[0120] Table 2 Access sequence

[0121]

[0122] For all access sequences, we first map the access sequences to a hypergraph file. The input hypergraph is stored in a file and is given as one of the command-line arguments to the hypergraph partitioning program SHMETIS. The output is a partition file consisting of V lines, each with a number. The i-th line of the file contains the partition number to which the i-th vertex belongs.

[0123] Shmetis uses recursive two-way partitioning to divide a hypergraph into x partitions, as shown in Table 3. Assuming there are 120 data blocks and the erasure code RS(3,1) is used, x is 40, meaning the 120 data blocks are partitioned into 40 parts, each serving as a separate stripe (Algorithm 2). For a hypergraph with n vertices, let shmetis's Ubfactor parameter be b. If the desired number of partitions is 2, Nparts = 2, then the number of vertices in each partition will be between (50-b) / 100 and (50+b) / 100. Setting the Ubfactor parameter is necessary because the weights of all data blocks may be difficult to evenly divide into Nparts parts.

[0124] Table 3 shmetis parameter settings

[0125]

[0126] To evaluate the effectiveness of the striping algorithm, this application defines the concept of "access sequence analysis ratio." This concept categorizes all access sequences into two parts: one part analyzes the correlation between data blocks and places them using the striping algorithm, and the other part is used to access data blocks by write requests. The total I / O count is calculated using formula (3). The analysis ratio is the proportion of the first part to the total access sequence.

[0127] The DISH scheme proposed in this application is compared with two other stripe organization algorithms, BSO and CASO, to verify the DISH scheme from the following aspects: (1) the impact of different erasure codes on the number of I / O operations of the stripe organization algorithm; (2) the impact of different analysis rates on the number of I / O operations of the stripe organization algorithm; and (3) the additional I / Os caused by degraded read operations.

[0128] This application proposes an evaluation strategy based on the number of update I / O operations to assess the ability of the striping algorithm in an erasure-coded storage system to handle small writes. This evaluation strategy allows us to easily and directly determine the performance loss associated with different striping strategies during updates.

[0129] (1) Test the number of IOs that occur in partial stripe writes of different erasure codes for the access sequences wdev_1, wdev_2, wdev_3, rsrch_1, rsrch_2, wdev_0, hm_1, and src2_1. Four erasure codes with different parameters, RS(3,1), RS(4,2), RS(6,3), and RS(8,4), are selected as follows: Figure 7 As shown. Among them, Figure 7(a) is the number of IOs that occurred in partial stripe writes with different erasure codes for wdev_1; Figure 7 (b) is the number of IOs that occurred during partial stripe writes with different erasure codes for wdev_2; Figure 7 (c) is the number of IOs that occurred during partial stripe writes with different erasure codes for wdev_3; Figure 7 (d) is the number of IOs that occurred in partial stripe writes of different erasure codes of rsrch_1; Figure 7 (e) is the number of IOs that occurred in partial stripe writes of different erasure codes of rsrch_2; Figure 7 (f) is the number of IOs that occurred in partial stripe writes with different erasure codes for wdev_0; Figure 7 (g) is the number of IOs that occurred during partial stripe writes of different erasure codes of hm_1; Figure 7 (h) is the number of I / Os that occur when writing partial stripes of different erasure codes for src2_1. The number of I / Os under different scenarios is estimated based on formula (2), assuming that the number of I / Os for each DISH is 1.

[0130] First, overall, DISH reduces the number of IOs by 19.43% relative to BSO and by 11.62% relative to CASO. Among them, under the erasure code RS(3,1), DISH reduces the number of IOs by an average of 15.16% relative to BSO and by an average of 11.5% relative to CASO. Under the erasure code RS(4,2), DISH reduces the number of IOs by an average of 16.93% relative to BSO and by an average of 8.57% relative to CASO. Under the erasure code RS(6,3), DISH reduces the number of IOs by an average of 23.15% relative to BSO and by an average of 14.89% relative to CASO. Under the erasure code RS(8,4), DISH reduces the number of IOs by an average of 22.48% relative to BSO and by an average of 11.5% relative to CASO.

[0131] Because for RS erasure codes, the more slices (that is, the more data blocks in the same stripe), the more data blocks are needed to regenerate the parity block, and the more I / O operations are required for small-write operations. By placing related data blocks in the same stripe, DISH reduces I / O operations. Therefore, when using erasure codes with more data slices, DISH significantly improves storage system efficiency.

[0132] (2) In the test, the analysis ratio is set between 0.2 and 0.7 (the analysis ratio is the proportion of the part of an access sequence that we use the algorithm to analyze and predict in the entire access sequence).

[0133] The number of check block updates of the stripe organization algorithm within a fixed time interval under different analysis rates is as follows: Figure 8 shown.

[0134] according to Figure 8 As can be seen, DISH reduces the number of parity block updates by an average of 9.55% compared to BSO and by an average of 6.4% compared to CASO, demonstrating that DISH performs well under varying analysis ratios. A higher analysis ratio, meaning a greater proportion of the sequence used to analyze relationships between data blocks, results in fewer subsequences used to test the placement algorithm. Less test data leads to lower IO counts with higher analysis ratios. Furthermore, a higher analysis ratio results in fewer sequences accessing data blocks as write requests, resulting in fewer I / Os. Consequently, the three algorithms achieve similar I / O counts when the analysis ratio is high.

[0135] (3) When a user accesses failed data, the storage system is triggered to repair the corresponding data. At this time, the response to the user request needs to wait for the data repair to be completed, which will significantly increase the request latency. To evaluate the number of data repairs triggered by read requests deployed on erasure codes, we first construct erasure code stripes using DISH, CASO, and BSO. Then, we pass the read requests in the access sequence and record the average amount of additional data to be read when a disk fails. To facilitate the display of the increase in I / O in degraded reads, the number of data repairs required when a disk fails when using BSO is set to 1.

[0136] The number of data recovery times triggered by read requests in different access sequences is as follows: Figure 9 shown.

[0137] Since wdev_1 lacks read operations, the number of data recovery times is consistent across different algorithms. In wdev_2, wdev_3, and rsrch_1, the number of data recovery times is reduced when reading data, resulting in relatively lower read latency. DISH and CASO both offer advantages over BSO in that they analyze access sequences to determine data block relevance and then organize data into stripes based on this relevance. This reduces I / O overhead during data updates and, to a certain extent, reduces read latency caused by data recovery triggered by read requests.

[0138] In summary, this application explores a data block placement scheme based on hypergraph and hypergraph partitioning, namely, a stripe organization algorithm. We first constructed a performance evaluation strategy based on the number of update operation IOs in an erasure code storage system, which is used to evaluate the performance loss of small-write problems and measure the pros and cons of stripe organization algorithms. Based on the hypergraph, correlation modeling is performed, and data blocks are mapped to vertices in the hypergraph. Then, hypergraph partitioning is used to obtain correlated data blocks. By considering the correlation between data blocks, the DISH stripe organization algorithm is proposed. Through experimental analysis, the DISH algorithm can reduce the performance loss caused by small-write problems compared to BSO and CASO, thereby improving the overall performance of the storage system.

[0139] This application also provides a data block placement system for an erasure coded storage system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the aforementioned method are implemented. This data block placement system for an erasure coded storage system can implement various embodiments of the aforementioned data block placement method for an erasure coded storage system, achieving the same beneficial effects. These are not further described here.

[0140] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method steps. This computer-readable storage medium can implement various embodiments of the aforementioned data block placement method for an erasure coded storage system, achieving the same beneficial effects, and is not further described herein.

[0141] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A data block placement method for an erasure code storage system, characterized in that: include: Mapping the data blocks in the access sequence into a hypergraph, the hypergraph comprising vertices and hyperedges, and converting the hypergraph into a hypergraph file, wherein each vertex is a data block; determining a degree of relevance of each data block based on the hyperedge; Dividing the hypergraph file into N hypergraph partition files based on the correlation degree of the data blocks, wherein the correlation degree of the data blocks in the same hypergraph partition file is higher than a first preset value, and the correlation degree of the data blocks in different hypergraph partition files is lower than a second preset value, and the first preset value is greater than the second preset value; Placing data blocks based on the N hypergraph partition files and a preset placement method; Placing the data blocks based on the N hypergraph partition files and a preset placement method includes: Mapping each hyperedge in each of the N hypergraph partition files into a stripe; Obtaining a data block corresponding to the hyperedge, and placing the data block corresponding to the hyperedge in the stripe; Before mapping the data blocks in the access sequence into a hypergraph, the method further includes: Construct the total performance loss model cost(F) as: Where a ij Indicates whether data block i is in data stripe j. If so, the value is 1, otherwise the value is 0. j represents the stripe number involved in the file modification, t represents the number of check blocks in each stripe, i represents the data block number involved in the file modification, S j represents the set of all data blocks in stripe j; Before placing the data blocks based on the N hypergraph partition files and the preset placement method, the method further includes: Setting the preset placement mode according to the total performance loss model; The preset placement method is to place the relevant data blocks involved in the user modifying the file in as few stripes as possible.

2. The data block placement method of the erasure code storage system according to claim 1, characterized in that: Mapping the data block into a hypergraph includes: Determining the number of data blocks in an access sequence and setting a preset number of data blocks in each stripe; Traversing the access sequence in sequence, when the number of data blocks obtained is equal to the preset number, intercepting the subsequence, mapping the data blocks to vertices of a hypergraph, connecting all data blocks in the subsequence to form a hyperedge, and using the number of times the data blocks appear in the subsequence as the weight of the data block, wherein the weight of each hyperedge is the sum of the weights of all vertices in the hyperedge; And so on, until the entire access sequence is traversed, and a hypergraph is formed based on all subsequences intercepted during the traversal process.

3. The data block placement method of the erasure code storage system according to claim 2, characterized in that: When the number of data blocks in a hypergraph partition file among N hypergraph partition files is inconsistent with the preset number, the excess data blocks in the hypergraph partition file are placed in a separate sequence, and when the number of data blocks in the hypergraph partition file is less than the preset number in the subsequent sequence, data blocks are taken out from the separate sequence to supplement the number.

4. The data block placement method of the erasure code storage system according to claim 1, characterized in that: Mapping the data blocks in the access sequence into a hypergraph includes: Obtain all access sequences and divide all access sequences into a first partial sequence and a second partial sequence, wherein the data blocks in the first partial sequence are used to be mapped into a hypergraph; and the second partial sequence is used for write request access to the data blocks; The proportion of the first part of the sequence to the entire access sequence is used as the analysis ratio, and the timing of mapping the data blocks in the first part of the sequence to the hypergraph is optimized according to the analysis ratio.

5. A data block placement system for an erasure code storage system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method steps according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and system for regulating storage positions of data blocks

    CN103970879A

  • Data correlation-aware erasure code memory replacement method and equipment and memory system

    CN111444036A