A data processing method and related device

CN117666931BActive Publication Date: 2026-10-13HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211055072.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-10-13
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

[0006]本申请提供了一种数据处理方法,该方法通过将多路异步请求归并到同一请求中,增加EC条带重构过程中磁盘输入输出(input output,IO)的顺序性,提升磁盘吞吐率,解决大量异步IO并发执行在磁盘上形成随机读写,导致磁盘吞吐量急剧下降,从而致使重构性能下降的问题

Benefits of technology

[0052]本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666931B_ABST
    Figure CN117666931B_ABST
Patent Text Reader

Abstract

The application relates to a data processing method and related equipment, and relates to the technical field of storage. The method is executed by a master node in a distributed storage system, and comprises the following steps: acquiring multiple concurrent requests, each of the multiple concurrent requests being used for reconstructing an erasure code (EC) stripe; merging the multiple concurrent requests according to input / output (IO) addresses of each of the multiple concurrent requests, wherein the merged request is used for indicating a continuous address segment; and reconstructing the EC stripe according to the merged request. The method merges the multiple concurrent requests into the same request, increases the order of disk IO in the EC stripe reconstruction process, improves the disk throughput, solves the problem that a large number of asynchronous IOs are concurrently executed on the disk to form random reading and writing, causes the disk throughput to sharply decrease, and thus causes the reconstruction performance to decrease.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the continuous development of information technology, more and more industrial applications are adopting information-based deployment methods, resulting in a large amount of data. In order to reduce data storage costs and ensure data reliability, the industry has proposed erasure coding (EC) technology. EC specifically divides the data into multiple data blocks, then calculates a check block based on each data block, and distributes the data blocks and check blocks across different nodes in a distributed storage system.

[0003] A set of data blocks and the set of checksum blocks generated from these data blocks through verification are called an EC stripe. To ensure data consistency, data read and modification operations are typically performed by the node containing the first data block in the stripe (e.g., data block numbered D0). The node containing the first data block in the stripe can also be called the master node, while the nodes containing the other data blocks in the stripe and the node containing the checksum blocks are called slave nodes.

[0004] In the event of node or disk failure storing data blocks, an EC stripe may be missing at least one data block. To reconstruct the data, it is typically necessary to read other data blocks in the current EC stripe, as well as at least one parity block, and reconstruct the missing data block using methods such as XOR calculation.

[0005] However, distributed storage systems typically reconstruct data concurrently across multiple EC stripes, increasing the randomness of reading and writing data blocks and thus increasing reconstruction time. Summary of the Invention

[0006] This application provides a data processing method that increases the sequentiality of disk input / output (IO) during EC stripe reconstruction by merging multiple asynchronous requests into a single request, thereby improving disk throughput. This addresses the problem of a sharp drop in disk throughput and consequently, reduced reconstruction performance due to random read / write operations caused by a large number of concurrent asynchronous IO operations. This application also provides corresponding apparatus, electronic devices, distributed storage systems, computer-readable storage media, and computer program products.

[0007] Firstly, this application provides a data processing method. This method can be executed by a master node in a distributed storage system. Multiple nodes in the distributed storage system store data blocks and parity blocks of EC stripes in a distributed manner. For example, each node can store one data block or one parity block, and different nodes can store different data blocks or parity blocks. The node storing the first data block in the EC stripe can be considered the master node, and the other nodes can be considered slave nodes.

[0008] Specifically, the master node can obtain multiple concurrent requests. Each request in the multiple concurrent requests is used to reconstruct an EC stripe. Then, the master node merges the multiple concurrent requests according to the IO address of each request in the multiple concurrent requests. The merged request is used to indicate a contiguous address segment. Then, the master node can reconstruct the above EC stripe according to the merged request.

[0009] In this method, multiple concurrent requests can be merged into the same request. The address indicated by the merged request is more contiguous than the address indicated by the multiple concurrent requests. This increases the sequentiality of disk I / O during EC stripe reconstruction, improves disk throughput, and solves the problem that a large number of asynchronous I / O concurrent executions form random read / write operations on the disk, causing a sharp drop in disk throughput and thus a decrease in reconstruction performance.

[0010] In some possible implementations, the master node can sort the concurrent requests based on the I / O addresses of each request in the multi-path concurrent requests, and then merge the I / O addresses from the sorted requests in sequence to obtain a merged request. The merged request is then used for sequential I / O. In this way, random I / O can be transformed into sequential I / O, significantly improving I / O performance, thereby shortening refactoring time and improving refactoring performance.

[0011] In some possible implementations, the I / O address of each request includes either a start address or an end address. The end address can also be calculated based on the start address and the I / O length. Accordingly, when the master node sorts the concurrent requests, it can sort them based on the start address of each request. In some examples, the master node can also sort the concurrent requests based on the end address of each request.

[0012] This method provides assistance in sorting multiple concurrent requests by offering various sorting methods, thus providing high availability.

[0013] In some possible implementations, the master node can reconstruct the EC stripe by performing unidirectional I / O operations according to the disk head rotation direction, based on the contiguous address segments in the merged request. This method employs a unidirectional strategy to perform sequential read and write operations, improving disk throughput and thus increasing reconstruction bandwidth.

[0014] In some possible implementations, when reconstructing an EC stripe, the master node can cache temporary data needed to reconstruct the EC stripe based on the merged requests from multiple concurrent requests. This temporary data includes the remaining data blocks and checksum blocks of the EC stripe. Then, the master node can obtain copies of the lost data blocks in the EC stripe based on the temporary data, and subsequently write these copies into the distributed storage system to reconstruct the EC stripe.

[0015] This method reconstructs the EC stripe by caching the temporary data needed to reconstruct it, recovering the lost data blocks based on the temporary data, and then writing a copy of the lost data blocks in sequential I / O mode. This reduces the read / write overhead during EC stripe reconstruction and improves reconstruction performance.

[0016] In some possible implementations, the master node can also store metadata about the replicas, including location information. This location information can be represented by an address, such as a logical address. When subsequently querying, modifying, or deleting a data block, this location information can be used to quickly locate the data block, thereby improving response efficiency.

[0017] In some possible implementations, the master node can cache the temporary data that the multiple concurrent requests need to read to reconstruct the EC stripe in the same cache medium. Specifically, the master node can use a large-capacity cache, such as a solid-state drive or storage-class memory, to cache temporary data, thereby achieving the goal of caching temporary data in the same cache medium.

[0018] Because the cache can store a large enough amount of data, it can reduce the address span of accesses, improve disk throughput, and further enhance reconstruction performance.

[0019] In some possible implementations, multiple concurrent requests are asynchronous requests. Asynchronous requests are also called asynchronous I / O requests or asynchronous I / O. Asynchronous I / O is a way for computer operating systems to handle input and output: the thread that initiates the I / O request continues to execute subsequent code without waiting for the I / O operation to complete, and the I / O result is notified to the program that initiated the I / O request in other ways.

[0020] In this method, asynchronous requests do not need to be executed immediately. Therefore, multiple asynchronous requests can be merged, thereby changing random I / O to sequential I / O and improving refactoring performance.

[0021] In some possible implementations, for each EC stripe with data loss, the master node can obtain multiple read requests and at least one write request. The multiple read requests are used to read the remaining data blocks and check blocks in the EC stripe, and the at least one write request is used to write the lost data blocks in the EC stripe. The lost data blocks are determined based on the remaining data blocks and check blocks.

[0022] In this way, concurrent EC reconstruction can be achieved, ensuring the reliability of EC stripes. Moreover, this method reduces the randomness of IO and improves reconstruction performance by merging multiple requests.

[0023] Secondly, this application provides a data processing apparatus. The apparatus is deployed on the master node of a distributed storage system, and the apparatus includes:

[0024] The acquisition module is used to acquire multiple concurrent requests, each of which is used to reconstruct an erasure coding (EC) stripe.

[0025] The merging module is used to merge the multiple concurrent requests according to the input / output I / O address of each request in the multiple concurrent requests, and the merged request is used to indicate a continuous address segment.

[0026] The reconstruction module is used to reconstruct the EC stripe based on the merged request.

[0027] In some possible implementations, the merging module is specifically used for:

[0028] The concurrent requests are sorted according to the I / O address of each request in the concurrent requests.

[0029] The IO addresses in the sorted requests are merged in order to obtain the merged requests, which are then used for sequential IO.

[0030] In some possible implementations, the I / O address of each request includes a start address or an end address;

[0031] The merging module is specifically used for:

[0032] The concurrent requests are ordered according to the starting address of each request in the multiple concurrent requests; or,

[0033] The concurrent requests are sorted according to the ending address of each request in the concurrent requests.

[0034] In some possible implementations, the refactoring module is specifically used for:

[0035] Based on the contiguous address segments in the merged request, unidirectional I / O operations are performed according to the disk head rotation direction to reconstruct the EC stripe.

[0036] In some possible implementations, the acquisition module is specifically used for:

[0037] For each EC stripe with data loss, multiple read requests and at least one write request are obtained. The multiple read requests are used to read the remaining data blocks and check blocks in the EC stripe, and the at least one write request is used to write the lost data blocks in the EC stripe. The lost data blocks are determined based on the remaining data blocks and check blocks.

[0038] In some possible implementations, the refactoring module is specifically used for:

[0039] Based on the merged request, the temporary data that the EC stripe needs to read is reconstructed from the multiple concurrent requests in the cache. The temporary data includes the remaining data blocks and check blocks of the EC stripe.

[0040] Based on the temporary data, obtain a copy of the lost data block in the EC strip;

[0041] A copy of the lost data block in the EC stripe is written into the distributed storage system to reconstruct the EC stripe.

[0042] In some possible implementations, the refactoring module is further configured to:

[0043] The metadata of the copy is stored, including location information.

[0044] In some possible implementations, the refactoring module is specifically used for:

[0045] The temporary data that the multiple concurrent requests need to read to reconstruct the EC stripe is cached in the same cache medium.

[0046] In some possible implementations, the multiple concurrent requests are asynchronous requests.

[0047] Thirdly, this application provides a distributed storage system. This distributed storage system includes a master node and slave nodes. The master node is used to execute the data processing method described in the first aspect of this application.

[0048] Specifically, the master node is used to acquire multiple concurrent requests. Each request in the multiple concurrent requests is used to reconstruct an EC stripe. The master node is also used to merge the multiple concurrent requests according to the IO address of each request in the multiple concurrent requests. The merged requests are used to indicate a contiguous address range. Then, the EC stripe is reconstructed according to the merged requests.

[0049] Fourthly, this application provides an electronic device. The electronic device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is configured to execute instructions stored in the at least one memory to cause the electronic device to perform a data processing method as described in the first aspect or any implementation thereof.

[0050] Fifthly, this application provides a computer-readable storage medium storing instructions that instruct an electronic device to perform the data processing method described in the first aspect or any implementation thereof.

[0051] Sixthly, this application provides a computer program product containing instructions that, when run on an electronic device, causes the electronic device to perform the data processing method described in the first aspect or any implementation thereof.

[0052] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0053] Figure 1 A schematic diagram illustrating the reconstruction principle of an EC stripe provided in this application embodiment;

[0054] Figure 2 A schematic diagram illustrating concurrent reconfiguration of EC stripes provided in an embodiment of this application;

[0055] Figure 3A A system architecture diagram of a distributed storage system provided in this application embodiment;

[0056] Figure 3B A system architecture diagram of a distributed storage system provided in this application embodiment;

[0057] Figure 4 This is a schematic diagram illustrating an application scenario of a distributed storage system provided in an embodiment of this application;

[0058] Figure 5 A schematic diagram of a multi-path concurrent reconfiguration process provided in an embodiment of this application;

[0059] Figure 6A flowchart illustrating a data processing method provided in an embodiment of this application;

[0060] Figure 7 A schematic diagram of a multi-path request caching process provided for an embodiment of this application;

[0061] Figure 8 This is a schematic diagram illustrating sequential reading and writing of inserted data blocks, provided in an embodiment of this application.

[0062] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0063] Figure 10 A hardware structure diagram of an electronic device provided in an embodiment of this application;

[0064] Figure 11 This is a hardware structure diagram of a distributed storage system provided in an embodiment of this application. Detailed Implementation

[0065] To facilitate understanding, some technical terms used in this application will be introduced first.

[0066] 1. EC stripe reconstruction specifically refers to the process of recovering missing data in an EC stripe by reading other data from the current EC stripe when data loss occurs due to node failure or disk damage in the distributed storage system. It should be noted that, depending on the failed node or the damaged disk, the missing data in the EC stripe can be either a data block or a parity block. For ease of description, the following example uses a missing data block in an EC stripe.

[0067] See Figure 1 The diagram shown illustrates the reconstruction principle of an EC stripe, which includes multiple data blocks, specifically data blocks D0 to D1. k-1 And at least one check block determined by the aforementioned multiple data blocks, specifically check block P and check block Q. Data block D0 can be stored on the primary node, denoted as primary node 0, and data blocks D1 to D... k-1 The parity block P and parity block Q can be stored in the first slave node, which includes node 1, ..., node(k-1). The second slave node includes node(k) and node(k+1).

[0068] When node1 fails or the disk in node1 is damaged, data block D1 in the EC stripe is lost. The master node can read other data blocks and a parity block (e.g., parity block P) in the current EC stripe, and then verify data block D1 through XOR calculation or other methods to obtain a copy of data block D1, as shown below:

[0069]

[0070] Where D′1 is a copy of data block D1, α0 is the parity coefficient of data block D0, and α j For data block D j The verification coefficient.

[0071] Then, the master node can write a replica D′1 of data block D1 into the distributed storage system, such as node_x in the distributed storage system, thereby reconstructing the EC stripe. The reconstructed EC stripe includes data block D0, data block D′1, ..., data block D k-1 And check block P and check block Q.

[0072] 2. Multi-path concurrent reconstruction: Distributed storage systems can reconstruct different EC stripes in parallel to improve reconstruction performance. For example... Figure 2 As shown, a distributed storage system can reconstruct different EC stripes in parallel using multiple threads. For example, thread 0 is used to reconstruct one EC stripe, and thread 1 is used to reconstruct another EC stripe.

[0073] However, different reconstruction tasks require reading data from different addresses and writing to different spaces, resulting in reads and writes to different addresses. The concurrent execution of multiple reconstruction tasks creates a random read / write pattern. Disk random read / write performance is low, typically only a fraction of that of sequential read / write. This causes the EC stripe reconstruction process to be extremely time-consuming, making it difficult to meet business requirements.

[0074] To address the problem of excessively long reconstruction processes caused by random read / write operations resulting from multi-path concurrent reconstruction in traditional reconstruction schemes, this application provides a data processing method for distributed storage systems. The distributed storage system includes nodes that store data blocks (also called data block storage nodes) and nodes that store parity blocks (also called parity block storage nodes). The data block storage nodes include a master node that stores data blocks (e.g., the first data block) and a first slave node that stores data blocks (e.g., other data blocks besides the first data block). The parity block storage nodes include a second slave node.

[0075] Specifically, the master node can acquire multiple concurrent requests. Each of the multiple concurrent requests is used to reconstruct an EC stripe. Then, the master node can merge the multiple concurrent requests based on the input / output (IO) addresses of each request. The merged request is used to indicate data processing for consecutive address segments. The master node then reconstructs the EC stripe based on the merged request, for example, based on consecutive address segments in the merged request.

[0076] This method increases the sequentiality of disk I / O during EC stripe reconstruction by merging multiple asynchronous requests into a single request, thereby improving disk throughput and solving the problem that a large number of concurrent asynchronous I / O operations on the disk result in random read / write operations, leading to a sharp drop in disk throughput and consequently a decrease in reconstruction performance.

[0077] The system architecture of the embodiments of this application will now be described with reference to the accompanying drawings.

[0078] See Figure 3A The diagram shows the system architecture of a distributed storage system. This system employs a compute-storage separation architecture, comprising a compute node cluster and a storage node cluster. The compute node cluster includes one or more compute nodes 110 ( Figure 3A The diagram shows two compute nodes 110 (but is not limited to two compute nodes 110), and these compute nodes 110 can communicate with each other. A compute node 110 is a computing device, such as a server, desktop computer, or the controller of a storage array. In terms of hardware, such as... Figure 3A As shown, the compute node 110 includes at least a processor 112, memory 113, and a network interface card (NIC) 114. The processor 112 is a central processing unit (CPU) used to process data access requests from outside the compute node 110 or requests generated internally within the compute node 110. For example, when the processor 112 receives a write data request from a user, it temporarily stores the data in the memory 113. When the total amount of data in the memory 113 reaches a certain threshold, the processor 112 sends the data stored in the memory 113 to the storage node 100 for persistent storage. In addition, the processor 112 is also used for data computation or processing, such as metadata management, deduplication, data compression, virtualization of storage space, and address translation. Figure 3A Only one CPU 112 is shown in this embodiment. In practical applications, there are often multiple CPUs 112, and each CPU 112 has one or more CPU cores. This embodiment does not limit the number of CPUs or the number of CPU cores.

[0079] Memory 113 refers to internal memory that directly exchanges data with the processor. It can read and write data at any time at high speed, serving as temporary data storage for the operating system or other running programs. Memory includes at least two types of memory, such as random access memory (RAM) or read-only memory (ROM). For example, RAM can be Dynamic Random Access Memory (DRAM) or Storage Class Memory (SCM). DRAM is a semiconductor memory and, like most RAM, is a volatile memory device. SCM is a hybrid storage technology that combines the characteristics of traditional storage devices and RAM. Storage Class Memory offers faster read and write speeds than hard drives, but slower access speeds than DRAM, and is also cheaper. However, DRAM and SCM are only illustrative examples in this embodiment; memory can also include other types of RAM, such as Static Random Access Memory (SRAM). For read-only memory, examples include programmable read-only memory (PROM) and erasable programmable read-only memory (EPROM). Additionally, memory 113 can also be a dual in-line memory module (DIMM), i.e., a module composed of dynamic random access memory (DRAM), or a solid-state drive (SSD). In practical applications, multiple memory modules 113 of different types can be configured in computing node 110. This embodiment does not limit the number or type of memory 113. Furthermore, memory 113 can be configured to have a power-saving function. The power-saving function means that when the system experiences a power outage and then power is restored, the data stored in memory 113 will not be lost. Memory with a power-saving function is called non-volatile memory.

[0080] Network interface card 114 is used to communicate with storage node 100. For example, when the total amount of data in memory 113 reaches a certain threshold, compute node 110 can send a request to storage node 100 via network interface card 114 to persistently store the data. Additionally, compute node 110 may also include a bus for communication between components within compute node 110. Functionally, because... Figure 3A The primary function of compute node 110 is computing operations. When storing data, it can utilize remote storage for persistent storage, thus requiring less local storage than a conventional server, resulting in cost and space savings. However, this does not mean that compute node 110 cannot have local storage; in practice, compute node 110 can also have a small amount of internal hard disk or external hard disk.

[0081] Any compute node 110 can access any storage node 100 in the storage node cluster via the network. The storage node cluster includes multiple storage nodes 100 ( Figure 3A The diagram shows three storage nodes 100, but is not limited to three storage nodes 100. Each storage node 100 includes one or more controllers 101, a network interface card (NIC) 104, and multiple hard disks 105. The NIC 104 is used to communicate with the compute node 110. The hard disks 105 are used to store data and can be disks or other types of storage media, such as solid-state drives (SSDs) or shingled magnetic recording (SMR) hard disks. The controllers 101 are used to write data to or read data from the hard disks 105 according to read / write data requests sent by the compute node 110. During the read / write process, the controllers 101 need to convert the addresses carried in the read / write data requests into addresses that the hard disks can recognize. Therefore, the controllers 101 also have some basic computing functions.

[0082] Figure 3B This is a system architecture diagram of another distributed storage system used in the embodiments of this application. The system is a storage-computing integrated architecture and includes a storage cluster. The storage cluster includes one or more servers 110 ( Figure 3B The diagram shows three servers 110 (but is not limited to three servers 110), and these servers 110 can communicate with each other. A server 110 is a device with both computing and storage capabilities, such as a server or desktop computer. For example, an ARM server or an x86 server could be used as a server 110 here.

[0083] In terms of hardware, such as Figure 3BAs shown, server 110 includes at least processor 112, memory 113, network interface card (NIC) 114, and hard disk 105. Processor 112, memory 113, NIC 114, and hard disk 105 are connected via a bus. Processor 112 and memory 113 provide computing resources. Specifically, processor 112 is a central processing unit (CPU) used to process data access requests from outside server 110 (application server or other servers 110), and also to process requests generated internally by server 110. Memory 113 refers to internal storage that directly exchanges data with the processor. It can read and write data at any time at high speed, serving as temporary data storage for the operating system or other running programs. In practical applications, server 110 can be configured with multiple memory modules 113 of different types. This embodiment does not limit the number or type of memory modules 113. Furthermore, memory modules 113 can be configured to have power-saving functionality. Hard disk 105 provides storage resources, such as storing data. It can be a disk or other types of storage media, such as a solid-state drive (SSD) or a shingled magnetic recording hard disk (SMR). Network interface card 114 is used to communicate with other servers 110.

[0084] It should be noted that the above Figure 3A , Figure 3B This is merely an illustrative architecture of a distributed storage system. In other possible implementations of the embodiments of this application, the distributed storage system may also use other architectures, such as a fully converged architecture or a Memory Fabric architecture.

[0085] Furthermore, the aforementioned distributed storage system can provide storage services, for example, by providing storage servers to users in the form of storage interfaces, allowing users to access the storage resources of the distributed storage system through these interfaces. See also Figure 4 The diagram illustrates an application scenario for a distributed storage system. Users can access the distributed storage system through a client (such as an application client). The system architecture of this distributed storage system can be as described above. Figure 3A or Figure 3B The architecture shown.

[0086] For example, distributed storage systems adopt Figure 3AIn the illustrated architecture, the client can call the storage interface provided by the storage service to generate a storage request and send it to the distributed storage system. The compute nodes in the distributed storage system that receive the storage request can divide the data into multiple data blocks, calculate a check block for each data block, and then distribute each data block and the check block determined by that data block into different storage nodes 100, for example, into hard disks 105 on different storage nodes 100, forming an EC stripe. The storage node 100 storing the first data block in the EC stripe (e.g., data block D0) can be considered the master node, and the storage node storing other data blocks in the EC stripe (e.g., data block D1, ... data block D...) can be considered the master node. k-1 Storage node 100 can be regarded as the first slave node, and storage node 100 storing parity blocks (e.g., parity block P and parity block Q) can be regarded as the second slave node.

[0087] For example, distributed storage systems employ... Figure 3B In the illustrated architecture, a client can call the storage interface provided by the storage service to generate a storage request and send it to the distributed storage system. Server 110 in the distributed storage system can divide the data into multiple data blocks, calculate a checksum block for each data block, and then distribute each data block and the checksum block determined by that data block across different servers 110, for example, across hard disks 105 on different servers 100. The server 110 storing the first data block in the EC stripe (e.g., data block D0) can be considered the master node, while the server storing other data blocks in the EC stripe (e.g., data block D1, ... data block D...) can be considered the master node. k-1 Storage node 100 can be considered as the first slave node, storing parity blocks (e.g., data block D1, ... data block D). k-1 Server 110 can be considered as a second slave node.

[0088] When several storage nodes 100 or servers 110 in a distributed storage system fail, or when the hard disks 105 in storage nodes 100 or servers 110 are damaged, several EC stripes may experience data loss. Based on this, the distributed storage system can reconstruct EC stripes that have experienced data loss. For example, when an EC stripe loses several data blocks, the master node can read the remaining data blocks from the first slave node and the parity block from the second slave node. Based on the remaining data blocks and the parity block, a copy of the lost data blocks can be obtained. This copy is then written to the undamaged storage nodes 100 or servers 110, or to the undamaged hard disks 105 in storage nodes 100 or servers 110, thereby reconstructing the EC stripe.

[0089] To optimize reconstruction performance, the master node typically receives multiple concurrent requests. Based on the I / O address of each request, the master node merges these requests. The merged request then directs data processing for a contiguous address segment, which is obtained by merging discrete address segments from the multiple concurrent requests. The master node can then reconstruct the EC stripe based on this merged request. For further understanding, see [link to documentation]. Figure 5 The flowchart shown illustrates the multi-path concurrent refactoring process. The master node can merge read and write requests from multiple threads (thread 0 to thread n) into a single read / write request based on their addresses. This read / write request is then executed by a thread (thread -x), thereby improving disk throughput and refactoring performance.

[0090] To make the technical solution of this application clearer and easier to understand, the data processing method of the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0091] See Figure 6 The flowchart shown illustrates a data processing method, which includes:

[0092] S602: The master node receives multiple concurrent requests.

[0093] In a distributed storage system, node failure or disk damage within a node can lead to data loss in several EC stripes. For each EC stripe with data loss, the master node can obtain multiple read requests and at least one write request to request the reconstruction of that EC stripe.

[0094] In this configuration, each EC stripe consists of multiple read requests and at least one write request, forming a single request. Multiple read requests within a single request are used to read the remaining data in the EC stripe. For example, if several data blocks are missing from an EC stripe, multiple read requests are used to read the remaining data blocks and at least one parity block from that EC stripe. It should be noted that, depending on the EC algorithm, a read request can be used to read all or some of the remaining data blocks. Similarly, if several parity blocks are missing from an EC stripe, multiple read requests are used to read the remaining data blocks from that EC stripe. Depending on the EC algorithm, a read request can be used to read all or some of the remaining data blocks. The write requests within a single request are used to write copies of the missing data blocks in the EC stripe. The missing data blocks can be determined based on the data read by the multiple read requests (such as the remaining data blocks and parity blocks).

[0095] In some possible implementations, considering load balancing, the master nodes corresponding to multiple EC stripes can be different. For example... Figure 7 As shown, an EC stripe includes data block D. 0,0 To data block D0,3 In addition to check block P0, another EC stripe includes data block D. 1,0 To data block D 1,3 In addition to check block P1, there is also an EC strip including data block D. 2,0 To data block D 2,3 And the check block P2, the master node corresponding to the above multiple EC stripes, i.e., the storage data block D. 0,0 The node, storage data block D 1,0 Storage data block D 2,0 The nodes can be different nodes.

[0096] Based on this, when a node failure or disk damage in a node causes data loss in several EC stripes in a distributed storage system, the master node corresponding to each EC stripe can obtain one request corresponding to that EC stripe. Thus, when multiple EC stripes correspond to the same master node, that master node can obtain multiple concurrent requests.

[0097] It's important to note that concurrent requests are typically asynchronous, also known as asynchronous I / O requests or asynchronous I / O. Asynchronous I / O is a way the computer operating system handles input and output: the thread initiating the I / O request continues executing subsequent code without waiting for the I / O operation to complete, and the I / O result is communicated to the program that initiated the I / O request in other ways. In contrast to asynchronous I / O is the more common "synchronous (blocking) I / O": the thread initiating the I / O request does not return from the currently called I / O operation function (i.e., it is blocked) until the I / O operation is complete.

[0098] S604: The master node merges the concurrent requests based on the I / O address of each request in the multi-path concurrent requests.

[0099] Each request's I / O address can include the address of the data read by the read request and the address of the data to be written by the write request. When the addresses of the data read by different read requests and the addresses of the data to be written by different write requests in multiple concurrent requests are consecutive or close addresses, the master node can merge the concurrent requests to reduce random reads and writes.

[0100] Specifically, the master node can sort the concurrent requests based on the I / O address of each request in the multi-path concurrent requests, and then merge the I / O addresses in the sorted requests in order to obtain the merged request. The merged request can be a sequential I / O request for sequential I / O.

[0101] Furthermore, the I / O address of each request includes a start address or an end address. The end address can be calculated based on the start address and the I / O length. Accordingly, when merging multiple concurrent requests, the master node can sort the concurrent requests according to the start address of each request. In some embodiments, the master node can also sort the concurrent requests according to the end address of each request. This embodiment does not limit the sorting method.

[0102] It should be noted that when the master node sorts the concurrent requests based on the IO address of each request, it can sort both the read and write requests in the concurrent requests according to the IO address, and then merge the sorted read and write requests into a single read / write request.

[0103] For ease of understanding, Figure 5 Example Explanation. In this example, the I / O addresses of a read request and a write request from thread 0 are located between the I / O addresses of a read request and a write request from thread 1, respectively. Therefore, the read request from thread 1 can be ordered before the read request and write request from thread 0, and the write request from thread 1 can be ordered after the read request and write request from thread 0. This ensures the continuity of I / O addresses in the merged requests.

[0104] S606: The master node reconstructs the EC stripe based on the merged request.

[0105] Specifically, the master node can perform corresponding I / O operations based on the I / O addresses in the merged request, thereby reconstructing the EC stripe. The master node can cache temporary data needed for reconstructing the EC stripe from multiple concurrent requests, based on the I / O addresses in the merged request. This temporary data includes the data required for EC stripe reconstruction. Then, the master node can obtain copies of lost data blocks in the EC stripe based on this temporary data. For example, the master node can use the temporary data, combined with the EC algorithm, to identify lost data blocks in the EC stripe and obtain copies of these lost data blocks. The master node then writes the copies of the lost data blocks to a node that has not experienced a failure, or to a disk on a node that is not damaged, thereby reconstructing the EC stripe.

[0106] The temporary data can vary depending on the missing data. For example, if several data blocks are missing from an EC stripe, the temporary data can consist of several data blocks from the remaining data blocks in the EC stripe and at least one parity block. As another example, if several parity blocks are missing from an EC stripe, the temporary data can consist of several data blocks from the EC stripe. Depending on the EC algorithm, these data blocks can be some or all of the data blocks; this embodiment does not impose any restrictions on this.

[0107] In some possible implementations, the master node can use a large cache, such as a 512 gigabyte (GB) nonvolatile memory express (NVME) SSD, or a non-volatile dual in-line memory module (NVDIMM) or SCM to cache temporary data. This allows the temporary data that multiple concurrent requests need to read to reconstruct EC stripes to be cached in the same cache medium, thereby reducing the address span of access, improving disk throughput, and enhancing reconstruction performance.

[0108] in, Figure 7 This diagram illustrates the process of multi-way request caching, where each master node stores data block D. 0,0 The node, storage data block D 1,0 Storage data block D 2,0 Each node can cache its own temporary data based on the merged request, for example, storing data block D. 0,0 The node can cache data block D 0,3 Data block D 0,0 Data block D 0,2 And check block P, after the above data block and check block are cached, store data block D. 0,0 The node can calculate the missing data block D using the EC algorithm based on the aforementioned data block and check block. 0,1 The content, thereby obtaining data block D. 0,1 A copy, namely data block D′ 0,1 It should be noted that, Figure 7 This only shows the data block and checksum block corresponding to one request. In actual applications, the master node can cache the data block and checksum block corresponding to the merged request from multiple concurrent requests, thus performing I / O in a sequential read-write mode. After calculating the content of the missing data block and obtaining a copy of the missing data block, the master node can insert it into the read-write queue in a write manner, such as... Figure 8 As shown, the master node can perform read and write operations in sequential I / O mode, thereby completing the EC refactoring.

[0109] It should be noted that when the master node performs I / O operations based on the contiguous address segments in the merged request, it can also perform I / O operations unidirectionally according to the disk head rotation direction to reconstruct the EC stripe. By constructing a unidirectional execution flow, the read and write streams execute in only one direction, thereby ensuring minimal seek time and shortening the reconstruction time.

[0110] Furthermore, the master node can also store metadata about copies of lost data blocks. For example, the master node can store this metadata in a key-value (KV) format in the database. This metadata can include location information. This allows for direct access to the data block based on its address when searching for or modifying it later.

[0111] Based on the above description, this embodiment of the application increases the sequentiality of disk I / O and improves disk throughput by merging asynchronous I / O in multiple reconstruction tasks into the same execution flow. Furthermore, this embodiment of the application increases the density and continuity of I / O addresses by caching a large amount of temporary data (such as metadata needed to recover lost data blocks and the data itself), thereby improving the performance of data read and write operations from the disk. This can significantly improve reconstruction performance.

[0112] The above combination Figures 1 to 8 The data processing method provided in this application will be introduced. Next, with reference to the accompanying drawings, the functions of the data processing device provided in this application, as well as the electronic equipment and distributed storage system that implement the functions of the data processing device, will be described.

[0113] First, see Figure 9 The diagram illustrates the structure of a data processing device 900, which can be deployed on the master node of a distributed storage system. The device 900 includes:

[0114] The acquisition module 902 is used to acquire multiple concurrent requests, each of which is used to reconstruct an EC stripe.

[0115] The merging module 904 is used to merge the multiple concurrent requests according to the input / output I / O address of each request in the multiple concurrent requests, and the merged request is used to indicate a continuous address segment.

[0116] The reconstruction module 906 is used to reconstruct the EC stripe according to the merged request.

[0117] It should be understood that the apparatus 900 in the embodiments of this application can be implemented by a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof.

[0118] When implemented through software Figure 6 In the data processing method shown, the device 900 and its various modules can also be software modules. This software module (also called an application module) can be a computing engine, a virtual machine (VM), or a container. A virtual machine is a simulated virtual computer, that is, a logical computer. A container is a kernel virtualization technology that can provide lightweight virtualization to isolate user space, processes, and resources. It should be understood that the aforementioned virtual machines and containers are implemented through virtualization services such as VM services and container services. In practical applications, virtualization services can also be other lightweight or heavyweight virtualization services, which are not specifically limited here.

[0119] In some possible implementations, the merging module 904 is specifically used for:

[0120] The concurrent requests are sorted according to the I / O address of each request in the concurrent requests.

[0121] The IO addresses in the sorted requests are merged in order to obtain the merged requests, which are then used for sequential IO.

[0122] In some possible implementations, the I / O address of each request includes a start address or an end address;

[0123] The merging module 904 is specifically used for:

[0124] The concurrent requests are ordered according to the starting address of each request in the multiple concurrent requests; or,

[0125] The concurrent requests are sorted according to the ending address of each request in the concurrent requests.

[0126] In some possible implementations, the reconstruction module 906 is specifically used for:

[0127] Based on the contiguous address segments in the merged request, unidirectional I / O operations are performed according to the disk head rotation direction to reconstruct the EC stripe.

[0128] In some possible implementations, the acquisition module 902 is specifically used for:

[0129] For each EC stripe with data loss, multiple read requests and at least one write request are obtained. The multiple read requests are used to read the remaining data blocks and check blocks in the EC stripe, and the at least one write request is used to write the lost data blocks in the EC stripe. The lost data blocks are determined based on the remaining data blocks and check blocks.

[0130] In some possible implementations, the reconstruction module 906 is specifically used for:

[0131] Based on the merged request, the temporary data that the EC stripe needs to read is reconstructed from the multiple concurrent requests in the cache. The temporary data includes the remaining data blocks and check blocks of the EC stripe.

[0132] Based on the temporary data, obtain a copy of the lost data block in the EC strip;

[0133] A copy of the lost data block in the EC stripe is written into the distributed storage system to reconstruct the EC stripe.

[0134] In some possible implementations, the reconstruction module 906 is further configured to:

[0135] The metadata of the copy is stored, including location information.

[0136] In some possible implementations, the reconstruction module 906 is specifically used for:

[0137] The temporary data that the multiple concurrent requests need to read to reconstruct the EC stripe is cached in the same cache medium.

[0138] In some possible implementations, the multiple concurrent requests are asynchronous requests.

[0139] because Figure 9The data processing device 1000 shown corresponds to Figure 6 The method shown, therefore Figure 9 The specific implementation of the data processing device 900 and its technical effects can be found in the relevant descriptions in the foregoing embodiments, and will not be repeated here.

[0140] Next, see Figure 10 The diagram shows the hardware structure of the electronic device 1000. This computing device 1000 can be the aforementioned master node, used to implement the functions of the data processing device 900. The electronic device 1000 can be a server or a terminal device. Terminal devices include, but are not limited to, desktop computers, laptops, tablets, or smartphones.

[0141] like Figure 10 As shown, the computing device 1000 includes a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. The processor 1004, the memory 1006, and the communication interface 1008 communicate with each other via the bus 1002. It should be understood that this application does not limit the number of processors and memories in the computing device 1000.

[0142] Bus 1002 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 10 The bus 1004 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1004 may include a path for transmitting information between various components of the computing device 1000 (e.g., memory 1006, processor 1004, communication interface 1008).

[0143] The processor 1004 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0144] The memory 1006 may include volatile memory, such as random access memory (RAM). The processor 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). The memory 1006 stores executable program code, which the processor 1004 executes to implement the aforementioned data processing method. Specifically, the memory 1006 stores instructions for the data processing device 900 to execute the data processing method.

[0145] The communication interface 1008 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1000 and other devices or communication networks.

[0146] Based on the electronic device 1000 provided in the embodiments of this application, the embodiments of this application also provide a distributed storage system. This distributed storage system can employ, for example... Figure 3A The storage-compute separation architecture shown, or Figure 3B The in-memory computing architecture is shown. For ease of description, this embodiment uses an in-memory computing architecture as an example.

[0147] like Figure 11 As shown, the distributed storage system includes multiple electronic devices 1000. At least one of the multiple electronic devices 1000 can be the master node of the distributed storage system, and the other electronic devices 1000 can be slave nodes of the distributed storage system, such as a first slave node storing data blocks and a second slave node storing parity blocks.

[0148] The memory 1006 of multiple electronic devices 1000 may store the same instructions for executing data processing methods by the data processing device 900. The electronic device 100, acting as the master node, can execute these instructions, thereby performing… Figure 6 The data processing method of the embodiment shown.

[0149] For example, electronic device 100, acting as the master node, can execute the above instructions to perform the following method steps:

[0150] Retrieve multiple concurrent requests, each of which is used to reconstruct an EC stripe;

[0151] Based on the I / O address of each request in the multi-path concurrent requests, the multi-path concurrent requests are merged, and the merged requests are used to indicate contiguous address ranges.

[0152] Based on the merged request, the EC stripe was restructured.

[0153] The process of reconstructing the EC stripe based on the merged requests can involve caching temporary data needed to reconstruct the EC stripe from multiple concurrent requests, including the remaining data blocks and checksum blocks of the EC stripe. Then, based on the temporary data, copies of the lost data blocks in the EC stripe are obtained. Subsequently, copies of the lost data blocks in the EC stripe are written into a distributed storage system, such as another electronic device 1000, to reconstruct the EC stripe.

[0154] In some possible implementations, several electronic devices 1000 in the distributed storage system can also be used to execute some of the instructions of the data processing device 900 for performing data processing methods. In other words, a combination of one or more electronic devices 1000 can jointly execute the instructions of the data processing device 900 for performing data processing methods.

[0155] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state disk (SSD).

[0156] This application also provides a computer program product containing instructions. The computer program product may be software or a program product containing instructions, capable of running on an electronic device 1000 or stored on any usable medium. When the computer program product is run on at least one electronic device 1000, it causes the at least one electronic device 1000 to perform the above-described data processing method.

[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method, characterized in that, The method is executed by the master node in the distributed storage system and includes: Obtain multiple concurrent requests, each of which is used to reconstruct an erasure code EC stripe; The concurrent requests are sorted according to the input / output I / O addresses of each request in the multiple concurrent requests. The I / O addresses in the sorted requests are then merged in order to obtain the merged requests. The merged requests are used to indicate data processing of consecutive address segments. The EC stripe is reconstructed based on the merged request.

2. The method according to claim 1, characterized in that, The I / O address for each request includes a start address or an end address; The step of sorting the concurrent requests according to the I / O address of each request in the multi-path concurrent requests includes: The concurrent requests are sorted according to the starting address of each request in the concurrent requests. or, The concurrent requests are sorted according to the ending address of each request in the concurrent requests.

3. The method according to claim 1, characterized in that, The step of reconstructing the EC stripe according to the merged request includes: Based on the consecutive address segments in the merged request, unidirectional I / O operations are performed according to the disk head rotation direction to reconstruct the EC stripe.

4. The method according to claim 3, characterized in that, The step of reconstructing the EC stripe according to the merged request includes: Based on the merged request, the temporary data that the EC stripe needs to read is reconstructed from the multiple concurrent requests in the cache. The temporary data includes the remaining data blocks and check blocks of the EC stripe. Based on the temporary data, obtain a copy of the lost data block in the EC strip; A copy of the lost data block in the EC stripe is written into the distributed storage system to reconstruct the EC stripe.

5. The method according to claim 4, characterized in that, The method further includes: The metadata of the copy is stored, including location information.

6. The method according to claim 4, characterized in that, The cached temporary data required to reconstruct the EC stripe by the multi-way concurrent requests includes: The temporary data that the multiple concurrent requests need to read to reconstruct the EC stripe is cached in the same cache medium.

7. The method according to any one of claims 1 to 6, characterized in that, The multi-path concurrent requests are asynchronous requests.

8. A data processing apparatus, characterized in that, The device is deployed on the master node of a distributed storage system, and the device includes: The acquisition module is used to acquire multiple concurrent requests, each of which is used to reconstruct an erasure coding (EC) stripe. The merging module is used to sort the concurrent requests according to the input / output I / O addresses of each request in the multiple concurrent requests, merge the I / O addresses in the sorted requests in order, and obtain the merged requests. The merged requests are used to indicate data processing of consecutive address segments. The reconstruction module is used to reconstruct the EC stripe according to the merged request.

9. An electronic device, characterized in that, The electronic device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the electronic device to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for reconstructing disk array, electronic equipment and computer program product

    CN113126887A

  • Independently selective tile group access with data structuring

    US20150121000A1