Data read-write method, data processing unit, distributed system and related device

By introducing a Data Processing Unit (DPU) into the compute-storage separation architecture, the problem of increased computational overhead from data read/write operations between compute nodes and storage nodes is solved, resulting in more efficient data processing performance and response speed.

CN120848799APending Publication Date: 2025-10-28SANGFOR TECH INC +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510979634.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

In a compute-storage separation architecture, data read and write operations between compute nodes and storage nodes increase the computational overhead of compute nodes, leading to a decrease in data processing performance.

Method used

A Data Processing Unit (DPU) is set up between the compute nodes and storage nodes. The DPU performs data read and write operations, reducing the data read and write operations of the compute nodes, and achieving asynchronous communication through data interaction elements.

Benefits of technology

It improved the data processing performance and response speed of computing nodes, increased data throughput, and reduced the waiting time of computing nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848799A_ABST
    Figure CN120848799A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data reading and writing method, a data processing unit, a distributed system and a related device, which are used for improving the data processing performance of a computing node under a storage and computation separation architecture. The method comprises the steps that if a command written into a data interaction element by a computing node is received, the command in the data interaction element is obtained through a first thread, and the command comprises a data operation type and a data address of target data; accessing the storage node by using the first thread, and reading or writing the target data from the solid state disk according to the data address so as to execute the command; and writing an execution result of the command into the data interaction element by utilizing the first thread, so that the computing node obtains the execution result of the command from the data interaction element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data reading and writing method, a data processing unit, a distributed system, and related devices. Background Art

[0002] In big data scenarios, the amount of data is huge and growing rapidly. Different businesses have different needs for computing and storage. In traditional architectures, computing resources (such as CPU, memory, etc.) and storage resources (such as hard disks, disk arrays, etc.) are usually tightly coupled. Storage devices are directly connected to computing servers, and computing and storage functions are implemented in the same physical device or system.

[0003] To address the diverse storage and computing needs of different business applications, the storage-compute separation architecture breaks away from the tight coupling of traditional architectures, separating storage and computing into independent modules that interact via a network. Specifically, the storage-compute separation architecture treats compute nodes and storage nodes as independent physical devices. Compute nodes focus on performing various computing tasks, such as data processing, analysis, and computation; storage nodes are dedicated to data storage and management. The two are connected via high-speed networks (such as Ethernet and InfiniBand) to enable data transmission and sharing.

[0004] However, in the existing storage-compute separation architecture, when performing data processing operations, the data reading and writing interaction is usually performed between the compute nodes and the storage nodes first. After the data reading and writing operations are completed, the data processing and analysis operations are then performed, which greatly increases the computing overhead of the compute nodes. Summary of the Invention

[0005] This application provides a data read / write method, a data processing unit, a distributed system, and related devices, which are used to add a data processing unit (DPU) between computing nodes and storage nodes, and to use the DPU to perform data read / write operations. This reduces the number of data read / write operations on computing nodes and improves the data processing and analysis performance of computing nodes compared to the prior art.

[0006] The first aspect of this application provides a data read / write method applied to a data processing unit (DPU). The DPU has multiple first threads, is communicatively connected to a computing node and a storage node equipped with a solid-state drive (SSD), and shares data interaction elements with the computing node. The method includes:

[0007] If the computing node obtains the command written in the data interaction element, then the first thread is used to obtain the command in the data interaction element, the command including the data operation type and the data address of the target data;

[0008] The first thread accesses the storage node to read or write target data from the solid-state drive according to the data address in order to execute the command;

[0009] The first thread is used to write the execution result of the command into the data interaction element, so that the computing node can obtain the execution result of the command from the data interaction element.

[0010] As an optional embodiment, the data processing unit is equipped with a Storage Performance Development Kit (SPDK), the target data includes data blocks, and the data address includes the data start block and the data length;

[0011] The step of using the first thread to access the storage node, read or write target data from the solid-state drive according to the data address, and execute the command includes:

[0012] The first thread accesses the storage node through the data interface provided by the Storage Performance Development Kit (SPDK), reads or writes data of the specified length from the data start block pre-stored on the solid-state drive according to the data operation type, and executes the command.

[0013] As an optional embodiment, the data interaction element includes a command array;

[0014] If the computing node obtains the command written in the data interaction element, then the first thread is used to obtain the command in the data interaction element. The command includes a data operation type and the data address of the target data, including:

[0015] If the computing node obtains the command written in the command array, then the first thread is used to obtain the command in the command array, the command including the data operation type and the data address of the target data;

[0016] The step of using the first thread to write the execution result of the command into the data interaction element, so that the computing node can obtain the execution result of the command from the data interaction element, includes:

[0017] The first thread is used to write the execution result of the command into the command array, so that the computing node can obtain the execution result of the command from the command array.

[0018] As an optional embodiment, the data interaction element further includes a doorbell array, wherein the data processing unit and the computing node share the command array and the doorbell array, and each element in the command array corresponds one-to-one with each element in the doorbell array;

[0019] If the computing node obtains the command written in the command array, then using the first thread to obtain the command in the command array includes:

[0020] The first thread polls the doorbell array. If it is determined that the target doorbell array element in the doorbell array has been updated from the initial value to the intermediate value, the first thread retrieves the command in the target command array element. The intermediate value is used to indicate that there is a command written by the computing node in the target command array element in the command array.

[0021] As an optional embodiment, after writing the execution result of the command into the command array using the first thread, the method further includes:

[0022] The target doorbell array element of the doorbell array is restored from the intermediate value to the initial value, wherein the initial value is used to indicate that the command execution in the target command value element has been completed.

[0023] As an optional embodiment, the data processing unit is further provided with a second thread, wherein the second thread is used to distribute the command to the plurality of first threads, and the second thread is also used to maintain a load information table, wherein the load information table records the task volume and current running status of each first thread;

[0024] The step of using the first thread to obtain commands from the data interaction elements includes:

[0025] The second thread polls the data interaction elements;

[0026] If it is determined that the data interaction element contains a command written by the computing node, then the second thread is used to obtain the command;

[0027] Based on the task volume and current running status of each first thread in the load information table, the second thread is used to obtain the first target thread whose current load is less than a preset threshold.

[0028] The second thread is used to distribute the command to the first target thread.

[0029] As an optional embodiment, the second thread and the first thread communicate through a shared memory pool;

[0030] The step of distributing the command to the first target thread using the second thread includes:

[0031] The second thread is used to write the command into the shared memory pool;

[0032] The command is obtained from the shared memory pool using the first target thread.

[0033] As an optional embodiment, the second thread and the first thread communicate through a shared memory pool;

[0034] The step of using the first thread to write the execution result of the command into the data interaction element includes:

[0035] The execution result of the command is written to the shared memory pool using the first target thread;

[0036] The second thread is used to retrieve the execution result of the command from the shared memory pool;

[0037] The second thread is used to write the execution result of the command into the data interaction element.

[0038] A second aspect of this application provides a data processing unit, which includes multiple first threads. The data processing unit is communicatively connected to a computing node and a storage node equipped with a solid-state drive, and the data processing unit and the computing node share data interaction elements. The method includes:

[0039] The acquisition unit is configured to, if it receives a command written by the computing node in the data interaction element, acquire the command in the data interaction element using the first thread, wherein the command includes a data operation type and a data address of the target data;

[0040] An execution unit is configured to access the storage node using the first thread, read or write the target data from the solid-state drive according to the data address, in order to execute the command;

[0041] The writing unit is used to write the execution result of the command into the data interaction element using the first thread, so that the computing node can obtain the execution result of the command from the data interaction element.

[0042] A third aspect of this application provides a distributed system including a computing unit and a storage unit. The computing unit includes one or more computing nodes and a data processing unit. The storage unit includes multiple storage nodes. The data processing unit is communicatively connected to each computing node and each storage node. The data processing unit has multiple first threads, and the data processing unit and the computing nodes share data interaction elements.

[0043] The computing node is used to write commands to the data interaction element and to obtain the execution results of the commands from the data interaction element. The commands include data operation type and data address of target data.

[0044] The storage node is used to store data corresponding to the command;

[0045] The data processing unit is used to execute the data read / write method provided in the first aspect of the embodiments of this application.

[0046] A third aspect of this application provides a computer device including a processor, which, when executing a computer program stored in a memory, implements the data read / write method provided in the first aspect of this application.

[0047] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the data reading and writing method provided in the first aspect of this application.

[0048] The fifth aspect of this application provides a computer program product having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the data read / write method provided in the first aspect of this application.

[0049] As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:

[0050] In this embodiment, a data processing unit (DPU) is provided between the computing node and the storage node, and the DPU is used to process the commands written by the computing node in the data interaction element. This allows the DPU to assist the computing node in reading or writing data from the storage node, thereby reducing the data reading or writing operations of the computing node and improving the data processing performance of the computing node.

[0051] Furthermore, embodiments of this application can also receive commands written by computing nodes through shared data interaction elements, thereby realizing asynchronous communication between computing nodes and data processing units (DPUs). This asynchronous communication method allows computing nodes to execute other commands in parallel without waiting for the direct result of the command after writing it, which is equivalent to improving the response speed and data throughput of computing nodes. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the architecture of the data read / write system according to an embodiment of this application;

[0053] Figure 2 This is a schematic diagram of one embodiment of the data read / write method in this application.

[0054] Figure 3 This is a detailed step of step 202 in the embodiments of this application;

[0055] Figure 4 This is a detailed step of step 201 in the embodiments of this application;

[0056] Figure 5 This is another detailed step of step 201 in the embodiments of this application;

[0057] Figure 6 This is a schematic diagram of an embodiment of communication between the second thread and the first thread in this application.

[0058] Figure 7 This is a schematic diagram of one embodiment of the data processing unit (DPU) in this application. Detailed Implementation

[0059] This invention provides a data read / write method for adding a data processing unit (DPU) between a computing node and a storage node, and using the DPU to perform data read / write operations. This reduces the number of data read / write operations on the computing node compared to existing technologies, thereby improving the data processing and analysis performance of the computing node.

[0060] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0061] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0062] This application provides a data read / write method. The general principle of this method is as follows: a Data Processing Unit (DPU) is set up between a computing node and a storage node, and the DPU is communicatively connected to both the computing node and the storage node. The DPU performs data read / write operations originally performed by the computing node, thereby reducing the number of data read / write operations performed by the computing node and improving the computing node's ability to further analyze the acquired data. Specifically, this application includes a first thread in the DPU and shares a data interaction element with the computing node. This allows the DPU to execute the following process: if a command written by the computing node to the data interaction element is received, the first thread is used to retrieve the command from the data interaction element. The command includes a data operation type and the data address of the target data. The first thread accesses the storage node and reads or writes the target data from the solid-state drive according to the data address to execute the command. The first thread writes the execution result of the command to the data interaction element, allowing the computing node to retrieve the execution result of the command from the data interaction element. The data read / write method provided in this application reduces the data read / write operations of computing nodes and enhances the computing nodes' ability to further perform data analysis on the acquired data because the data read / write operations can be performed by a separately configured data processing unit (DPU).

[0063] Furthermore, the data processing unit (DPU) and the computing node in this application share a data interaction element. This allows the computing node to execute other data processing instructions after writing data read / write commands into the data interaction element, without waiting for the execution results of the data read / write commands. In other words, asynchronous communication is achieved between the data processing unit (DPU) and the computing node. This communication method does not require waiting for the execution results of data read / write commands and allows the computing node to process multiple data requests in parallel, thereby improving the response speed and data throughput of the computing node.

[0064] To better implement the above data read / write methods, this application provides a data read / write system. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of the architecture of a data read / write system provided in an embodiment of this application. The data read / write system may include at least one computing node 101, a data processing unit (DPU) 102, and a storage node 103. Different types of applications may be installed on the computing node 101, such as instant messaging applications, live streaming applications, conferencing applications, etc. The computing node 101 may be a smartphone, tablet, laptop, desktop computer, smart vehicle, etc. The data processing unit (DPU) 102 is a programmable chip specifically designed for processing data center network data. It aims to offload network, storage, and security functions from the CPU to improve the overall performance, efficiency, and flexibility of the data center. The DPU can independently handle tasks such as network traffic processing, storage access control, and security protection in the data center, allowing the CPU to focus on more core business computing, thereby optimizing the resource utilization and architecture of the data center. The storage node 103 can be used for application data and image data generated by different types of applications on the computing node 101. Storage node 103 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, etc. The aforementioned data read / write method is executed by the data processing unit DPU 102. When the data processing unit DPU 102 receives a command written by computing node 101 in a data interaction element, it uses the first thread to obtain the command from the data interaction element. The command includes the data operation type and the data address of the target data. The first thread accesses storage node 103 to read or write the target data from the solid-state drive according to the data address to execute the command. The first thread writes the execution result of the command to a command array, so that computing node 101 can obtain the execution result of the command from the command array. This reduces the data read / write operations of computing node 101, effectively improving the computing node 101's ability to perform further data processing.

[0065] For ease of understanding, the data read / write methods in this application are described in detail below. Please refer to [link / reference]. Figure 2 One embodiment of the data read / write method in this application includes:

[0066] 201. If a command written by the computing node in the data interaction element is received, the first thread is used to obtain the command in the data interaction element, the command including the data operation type and the data address of the target data;

[0067] The data read / write method of this application is applied to Figure 1 The embodiment includes a data processing unit DPU102, which has pre-established communication connections with computing node 101 and storage node 103 to enable data communication between the data processing unit DPU102 and computing node 101 and storage node 103.

[0068] In order to facilitate data communication between computing node 101 and data processing unit DPU 102, this embodiment of the application sets up a shared data interaction element between computing node 101 and data processing unit DPU 102. The data interaction element is mainly to facilitate computing node 101 to write commands, and after the command is written, data processing unit DPU 102 can receive the command in a timely manner, so as to improve the speed and convenience of data processing unit DPU 102 to obtain the command.

[0069] As an optional embodiment, the data interaction elements in this application embodiment can be shared over the network in the form of folders. The data processing unit DPU102 can poll the folder in real time or periodically to determine whether there are write commands in the data interaction elements. When it is determined that there are write commands from computing nodes in the data interaction elements, the first thread is used to obtain the commands in the data interaction elements. The commands include data operation type and target data address. The data operation type mainly includes read operation and write operation. The target data address can vary depending on the data type. For example, when the target data is a file, the target data address is the storage path of the file. Or, when the target data is a data block, the target data address is the data start block and the data length. The data start block is used to describe the specific storage location of the data in the storage node, and the data length is used to describe the size of the data obtained by the read or write operation.

[0070] It is easy to understand that the data interaction element in the embodiments of this application can be a command array or a message queue. When the data interaction element is a command array, the command array can include multiple command array elements, and each array element is used to record the specific content of the command, such as the data operation type and the data address of the target data.

[0071] 202. Using the first thread to access the storage node, read or write target data from the solid-state drive according to the data address to execute the command;

[0072] When the data processing unit DPU102 obtains a command from the data interaction element, it accesses it using a pre-created first thread. Figure 1 The storage node 103 reads or writes target data from the solid-state drive of the storage node according to the data address of the target data to execute the command. Specifically, when the target data is a data block, when reading or writing data, it reads or writes data of the above-mentioned data length (the data length here refers to the data length in the command) from the pre-stored data starting block according to the data operation type to complete the data read and write operation.

[0073] 203. The first thread is used to write the execution result of the command into the data interaction element, so that the computing node can obtain the execution result of the command from the command array.

[0074] If the first thread completes the read / write command for the data, it writes the execution result of the command to the data interaction element so that the compute node 103 can obtain the execution result of the command from the command array.

[0075] As an optional embodiment, when the data interaction element is a command array, the computing node 103 can also periodically or in real time poll the command array, and when there is a command execution result written in the command array, directly obtain the execution result of the command from the command array, and use the execution result of the command (i.e., the data read or the data written) to perform execution data processing or data analysis.

[0076] In this embodiment, a data processing unit (DPU) is provided between the computing node and the storage node, and the DPU is used to process the commands written by the computing node in the data interaction element. This allows the DPU to assist the computing node in reading or writing data from the storage node, thereby reducing the data reading or writing operations of the computing node and improving the data processing performance of the computing node.

[0077] Furthermore, in this embodiment, commands written by the computing node are received through the interaction of data interaction elements, thereby realizing asynchronous communication between the computing node and the data processing unit (DPU). This asynchronous communication method allows the computing node to execute other commands in parallel without waiting for the direct result of the command after writing it, which is equivalent to improving the response speed and data throughput of the computing node.

[0078] based on Figure 2 In step 202 of the embodiments, in one or more optional embodiments, the embodiments of this application may also perform the following steps, please refer to... Figure 3 :

[0079] Deploying the Storage Performance Development Kit (SPDK) in the Data Processing Unit (DPU) enables the first thread to access the storage node through the data interface provided by the SPDK, read or write target data from the solid-state drive according to the data address, and execute commands.

[0080] Specifically, the Storage Performance Development Kit (SPDK) is a toolset for rapidly developing high-performance, scalable storage applications. Its main advantages include:

[0081] 1. User-space driver: Traditional storage I / O operations typically pass through kernel space, resulting in frequent context switching overhead. SPDK moves storage device drivers to user space, allowing I / O operations to be performed in user mode, thus avoiding the overhead of repeated switching between kernel and user modes and improving I / O performance.

[0082] 2. Polling Mode Driver (PMD): This mode abandons the traditional interrupt-driven approach and adopts a polling mode to continuously check the device status, reducing the latency caused by interrupt handling and enabling more efficient handling of I / O requests.

[0083] 3. Asynchronous I / O processing: Supports asynchronous I / O operations, allowing applications to continue executing other tasks after initiating an I / O request, thus improving the system's concurrent processing capabilities.

[0084] In this way, when the first thread accesses the storage node through the data interface provided by the Storage Performance Development Kit (SPDK), the SPDK data interface sends the command to the storage node equipped with the NVMe SSD over the network. After receiving the command, the storage node generates an NVMe over PCIe command to access the NVMe SSD, so as to read or write target data from the SSD according to the data address. Specifically, when the target data is a data block and the data address is the data start block and the data length, the command reads or writes data of the data length from the data start block according to the data operation type of the data length to execute the command.

[0085] Therefore, in this embodiment of the application, when the data processing unit (DPU) accesses the storage node through the data interface provided by SPDK, it can directly perform I / O operations in user mode, thereby avoiding the overhead of repeated switching from kernel mode to user mode, improving I / O performance. In addition, the data interface provided by SPDK can also avoid interrupt driving in kernel mode and use a polling mode to check the execution status of commands, thereby reducing the latency caused by interrupts and further improving I / O performance.

[0086] based on Figure 2In step 201 of the embodiments, in one or more optional embodiments, the data interaction element may include a doorbell array in addition to a command array. Embodiments of this application may also configure the data processing unit (DPU) and the computing node to share the command array and the doorbell array, with each element in the command array corresponding one-to-one with each element in the doorbell array, and then perform the following steps. Please refer to [link to relevant documentation]. Figure 4 :

[0087] The Data Processing Unit (DPU) uses the first thread to poll the doorbell array. If it is determined that the target doorbell array element in the doorbell array has been updated from the initial value to the intermediate value, the first thread is used to obtain the command in the target command array element. The intermediate value is used to indicate that there is a command written by a computing node in the target command array element.

[0088] As an optional embodiment, this application embodiment not only sets up a command array to store commands, but also sets up a doorbell array to more conveniently obtain the change status of commands in the command array. Each element in the command array corresponds one-to-one with an element in the doorbell array. For example, if the command array has three elements A, B, and C, then the doorbell array also has three elements A, B, and C. Furthermore, different element values ​​are set in the doorbell array to represent changes in command status. For example, the element values ​​in the doorbell array can be set to 0 and 1 as initial and intermediate values, respectively. The initial and intermediate values ​​are used to distinguish changes in command status in the command array. For example, when the element value in the command array is 0, it can be used to indicate that no command has been written or the command execution has been completed. When the element value in the command array is 1, it is used to indicate that a command has been written and needs to be executed.

[0089] Generally, the data in the doorbell array is much smaller than the data in the command array. Therefore, in this embodiment of the application, by accessing the doorbell array to obtain the commands in the command array, the latency and bandwidth of command acquisition can be greatly reduced, thereby improving the efficiency of command acquisition.

[0090] Furthermore, as a preferred embodiment, this application embodiment can also configure the data processing unit (DPU) and the computing node to share the command array and doorbell array via Direct Memory Access (DMA). Direct Memory Access (DMA), as a data transfer mechanism, allows the DPU to directly exchange data with the memory of the computing node without continuous CPU intervention. The working principle of Direct Memory Access (DMA) is described below:

[0091] In traditional data transfer methods, the transfer of data from the Data Processing Unit (DPU) to the memory of the compute node, or vice versa, typically requires the compute node's CPU as an intermediary. That is, the CPU first reads data from the DPU and then writes it to the compute node's memory, or vice versa. This method consumes a significant amount of the compute node's CPU time and resources, preventing it from handling other tasks simultaneously and reducing overall system performance. DMA technology, however, achieves direct data transfer through a dedicated DMA controller (DMAC). When a device needs to transfer data, it sends a request to the DMAC. Upon receiving the request, the DMAC requests bus control from the CPU. Once bus control is obtained, the DMAC can directly establish a data transfer channel between the device and memory for rapid data transfer, allowing the CPU to continue executing other tasks throughout the process. When the data transfer is complete, the DMAC sends an interrupt signal to the CPU, notifying it that the transfer has ended.

[0092] As can be seen, in this embodiment of the application, the data processing unit (DPU) and the computing node share the command array and doorbell array through direct memory access (DMA). By reducing the burden on the computing node's CPU, the computing node's CPU can handle other important tasks more efficiently, thereby further improving the processing performance of the computing node's CPU.

[0093] based on Figure 2 In step 201 of the embodiments, in one or more embodiments of step 201, as an optional embodiment, when the data interaction element is a command array:

[0094] In order to fully utilize the data processing capability of each first thread when the data processing unit (DPU) retrieves commands from the command array using the first thread, this embodiment further includes a second thread in the DPU. The second thread distributes commands to multiple first threads and maintains a load information table that records the workload and current running status of each first thread. The process of retrieving commands from the command array using the first thread is described in detail below. Please refer to [link to relevant documentation]. Figure 5 :

[0095] The second thread polls the command array. If it is determined that there is a command written by a computing node in the command array element, the second thread retrieves the command. Based on the task volume and current running status of each first thread in the load information table, the second thread retrieves the first target thread whose current load is less than a preset threshold and distributes the command to the first target thread.

[0096] Specifically, in this embodiment, a second thread is set in the data processing unit (DPU), and the second thread maintains a load information table. This allows the second thread to distribute commands to the first thread, firstly by obtaining the first target thread whose load is less than a preset threshold through the load information table, and then distributing the command to the first target thread. In other words, this embodiment, through the second thread and the load information table, can reasonably allocate system resources to each first thread, avoiding allocating too many resources to the first thread with too low a load, thereby allocating resources to the first target thread that truly needs them, and making full use of the data processing capabilities of each first thread.

[0097] Furthermore, this application embodiment also avoids the resource consumption caused by setting a lock mechanism for each first thread when there are only multiple first threads in the data processing unit (DPU) by setting a second thread to obtain commands from the command array and assigning commands to multiple first threads through the second thread.

[0098] As is well known, when multiple first threads exist, they may simultaneously access and execute commands in the command array. To ensure that only one first thread executes a command at a time, a lock mechanism is typically set for a first thread when it executes the command. This avoids data inconsistency caused by multiple first threads executing the command. However, this application sets up a second thread in the data processing unit (DPU). The second thread can then retrieve commands from the command array, assign commands to the first thread, and retrieve the command execution result after the first thread completes its execution. The result is then written into the command array, thus avoiding the resource consumption caused by setting a lock mechanism for the first thread.

[0099] Based on the above embodiments, after setting a second thread and multiple first threads in the data processing unit (DPU), in order to facilitate thread communication between the second thread and the first threads, this embodiment of the application can also configure the second thread and the first threads to communicate through a shared memory pool. Please refer to [link to relevant documentation]. Figure 6 :

[0100] When the second thread communicates with the first thread through a shared memory pool, the communication between the second thread and the first thread can reduce the continuous intervention of the CPU in the Data Processing Unit (DPU) and improve the processing performance of the CPU in the DPU.

[0101] Specifically, when the second thread distributes the command to the first target thread, it can write the command into the shared memory pool of the data processing unit (DPU) and use the first target thread to retrieve the command from the shared memory pool.

[0102] Furthermore, after the first target thread finishes executing the command, it writes the execution result of the command to the shared memory pool. The second thread then retrieves the execution result of the command from the shared memory pool and writes the execution result of the command to the data interaction element. When the data interaction element is a command array, the execution result of the command is written to the target command array element of the command array.

[0103] After the second thread writes the execution result of the direct command of the command into the target command array element of the command array, the second thread can also restore the target doorbell array element of the doorbell array from the intermediate value to the initial value. Here, the initial value is used to indicate that the command in the target command array element has been executed, so that the computing node can continue to write new commands into the target command array element of the command array.

[0104] In this way, by setting the second thread and the first thread to communicate through a shared memory pool, the embodiments of this application not only reduce the continuous intervention of the CPU in the DPU and improve the processing performance of the CPU in the data processing unit (DPU), but also further reduce the data latency and network bandwidth caused by inter-thread communication, thus improving the convenience of inter-thread communication.

[0105] Furthermore, after the second thread writes the execution result of the direct command of the command into the target command array element of the command array, it also restores the target doorbell array element of the doorbell array from the intermediate value to the initial value, so that the computing node can continue to write new commands into the command array element of the command array, so as to ensure the normal writing and execution of new commands.

[0106] It is understood that, in various embodiments of the present invention, the order of the steps does not imply the order of execution. The execution order of each step should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0107] This application also provides a computer program product having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the steps described in the above-described method embodiments.

[0108] The data read / write method in the embodiments of this application has been described in detail above. The data processing unit (DPU) in the embodiments of this application will be described in detail below. Please refer to [link / reference]. Figure 7 :

[0109] The data processing unit (DPU) is configured with multiple first threads. The DPU communicates with the computing node and the storage node equipped with a solid-state drive (SSD), and the DPU and the computing node share data interaction elements. The DPU in this application includes:

[0110] If the acquisition unit 701 receives a command written by the computing node in the data interaction element, it uses the first thread to acquire the command in the command array. The command includes a data operation type and the data address of the target data.

[0111] The execution unit 702 is used to access the storage node using the first thread, read or write the target data from the solid-state drive according to the data address, so as to execute the command;

[0112] The writing unit 703 is used to write the execution result of the command into the data interaction element using the first thread, so that the computing node can obtain the execution result of the command from the command array.

[0113] As an optional embodiment, the data processing unit (DPU) is equipped with a storage performance development kit (SPDK), the target data includes data blocks, and the data address includes the data start block and the data length;

[0114] Execution unit 702 is specifically used for:

[0115] The first thread accesses the storage node through the data interface provided by the Storage Performance Development Kit (SPDK), reads or writes data of the specified length from the data start block pre-stored on the solid-state drive according to the data operation type, and executes the command.

[0116] As an optional embodiment, the data interaction element includes a command array;

[0117] Acquisition unit 701 is specifically used for:

[0118] If the computing node obtains the command written in the command array, then the first thread is used to obtain the command in the command array, the command including the data operation type and the data address of the target data;

[0119] Write unit 703 is specifically used for:

[0120] The first thread is used to write the execution result of the command into the command array, so that the computing node can obtain the execution result of the command from the command array.

[0121] As an optional embodiment, the data interaction element also includes a doorbell array, wherein the data processing unit (DPU) and the computing node share the command array and the doorbell array through direct memory access (DMA), and each element in the command array corresponds one-to-one with each element in the doorbell array;

[0122] The acquisition unit 701 is specifically used for:

[0123] The first thread polls the doorbell array. If it is determined that the target doorbell array element in the doorbell array has been updated from the initial value to the intermediate value, the first thread retrieves the command in the target command array element. The intermediate value is used to indicate that there is a command written by the computing node in the target command array element in the command array.

[0124] As an optional embodiment, execution unit 702 is further configured to:

[0125] After the first thread writes the execution result of the command into the command array, the target doorbell array element of the doorbell array is restored from the intermediate value to the initial value, wherein the initial value is used to indicate that the command execution in the target command value element is complete.

[0126] As an optional embodiment, the data processing unit (DPU) further includes a second thread, which distributes the commands to the plurality of first threads. The second thread also maintains a load information table, which records the workload and current running status of each first thread.

[0127] The acquisition unit 701 is specifically used for:

[0128] The second thread polls the data interaction elements;

[0129] If it is determined that there is a command written by the computing node in the data interaction element of the command array, then the second thread is used to obtain the command;

[0130] Based on the task volume and current running status of each first thread in the load information table, the second thread is used to obtain the first target thread whose current load is less than a preset threshold.

[0131] The second thread is used to distribute the command to the first target thread.

[0132] As an optional embodiment, the second thread and the first thread communicate through a shared memory pool;

[0133] The acquisition unit 701 is specifically used for:

[0134] The second thread is used to write the command into the shared memory pool;

[0135] The command is obtained from the shared memory pool using the first target thread.

[0136] As an optional embodiment, the second thread and the first thread communicate through a shared memory pool;

[0137] Write unit 703 is specifically used for:

[0138] The execution result of the command is written to the shared memory pool using the first target thread;

[0139] The second thread is used to retrieve the execution result of the command from the shared memory pool;

[0140] The second thread is used to write the execution result of the command into the data interaction element.

[0141] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0142] Furthermore, embodiments of this application also provide a distributed system, the specific structure of which can be found in [reference needed]. Figure 1 System architecture:

[0143] This distributed system includes computing units and storage units. The computing unit includes one or more computing nodes and a data processing unit (DPU). The storage unit includes multiple storage nodes. The DPU communicates with each computing node and each storage node. The DPU has multiple first threads, and the DPU and computing nodes share data interaction elements.

[0144] Compute nodes are used to write commands to data interaction elements and retrieve the execution results of commands from data interaction elements. The command includes the data operation type and the data address of the target data.

[0145] Storage nodes are used to store data corresponding to commands;

[0146] The data processing unit is used to perform the various steps provided in the above method embodiments.

[0147] The data processing unit (DPU) in this embodiment of the invention has been described above from the perspective of modular functional entities. The computer device in this embodiment of the invention is described below from the perspective of hardware processing:

[0148] This computer device is used to implement the functions of a data processing unit (DPU). One embodiment of the computer device in this invention includes:

[0149] Processor and memory;

[0150] The memory is used to store computer programs, and when the processor executes the computer programs stored in the memory, it can implement the various steps in the above method embodiments.

[0151] It is understood that when the processor in the computer device described above executes the computer program, it can also realize the functions of each unit in the corresponding device embodiments described above, which will not be repeated here. For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the data processing unit (DPU). For example, the computer program can be divided into units in the data processing unit (DPU) described above, and each unit can realize the specific functions described in the corresponding data processing unit (DPU) above.

[0152] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the processor and memory are merely examples of a computer device and do not constitute a limitation on the computer device. It may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0153] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.

[0154] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0155] The present invention also provides a computer-readable storage medium for implementing the functions of a data processing unit (DPU), wherein a computer program is stored thereon, and when the computer program is executed by a processor, the processor can implement the various steps in the above method embodiments.

[0156] It is understood that if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0157] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0158] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0159] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0160] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data read / write method, characterized in that, The method, applied to a data processing unit having multiple first threads, is communicatively connected to computing nodes and storage nodes equipped with solid-state drives (SSDs), and shares data interaction elements with the computing nodes. If the computing node obtains the command written in the data interaction element, then the first thread is used to obtain the command in the data interaction element, the command including the data operation type and the data address of the target data; The first thread accesses the storage node to read or write target data from the solid-state drive according to the data address in order to execute the command; The first thread is used to write the execution result of the command into the data interaction element, so that the computing node can obtain the execution result of the command from the data interaction element.

2. The method according to claim 1, characterized in that, The data processing unit is equipped with the Storage Performance Development Kit (SPDK), the target data includes data blocks, and the data address includes the data start block and the data length. The step of using the first thread to access the storage node, read or write target data from the solid-state drive according to the data address, and execute the command includes: The first thread accesses the storage node through the data interface provided by the Storage Performance Development Kit (SPDK), reads or writes data of the specified length from the data start block pre-stored on the solid-state drive according to the data operation type, and executes the command.

3. The method according to claim 1, characterized in that, The data interaction elements include a command array; If the computing node obtains the command written in the data interaction element, then the first thread is used to obtain the command in the data interaction element. The command includes a data operation type and the data address of the target data, including: If the computing node obtains the command written in the command array, then the first thread is used to obtain the command in the command array, the command including the data operation type and the data address of the target data; The step of using the first thread to write the execution result of the command into the data interaction element, so that the computing node can obtain the execution result of the command from the data interaction element, includes: The first thread is used to write the execution result of the command into the command array, so that the computing node can obtain the execution result of the command from the command array.

4. The method according to claim 3, characterized in that, The data interaction elements also include a doorbell array. The data processing unit and the computing node share the command array and the doorbell array, and each element in the command array corresponds one-to-one with each element in the doorbell array. If the computing node obtains the command written in the command array, then using the first thread to obtain the command in the command array includes: The first thread polls the doorbell array. If it is determined that the target doorbell array element in the doorbell array has been updated from the initial value to the intermediate value, the first thread retrieves the command in the target command array element. The intermediate value is used to indicate that there is a command written by the computing node in the target command array element in the command array.

5. The method according to claim 4, characterized in that, After using the first thread to write the execution result of the command into the command array, the method further includes: The target doorbell array element of the doorbell array is restored from the intermediate value to the initial value, wherein the initial value is used to indicate that the command execution in the target command value element has been completed.

6. The method according to claim 1, characterized in that, The data processing unit is further provided with a second thread, wherein the second thread is used to distribute the command to the plurality of first threads, and the second thread is also used to maintain a load information table, wherein the load information table records the task volume and current running status of each first thread; The step of using the first thread to obtain commands from the data interaction elements includes: The second thread polls the data interaction elements; If it is determined that the data interaction element contains a command written by the computing node, then the second thread is used to obtain the command; Based on the task volume and current running status of each first thread in the load information table, the second thread is used to obtain the first target thread whose current load is less than a preset threshold. The second thread is used to distribute the command to the first target thread.

7. The method according to claim 6, characterized in that, The second thread and the first thread communicate through a shared memory pool; The step of distributing the command to the first target thread using the second thread includes: The second thread is used to write the command into the shared memory pool; The command is obtained from the shared memory pool using the first target thread.

8. The method according to claim 6, characterized in that, The second thread and the first thread communicate through a shared memory pool; The step of using the first thread to write the execution result of the command into the data interaction element includes: The execution result of the command is written to the shared memory pool using the first target thread; The second thread is used to retrieve the execution result of the command from the shared memory pool; The second thread is used to write the execution result of the command into the data interaction element.

9. A data processing unit, characterized in that, The data processing unit is configured with multiple first threads. The data processing unit is communicatively connected to computing nodes and storage nodes equipped with solid-state drives (SSDs), and the data processing unit and the computing nodes share data interaction elements. The method includes: The acquisition unit is configured to, if it receives a command written by the computing node in the data interaction element, acquire the command in the data interaction element using the first thread, wherein the command includes a data operation type and a data address of the target data; An execution unit is configured to access the storage node using the first thread, read or write the target data from the solid-state drive according to the data address, in order to execute the command; The writing unit is used to write the execution result of the command into the data interaction element using the first thread, so that the computing node can obtain the execution result of the command from the data interaction element.

10. A distributed system, characterized in that, The system includes a computing unit and a storage unit. The computing unit includes one or more computing nodes, and a data processing unit. The storage unit includes multiple storage nodes. The data processing unit is communicatively connected to each computing node and each storage node. The data processing unit has multiple first threads, and the data processing unit and the computing nodes share data interaction elements. The computing node is used to write commands to the data interaction element and to obtain the execution results of the commands from the data interaction element. The commands include data operation type and data address of target data. The storage node is used to store data corresponding to the command; The data processing unit is used to execute the data read / write method as described in any one of claims 1 to 8.

11. A computer device comprising a processor, characterized in that, When the processor executes a computer program stored in the memory, it is used to implement the data read / write method as described in any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it is used to implement the data read / write method as described in any one of claims 1 to 8.

13. A computer program product having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it is used to implement the data read / write method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data processing method, device and system

    CN117311593A

  • Data read-write processing system and method

    CN117369721A

  • Data read-write method and device based on DPU, electronic equipment and computer storage medium

    CN118708532A

  • Acceleration unit, dedicated data processor, host and read-write signal transmission method

    CN118820142A