Data processing method, network card, computer device, and computer cluster
By dividing the computing nodes into multiple packets and establishing process correspondence, the problem of computing overhead and communication delay when expanding the scale of the computer cluster is solved, and efficient data processing and communication are achieved.
Patent Information
- Application Number
- PCT/CN2024/098722
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-27
- Filing Date
- 2024-06-12
- Publication Date
- 2025-05-01
AI Technical Summary
When computer clusters are scaled, the prior art is difficult to effectively reduce computing overhead and communication delays, especially when using RDMA technology and UD protocols.
By dividing the computing node into multiple packets, establishing a full connection correspondence between processes and the correspondence between processes within each packet, the network card uses a network card to process data based on these relationships, thereby reducing the number of connections and computing overhead.
It realizes that while expanding the scale of the computer cluster, it reduces computing overhead and communication delays, and improves the overall performance of the cluster.
Smart Images

Figure CN2024098722_01052025_PF_FP_ABST
Abstract
Description
Data processing method, network card, computer equipment and computer cluster
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 27, 2023, with application number 202311411791.2 and application name “A data processing method, network card, computer device and computer cluster”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a data processing method, a network card, a computer device, and a computer cluster. Background Art
[0003] Currently, compute nodes in a computer cluster can be equipped with network cards (NICs), which enable communication between them via remote direct memory access (RDMA) technology. Typically, compute nodes can be connected using a fully connected approach based on a reliable connection (RC) protocol. However, due to the limited storage space of NICs, this approach limits the number of compute nodes in a computer cluster, resulting in a smaller cluster size. For another example, a compute node can communicate with another compute node using an unreliable datagram (UD) protocol. While this approach reduces the number of connections and expands the cluster size, it does not guarantee data transmission reliability (such as reordering out-of-order packets and retransmitting lost packets). Implementing these reliability features incurs additional computational overhead. Another example is dynamic connections, which can reduce the number of connections to expand the cluster size. However, this approach requires frequent connection creation and destruction, resulting in high computational overhead and communication latency.
[0004] Summary of the Invention
[0005] The present application provides a data processing method, a network card, a computer device, and a computer cluster, which can reduce computing overhead and communication delay while expanding the scale of the computer cluster.
[0006] In a first aspect, the present application provides a data processing method, the method comprising: applying to a computer cluster, the computer cluster comprising multiple computing nodes, the multiple computing nodes communicating based on RDMA, the multiple computing nodes including a first computing node, the processor of the first computing node executing the method, the method comprising: dividing the multiple computing nodes into a first group and a second group, the first group and the second group each containing at least two computing nodes; establishing a fully connected correspondence between processes on the computing nodes within the first group, and a correspondence between processes belonging to the same application on the computing nodes between the first group and the second group. Based on the above correspondence, the correspondence between the first process and the second process can be determined, and then the network card processes the data according to this correspondence.
[0007] By grouping multiple computing nodes, there is a correspondence between the processes running on the computing nodes within the group and between the processes belonging to the same application running on the computing nodes between groups. Compared with the fully connected correspondence between the processes running on different computing nodes (the multiple processes running on the source computing node correspond one to one with the multiple processes running on the destination computing node), this application can reduce the number of connections to expand the scale of the computer cluster. Based on the correspondence between the first process and the second process, the first process and the second process can communicate directly, which can reduce computing overhead and communication delay compared to dynamically creating and destroying the connection relationship between processes.
[0008] In a possible implementation, dividing multiple computing nodes of a computer cluster into a first group and a second group includes dividing the multiple computing nodes into the first group and the second group based on a communication delay between any two computing nodes among the multiple computing nodes.
[0009] Communication latency can be the time it takes for data to be transmitted from a source compute node to a destination compute node. The communication latency between different compute nodes varies. By grouping multiple compute nodes based on their communication latency, at least two compute nodes with low communication latency can be grouped together to reduce communication latency between compute nodes.
[0010] In another possible implementation, after establishing a fully connected correspondence between processes on computing nodes within the first group and a correspondence between processes belonging to the same application on computing nodes between the first group and the second group, the method further includes: the network card of the first computing node obtains data communicated between the first process and the second process; the network card of the first computing node processes the data according to the correspondence between the first process and the second process.
[0011] After the processor completes the grouping of computing nodes and the establishment of connections between processes, since multiple computing nodes are based on RDMA communication, the network card of the first computing node can process the acquired data according to the correspondence between the first process and the second process. This data processing process does not require the participation of the processor, reducing the processor's computing overhead.
[0012] In another possible implementation, the first computing node runs a third process, the second computing node runs the second process, and the third computing node runs the first process, and the third computing node and the second computing node belong to different groups; obtaining data communicated between the first process and the second process includes: receiving data sent by the third computing node; processing the data according to the correspondence between the first process and the second process, including: the identifier of the first process belonging to different applications on the computing nodes between groups is different from the identifier of the second process, storing the data in the third process, and sending the data to the second computing node.
[0013] When the third compute node (source compute node) and the second compute node (destination compute node) belong to different groups, the identifiers of the first process and the second process belonging to different applications on the inter-group compute nodes are different. Therefore, the first and second processes cannot communicate. Communication requires the help of a third process running on the first compute node, with the correspondence between the first and second processes being mediated by the third process. In this case, the first compute node acts as a forwarding compute node, storing data received from the third compute node in the third process before forwarding it to the second compute node. This third process enables communication between the first and second processes, reducing computational overhead and communication latency compared to dynamically creating and destroying connections between processes.
[0014] In another possible implementation, a first computing node runs a first process, a second computing node runs a second process, and the second computing node and the first computing node belong to the same group; obtaining data communicated between the first process and the second process includes: generating data; processing the data according to the correspondence between the first process and the second process, including: storing the data in the first process and sending the data to the second computing node.
[0015] In another possible implementation, a first computing node runs a first process, a second computing node runs a second process, and the second computing node and the first computing node belong to the same group; obtaining data communicated between the first process and the second process includes: receiving data sent by the second computing node; processing the data according to the correspondence between the first process and the second process, including: storing the data in the first process and processing the data obtained from the first process.
[0016] When the second computing node and the first computing node belong to the same group, based on the fully connected correspondence between the processes on the computing nodes in the group (a one-to-one correspondence between the multiple processes running on the first computing node in the group and the multiple processes running on the second computing node in the group), regardless of whether the first process and the second process belong to the same application, that is, regardless of whether the identifier of the first process and the identifier of the second process are the same, the first process and the second process are connected, and the first process and the second process can communicate directly. In this case, when the first computing node acts as the source computing node, it generates data to be sent, stores the data in the first process, and sends the data to the second computing node; when the first computing node acts as the destination computing node, it stores the data received from the second computing node in the first process and directly processes the data in the first process, thereby realizing communication between the first process and the second process. Compared with dynamically creating and destroying the connection relationship between processes, it can reduce computing overhead and communication delay.
[0017] In another possible implementation, the first computing node runs the first process, the second computing node runs the second process, and the second computing node and the first computing node belong to different groups; data is processed according to the correspondence between the first process and the second process, including: the identifier of the first process and the identifier of the second process belonging to the same application on the computing nodes between the groups are the same, the data is stored in the first process, and the data obtained from the first process is processed.
[0018] When the second compute node (the source compute node) and the first compute node (the destination compute node) belong to different groups, and the identifiers of the first process and the second process belonging to the same application on the compute nodes in the two groups are the same, the first and second processes are connected accordingly, and the first and second processes can communicate directly. In this case, the first compute node stores the data received from the second compute node into the first process and directly processes the data in the first process, thereby enabling communication between the first and second processes. Compared to dynamically creating and destroying connections between processes, this can reduce computing overhead and communication latency.
[0019] In a second aspect, the present application provides a network card comprising a processor, a memory, and a communication interface, the memory being used to store the correspondence between a first process and a second process and data communicated between the first process and the second process, the communication interface being used to send and receive data communicated between the first process and the second process, and the processor being used to execute the operational steps of obtaining data communicated between the first process and the second process in the above-mentioned first aspect or a possible implementation of the first aspect; and processing data according to the correspondence between the first process and the second process.
[0020] In a third aspect, the present application provides a computer device comprising a processor, a memory, and a network card, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions as an execution device in the first aspect or a possible implementation of the first aspect, the operating steps of grouping computing nodes and establishing a correspondence between processes in the first aspect or a possible implementation of the first aspect are executed.
[0021] In a fourth aspect, the present application provides a computer cluster, which includes multiple computing nodes, and the multiple computing nodes are divided into a first group and a second group. The first group and the second group each contain at least two computing nodes. There is a fully connected correspondence between the running processes on the computing nodes in the first group, and there is a correspondence between the processes belonging to the same application on the computing nodes between the first group and the second group. The multiple computing nodes include a first computing node, and the processor of the first computing node executes the operating steps of grouping computing nodes and establishing a correspondence between processes in the above-mentioned first aspect or a possible implementation of the first aspect. The network card of the first computing node executes the operating steps of obtaining data communicated between the first process and the second process in the above-mentioned first aspect or a possible implementation of the first aspect; and processing data according to the correspondence between the first process and the second process.
[0022] In a fifth aspect, the present application provides a computer-readable storage medium, comprising: computer software instructions; when the computer software instructions are executed in a computing device, the computer device executes the operating steps of the data processing method in the first aspect or any possible implementation of the first aspect.
[0023] In a sixth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer device to execute the operating steps of the data processing method in the first aspect or any possible implementation of the first aspect.
[0024] The technical effects brought about by any design method in the second to sixth aspects can be referred to the technical effects brought about by the first aspect or different design methods in the first aspect, and will not be repeated here.
[0025] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic diagram of the structure of a computer system provided by the present application;
[0027] FIG2 is a flow chart of a process connection method provided by the present application;
[0028] FIG3 is a schematic diagram of a process for grouping multiple computing nodes according to the lowest RTT result provided by the present application;
[0029] FIG4 is a schematic diagram of a process for grouping multiple computing nodes based on the shortest path provided by the present application;
[0030] FIG5 is a schematic diagram of a correspondence relationship between processes provided by this application;
[0031] FIG6 is a schematic diagram of a data forwarding process provided by the present application;
[0032] FIG7 is a schematic diagram of the structure of a computing device provided in this application. DETAILED DESCRIPTION
[0033] To make the description of the following embodiments clear and concise, the terms involved in this application are first briefly introduced:
[0034] A computer cluster is a group of loosely or tightly connected computer devices working together, typically used to perform large-scale tasks. Clustered computers typically offer higher computing efficiency than a single computer of comparable speed or availability. By running operations in parallel across multiple computers and utilizing multiple computing resources simultaneously to solve problems, the cluster system's computing and processing speeds can be increased, boosting its overall performance. Each computer is connected via a network and runs its own operating system instance.
[0035] Remote direct memory access (RDMA) allows communication between a source compute node and a destination compute node via a network card. The source compute node can directly access the memory of the destination compute node based on the network card. The network card is responsible for packet encapsulation, transmission, and parsing, without the need for processor involvement, which can reduce the processor load. This network communication technology can be applied to the field of high-performance computing.
[0036] Compute nodes in a computer cluster can be equipped with network cards (NICs), which enable network communication between them using RDMA technology. The greater the number of compute nodes in a computer cluster, the greater the number of connections between them. However, due to the limited storage space of network cards, a high number of connections in a fully connected approach limits the number of compute nodes in a computer cluster, resulting in a smaller cluster size. While approaches based on the UD protocol or dynamic connections can reduce the number of connections and thus expand the size of a computer cluster, these approaches can lead to high computational overhead and communication latency.
[0037] In order to solve the problems of high computing overhead and high communication delay while ensuring the scale of the computer cluster by reducing the number of connections, the present application provides a data processing method applied to a computer cluster, wherein the computer cluster includes multiple computing nodes, the multiple computing nodes are based on RDMA communication, the multiple computing nodes include a first computing node, and the processor of the first computing node executes the method, the method comprising: dividing the multiple computing nodes into a first group and a second group, each of the first group and the second group containing at least two computing nodes; establishing a fully connected correspondence between processes on the computing nodes within the first group, and a correspondence between processes belonging to the same application on the computing nodes between the first group and the second group. Based on the above correspondence, the correspondence between the first process and the second process can be determined, and then the network card processes the data according to this correspondence.
[0038] By grouping multiple computing nodes, processes running on computing nodes within a group and processes belonging to the same application running on computing nodes between groups have corresponding relationships. Compared to the fully connected corresponding relationships between processes running on different computing nodes, this application can reduce the number of connections to expand the scale of the computer cluster. Based on the corresponding relationship between the first process and the second process, the first process and the second process can communicate directly, which can reduce computing overhead and communication latency compared to dynamically creating and destroying connection relationships between processes.
[0039] The data processing method provided by this application is described in detail below with reference to the accompanying drawings.
[0040] FIG1 is a schematic diagram of a computer system provided by the present application. As shown in FIG1 , a computer system 100 includes a computer cluster 110 .
[0041] Computer cluster 110 includes multiple computing nodes. For example, as shown in Figure 1, such as computing node 111, computing node 112, computing node 113, computing node 114, computing node 115 and computing node 116. These computing nodes are used to provide computing resources. With respect to a computing node, it can include multiple processors or processor cores, each of which may be a computing resource, so a physical computing node can provide multiple computing resources. Computing nodes 111, computing nodes 112, computing nodes 113, computing nodes 114, computing nodes 115 and computing nodes 116 are interconnected via network 117. Network 117 can be any telecommunications or computer network, including, for example, an intranet, a wide area network (WAN), a local area network (LAN) or the Internet.
[0042] In some embodiments, each computing node in computer cluster 110 may be equipped with a network interface controller (NIC). For example, in FIG1 , computing node 116 is equipped with NIC 216, computing node 115 is equipped with NIC 215, computing node 114 is equipped with NIC 214, computing node 113 is equipped with NIC 213, computing node 112 is equipped with NIC 212, and computing node 111 is equipped with NIC 211. The computing nodes communicate with each other via the NIC. For example, computing node 116 and computing node 115 may establish a connection based on RDMA technology through NIC 216 and NIC 215 to achieve communication. NIC 216 and computing node 116 may communicate with each other via a parallel transmission method using an input / output (I / O) bus on the motherboard.
[0043] Exemplarily, the network card 216 equipped with the computing node 116 may include a processor, a memory, and a communication interface. In the present application, the processor of the network card is used to obtain data communicated between the first process and the second process; and process the data based on the correspondence between the first process and the second process. For the specific implementation process, please refer to the description in the subsequent method steps. The memory can be used to store the correspondence between the first process and the second process, the data communicated between the first process and the second process stored in the send queue, receive queue, and forwarding queue of each process, and to send and receive data communicated between the first process and the second process via the communication interface.
[0044] Any computing node in computer cluster 110 can control the execution of node grouping and process connection, coordinate the batch execution of tasks, control the execution order of tasks, and prevent network congestion from causing inaccurate node grouping results or process connection results. For example, computing node 116 divides computing node 116, computing node 115, and computing node 114 into a first group based on the communication delay result, and divides computing node 113, computing node 112, and computing node 111 into a second group, establishes a fully connected correspondence between the processes running on computing nodes within the group, and establishes a correspondence between processes belonging to the same application on computing nodes between groups. For the specific implementation process, please refer to the description in the subsequent method steps.
[0045] Next, the data processing method provided in this application is described in detail with reference to FIG. 2 to FIG. 7 .
[0046] In some embodiments, before the first computing node processes the data communicated between the first process and the second process based on the correspondence between the first process and the second process, it is necessary to first establish the correspondence between the first process and the second process. The correspondence can be stored in the memory of the network card of the first computing node so that the correspondence between the first process and the second process can be queried from the memory when the first computing node processes the data. Figure 2 is a flow chart of a data processing method provided by the present application. As shown in Figure 2, the data processing method may include the following steps.
[0047] Step 210: Divide the plurality of computing nodes of the computer cluster into a first group and a second group.
[0048] A computer cluster includes multiple computing nodes that communicate based on RDMA. The first computing node can be any one of the multiple computing nodes. A processor of the first computing node can group the multiple computing nodes into at least two groups, each group including at least two different computing nodes. For ease of illustration, the first group and the second group are used as examples of the at least two groups.
[0049] In some embodiments, the processor of the first computing node may group the plurality of computing nodes into a first group and a second group based on a communication delay between any two computing nodes. Communication between different computing nodes may have a communication delay, and the communication delay between any two computing nodes may be different. The processor of the first computing node may group the plurality of computing nodes based on the communication delay between any two computing nodes, and group at least two computing nodes with low communication delay into the same group.
[0050] In one possible implementation, the first computing node may obtain a round-trip time (RTT) result between any two computing nodes. The RTT may represent the total time taken for a sending computing node, one of the two computing nodes, to send data and receive a data receipt confirmation from the receiving computing node. The first computing node may group the plurality of computing nodes based on the RTT result between the two computing nodes. For example, the first computing node may group at least two computing nodes with the lowest RTT results into the same group.
[0051] Figure 3 is a schematic diagram of a process for grouping multiple computing nodes based on the lowest RTT result provided by the present application. As shown in (a) in Figure 3, nc represents the total number of computing nodes, and the value range of nc can be between 100-200. The nc computing nodes are numbered according to 0, 1, 2...nc-1, and the computing nodes can be connected and communicated based on the UD protocol. The first computing node can be node 0, and a controller can be run in node 0 to coordinate the batch execution of the detection RTT task, control the execution order of the detection RTT task, and prevent network congestion from causing inaccurate RTT results.
[0052] As shown in Figure 3(b), N compute nodes (such as nodes 0 and 2) are randomly selected from the nc compute nodes. Each compute node sends an RTT detection task request to all other compute nodes to obtain the RTT result with any of the remaining compute nodes. The first compute node can obtain the RTT result between any two compute nodes.
[0053] As shown in (c) of Figure 3, the two computing nodes with the lowest RTT results between any two computing nodes are grouped together (e.g., if the RTT result between node 0 and destination node 1 is the lowest, then node 0 and node 1 are grouped together; if the RTT result between node 2 and destination node nc-1 is the lowest, then node 2 and node nc-1 are grouped together). When a grouping conflict occurs, the computing nodes with smaller numbers can be grouped together (e.g., if the RTT results between node 0 and destination node 1 and between node 0 and destination node 2 are the same, then node 0 and destination node 1 are grouped together).
[0054] As shown in (d) of Figure 3, after completing the grouping based on the lowest RTT result, the first compute node can obtain the grouping results of the compute nodes that have completed the grouping (for example, node 2 sends the grouping result of itself and node nc-1 to node 0) and broadcast the grouping results to all other compute nodes. The compute nodes that have not completed the grouping repeat the above grouping process based on the lowest RTT result until all compute nodes have completed the grouping.
[0055] In another possible implementation, the first computing node may group the plurality of computing nodes based on the communication path between any two computing nodes. For example, the first computing node may obtain a traceroute result between any two computing nodes. The traceroute may represent the path through which the two computing nodes are connected through switches in the network topology of the computer cluster. The number of switches passed through is typically represented by the number of hops. The smaller the hop count, the shorter the path, and the lower the communication delay between the two computing nodes. The first computing node may group the plurality of computing nodes based on the path result between any two computing nodes. For example, at least two computing nodes with the shortest path are grouped into the same group.
[0056] Figure 4 is a schematic diagram of a process for grouping multiple computing nodes based on the shortest path, as provided in this application. As shown in Figure 4 (a), nc represents the total number of computing nodes, and the value of nc can range from 100 to 200. nc computing nodes are numbered 0, 1, 2, ... nc-1, and computing nodes can communicate with each other based on the UD protocol.
[0057] As shown in Figure 4(b), each compute node sends a traceroute task request to all other compute nodes to obtain the hop count result from any of the remaining compute nodes. The first compute node can obtain the hop count result between any two compute nodes.
[0058] Since the smaller the hop count result, the shorter the path between two computing nodes. As shown in (c) in Figure 4, the two computing nodes with the smallest hop count results between any two computing nodes are grouped together (e.g., if the hop count result between node 0 and destination node 1 is the smallest, then nodes 0 and 1 are grouped together; if the hop count result between node 2 and destination node nc-1 is the smallest, then nodes 2 and nc-1 are grouped together). When a grouping conflict occurs, the computing nodes with smaller numbers can be grouped together (e.g., if the hop count results between node 0 and destination node 1 and between node 0 and destination node 2 are the same, then node 0 and destination node 1 are grouped together).
[0059] As shown in (d) in Figure 4, after completing the grouping based on the minimum hop count result, the first computing node can obtain the grouping results of any two computing nodes (for example, node 2 sends the grouping result of itself and node nc-1 as the same group to node 0) and broadcast the grouping results to all other computing nodes.
[0060] Step 220: Establish a fully connected correspondence between processes on computing nodes within the first group, and a correspondence between processes belonging to the same application on computing nodes between the first group and the second group.
[0061] After dividing multiple computing nodes into a first group and a second group based on the results of communication delay, based on the fact that multiple processes can be run on each computing node, the first computing node needs to establish a correspondence between the running processes on the computing nodes within each group, as well as a correspondence between the running processes belonging to the same application on the computing nodes between the first group and the second group.
[0062] In some embodiments, the first computing node can establish a fully connected correspondence between processes running on computing nodes within each group, where the computing nodes within the group include a first computing node and a second computing node. The fully connected correspondence can be a one-to-one correspondence between multiple processes running on the first computing node within the group and multiple processes running on the second computing node within the group. Exemplarily, the multiple processes running on the first computing node and the second computing node are numbered, and the process numbers can serve as process identifiers, which can be used to uniquely identify the processes. The process identifiers of the multiple processes running on the first computing node and the second computing node can be 0 to n. The fully connected correspondence between the multiple processes running on the first computing node and the multiple processes running on the second computing node can be a one-to-one correspondence between process number 0 running on the first computing node and processes numbered 0 to n running on the second computing node, a one-to-one correspondence between process number 1 running on the first computing node and processes numbered 0 to n running on the second computing node, and so on...process number n running on the first computing node and processes numbered 0 to n running on the second computing node can be a one-to-one correspondence.
[0063] The first computing node can also establish a correspondence between processes belonging to the same application on the computing nodes between the first group and the second group, and the identifier of the first process and the identifier of the second process belonging to the same application on the computing nodes between the groups are the same. Exemplarily, the computing nodes between the groups include the first computing node and the second computing node, that is, the first computing node and the second computing node belong to different groups, and the process identifiers of the multiple processes running on the first computing node and the second computing node can be 0 to n. The process identifiers belonging to the same application on the first computing node and the second computing node between the groups are the same, and the correspondence between processes with the same identifier can be that process No. 0 running on the first computing node corresponds to process No. 0 running on the second computing node, process No. 1 running on the first computing node corresponds to process No. 1 running on the second computing node, and so on...process No. n running on the first computing node corresponds to process No. n running on the second computing node.
[0064] The following is a diagram of the corresponding relationship between the above processes with reference to the accompanying drawings. Figure 5 is a schematic diagram of the corresponding relationship between processes provided by the present application. As shown in Figure 5, group0 (represented by g0 in the figure), group1 (represented by g1 in the figure) and group2 (represented by g2 in the figure) are different groups. The processes running on the computing nodes in each group are fully connected. For example, any process running on a computing node in group0 is connected one-to-one with processes 0 to n-1 running on another computing node in group0. The processes belonging to the same application on the computing nodes between at least two groups are connected, for example, process No. 0 running on a computing node in group0 is connected to process No. 0 running on a computing node in group1, process No. 0 running on a computing node in group0 is connected to process No. 0 running on a computing node in group2, and process No. 0 running on a computing node in group1 is connected to process No. 0 running on a computing node in group2.
[0065] It should be noted that if process n running on a compute node in group2 connects to process n-1 running on a compute node in group1, process n in group2 must first connect to process n-1 within the group, and then process n-1 in group2 must connect to process n-1 in group1. Alternatively, if processes 0-n are running on a compute node in group1, process n in group2 must first connect to process n in group1, and then process n in group1 must connect to process n-1 within the group.
[0066] Optionally, after the plurality of computing nodes are grouped and the corresponding relationships between the processes are established, the network card of the first computing node can process the data communicated between the first process and the second process based on the corresponding relationship between the first process and the second process. The specific implementation method is described in the following steps 230 to 240.
[0067] Step 230: Acquire data communicated between the first process and the second process.
[0068] The network card of the first computing node can obtain a message transmitting data between the source computing node and the destination computing node. The message includes data communicated between the first process and the second process, an identifier of the first process, an identifier of the second process, a source address of the network card of the source computing node, and a destination address (e.g., IP address) of the network card of the destination computing node. The first process can be a process running on the source computing node, the second process can be a process running on the destination computing node, the source address of the network card can represent the address of the network card of the sending end, and the destination address of the network card can represent the address of the network card of the receiving end.
[0069] In some embodiments, before processing data according to the correspondence between the first process and the second process, the first computing node can determine the correspondence between the first process and the second process based on the address of the network card of the computing node to which the first process and the second process belong, and the identifiers of the first process and the second process.
[0070] Based on the completion of the grouping of computing nodes in the method described in step 210 above, the first computing node queries the computing node grouping result stored in the memory on its network card based on the addresses of the network cards of the computing nodes to which the first and second processes belong, thereby first determining whether the source computing node to which the first process belongs and the destination computing node to which the second process belongs belong to the same group or different groups. Based on the completion of the establishment of the corresponding relationship between processes in the method described in step 220 above, the first computing node queries the corresponding relationship between processes stored in the memory on its network card based on the identifiers of the first and second processes, thereby further determining the corresponding relationship between the first and second processes belonging to the same group or different groups.
[0071] Step 240: Process the data according to the corresponding relationship between the first process and the second process.
[0072] Since the source compute node to which the first process belongs and the destination compute node to which the second process belongs can belong to the same group or different groups, and the first and second processes can belong to the same application or different applications, that is, the identifier of the first process and the identifier of the second process can be the same or different, there is a fully connected correspondence between processes running on compute nodes within a group, and there is a correspondence between processes belonging to the same application on compute nodes between groups. Therefore, the first compute node processes data differently depending on the different correspondences between the first and second processes, specifically including the three methods exemplified below.
[0073] Mode 1: The first computing node and the second computing node belong to the same group, and process data according to the fully connected correspondence between the first process and the second process.
[0074] A first computing node can run a first process, and a second computing node can run a second process. When the first computing node and the second computing node belong to the same group, since the processes running on the computing nodes in the group have a fully connected correspondence, the first process and the second process can communicate based on the fully connected correspondence regardless of whether they belong to the same application, that is, regardless of whether the identifiers of the first process and the second process are the same.
[0075] In some embodiments, a first computing node may serve as a source computing node, and a second computing node may serve as a destination computing node. The first computing node may generate data for communication between a first process and a second process, and process the data according to a fully connected correspondence between the first process and the second process, such as storing the data in a send queue of the first process and sending the data to the second computing node, thereby storing the data in a receive queue of the second process.
[0076] In other embodiments, the second computing node may serve as a source computing node, and the first computing node may serve as a destination computing node. The first computing node may receive data sent by the second computing node for communication between the first process and the second process, and process the data according to a fully connected correspondence between the first process and the second process, such as storing the data in a receive queue of the first process, processing the data obtained from the receive queue, and storing the data in a completion queue of the first process after processing is complete.
[0077] Mode 2: The first computing node and the second computing node belong to different groups, the first process and the second process belong to the same application, and data is processed according to the correspondence between processes with the same identifier.
[0078] The first computing node can run a first process, and the second computing node can run a second process. When the first computing node and the second computing node belong to different groups, since there is a correspondence between processes belonging to the same application on the computing nodes in the two groups, and the identifier of the first process and the identifier of the second process belonging to the same application are the same, the first process and the second process can communicate based on the correspondence between processes with the same identifier when the identifier of the first process and the identifier of the second process are the same.
[0079] In some embodiments, a first computing node may serve as a source computing node, and a second computing node may serve as a destination computing node. The first computing node may generate data for communication between a first process and a second process. When the identifier of the first process and the identifier of the second process are the same, the data may be processed according to a correspondence between processes with the same identifier, such as storing the data in a send queue of the first process and sending the data to the second computing node, thereby storing the data in a receive queue of the second process.
[0080] In other embodiments, the second computing node may serve as a source computing node, and the first computing node may serve as a destination computing node. The first computing node may receive data sent by the second computing node for communication between the first process and the second process. When the identifier of the first process and the identifier of the second process are the same, the first computing node may process the data according to the correspondence between processes with the same identifier, which may include storing the data in a receive queue of the first process, processing the data obtained from the receive queue, and storing the data in a completion queue of the first process after processing is complete.
[0081] Mode 3: The third computing node and the second computing node belong to different groups, the first process and the second process belong to different applications, and data is processed according to the forwarding correspondence between processes with different identifiers.
[0082] The third computing node can run the first process, and the second computing node can run the second process. When the third computing node and the second computing node belong to different groups, there is a correspondence between processes belonging to the same application on the computing nodes in the two groups. However, there is no correspondence between processes belonging to different applications on the computing nodes in the two groups. Therefore, if the first process and the second process belong to different applications, and the identifiers of the first process and the second process belonging to different applications are different, the first process and the second process cannot communicate directly. Instead, the first computing node needs to act as a forwarding computing node, and the third process running on the first computing node needs to act as a forwarding process to enable communication between the first process and the second process.
[0083] In some embodiments, the third computing node can serve as a source computing node, and the second computing node can serve as a destination computing node. The first computing node can receive data sent by the third computing node for communication between the first process and the second process. When the identifier of the first process and the identifier of the second process are different, the data can be processed according to the forwarding correspondence between the processes with different identifiers, such as storing the data in a forwarding queue of the third process and sending the data to the second computing node, so that the data is stored in a receiving queue of the second process.
[0084] In other embodiments, the second computing node may serve as a source computing node, and the third computing node may serve as a destination computing node. The first computing node may receive data sent by the second computing node for communication between the first process and the second process. When the identifier of the first process and the identifier of the second process are different, the data may be processed according to a forwarding correspondence between processes with different identifiers, such as storing the data in a forwarding queue of the third process and sending the data to the third computing node, thereby storing the data in a receiving queue of the first process.
[0085] In the embodiment described in the above method 3, the third computing node and the second computing node belong to different groups. The first computing node, as a forwarding computing node, may belong to the same group as the third computing node or the second computing node.
[0086] In one possible implementation, when a first computing node and a third computing node belong to the same group, with the third computing node as the source computing node and the second computing node as the destination computing node, the first computing node running the third process, the second computing node running the second process, and the third computing node running the first process, for example, the first computing node can receive data sent by the third computing node for communication between the first and second processes. Because there is a fully connected correspondence between the processes running on the computing nodes within the group, the first computing node can process the data based on the fully connected correspondence between the first and third processes and store the data in the forwarding queue of the third process. Because there is a correspondence between the processes belonging to the same application on the computing nodes between the groups, the second and third processes belong to the same application and have the same identifier. Based on the correspondence between processes with the same identifier, the first computing node can send data to the second computing node and store the data in the receive queue of the second process. The second computing node processes the data received from the receive queue and, after processing, stores the data in the completion queue of the second process.
[0087] In another possible implementation, when a first computing node and a second computing node belong to the same group, with a third computing node as the source computing node and the second computing node as the destination computing node, the first computing node running the third process, the second computing node running the second process, and the third computing node running the first process, for example, the first computing node can receive data sent by the third computing node for communication between the first and second processes. Since processes belonging to the same application on computing nodes in different groups have a corresponding relationship, and the first and third processes belong to the same application and have the same identifier, the first computing node can process the data based on the corresponding relationship between processes with the same identifier and store the data in the forwarding queue of the third process. Since processes running on computing nodes within the group have a fully connected relationship, the first computing node can process the data based on the fully connected relationship between the second and third processes and send the data to the second computing node, storing the data in the receive queue of the second process. The second computing node processes the data received from the receive queue and, upon completion, stores the data in the completion queue of the second process.
[0088] The following describes the process of realizing communication between processes with the help of forwarding queues with the help of the accompanying drawings. Figure 6 is a schematic diagram of a data forwarding process provided by the present application. As shown in Figure 6, a forwarding channel needs to be established between the source computing node and the forwarding computing node. The forwarding computing node can create an RDMA memory registration (memory registration, MR) specifically for forwarding. The RDMA MR is used to store the data to be forwarded, and the RDMA buffer (buffer) address can be the registered MR address. The process running on the forwarding computing node can pre-store the received work queue event (work queue event, WQE) in the forwarding queue (forwarding queue, FQ), and can also pre-store the waiting WQE and the sending WQE in the sending queue (send queue, SQ).
[0089] As shown in Figure 6 (a), the source NIC on the source compute node sends the send WQE in the process forwarding queue to the receive WQE in the process forwarding queue of the forwarding NIC on the forwarding compute node. As shown in Figure 6 (b), the forwarding NIC on the forwarding compute node processes the receive WQE and stores the data to be forwarded in the RDMA buffer. After generating a completion queue event (CQE), it triggers a wait in the process send queue, thereby activating subsequent send WQEs. As shown in Figure 6 (c), the forwarding NIC on the forwarding compute node obtains the data to be forwarded in the RDMA buffer and sends the send WQE in the process send queue to the process receive queue of the destination NIC on the destination node.
[0090] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. It is understandable that in order to implement the above functions, the computer device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0091] The data processing method provided in accordance with the embodiment of the present application is described in detail above in conjunction with Figures 2 to 6 . The computing device for implementing the data processing method provided in accordance with the embodiment of the present application will be described below in conjunction with Figure 7 .
[0092] FIG7 is a schematic diagram of the structure of a computing device provided in this embodiment. As shown in FIG7 , computing device 700 includes a processor 710, a bus 720, a memory 730, a memory unit 750 (also referred to as a main memory unit), a network card 760, and a communication interface 740. Processor 710, memory 730, memory unit 750, network card 760, and communication interface 740 are connected via bus 720.
[0093] It should be understood that in this embodiment, the processor 710 may be a CPU, but may also be other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0094] The communication interface 740 is used to implement communication between the computing device 700 and an external device or component. In this embodiment, the communication interface 740 can be used to exchange data with other computing devices.
[0095] Bus 720 may include a path for transmitting information between the aforementioned components (e.g., processor 710, memory unit 750, and storage 730). In addition to a data bus, bus 720 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 720 in the figure. Bus 720 may be a Peripheral Component Interconnect Express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc.
[0096] As an example, the computing device 700 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions). The processor 710 can implement the functions of grouping computing nodes and establishing correspondences between processes. For example, the processor 710 is used to execute the division of multiple computing nodes of a computer cluster into a first group and a second group, each of the first group and the second group containing at least two computing nodes; establish a fully connected correspondence between processes on the computing nodes within the first group, and a correspondence between processes belonging to the same application on the computing nodes between the first group and the second group.
[0097] It is worth noting that FIG7 only takes the computing device 700 including one processor 710 and one memory 730 as an example. Here, the processor 710 and the memory 730 are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to business requirements.
[0098] The network card 760 may include a processor and a memory. The memory of the network card 760 may be a persistent memory (PM), a non-volatile random access memory (NVRAM), or a phase change memory (PCM), etc. The memory is used to store data communicated between the first process and the second process. The network card 760 can implement data processing functions. For example, the processor of the network card 760 is used to execute the acquisition of data communicated between the first process and the second process; the processor of the network card 760 can access the correspondence between the processes stored in the memory unit 750, and process the data communicated between the first process and the second process according to the correspondence between the first process and the second process.
[0099] The memory unit 750 may correspond to the method embodiment described above and used to store the grouping results of the computing nodes and the corresponding relationship between the processes. The memory unit 750 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0100] The memory 730 is used to store computer instructions, grouping results of computing nodes, and correspondences between processes, etc., and can be a solid-state drive or a mechanical hard drive.
[0101] It should be understood that the computing device 700 according to this embodiment can execute the corresponding subjects in Figure 2 to implement the corresponding processes in Figure 2. For the sake of brevity, it will not be repeated here.
[0102] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a computer device. Of course, the processor and storage medium can also exist as discrete components in a network device or a terminal device.
[0103] This application also provides a chip system, which includes a processor for implementing the functions of grouping computing nodes and establishing a correspondence between processes in the above method. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip alone or include a chip and other discrete components.
[0104] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD).
[0105] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A data processing method, characterized in that: Applied to a computer cluster, the computer cluster includes a plurality of computing nodes, the plurality of computing nodes communicate based on remote direct memory access (RDMA), the plurality of computing nodes include a first computing node, a processor of the first computing node executes the method, the method includes: Dividing the plurality of computing nodes of the computer cluster into a first group and a second group, wherein the first group includes at least two computing nodes and the second group includes at least two computing nodes; A fully connected correspondence relationship between processes on computing nodes within the first group, and a correspondence relationship between processes belonging to the same application on computing nodes between the first group and the second group are established.
2. The method according to claim 1, characterized in that Dividing the plurality of computing nodes of the computer cluster into a first group and a second group comprises: The plurality of computing nodes are divided into a first group and a second group according to a communication delay between any two computing nodes among the plurality of computing nodes.
3. The method according to claim 1 or 2, characterized in that: After establishing a fully connected correspondence between processes on computing nodes within the first group and a correspondence between processes belonging to the same application on computing nodes between the first group and the second group, the method further includes: The network card of the first computing node obtains data communicated between the first process and the second process; The network card of the first computing node processes the data according to the corresponding relationship between the first process and the second process.
4. The method according to claim 3, characterized in that The first computing node runs a third process, the second computing node runs the second process, the third computing node runs the first process, and the third computing node and the second computing node belong to different groups; The obtaining of data communicated between the first process and the second process includes: Receiving the data sent by the third computing node; The processing of the data according to the correspondence between the first process and the second process includes: The identifiers of the first process and the second process belonging to different applications on the inter-group computing node are different, the data is stored in the third process, and the data is sent to the second computing node.
5. The method according to claim 3, characterized in that: The first computing node runs the first process, the second computing node runs the second process, and the second computing node and the first computing node belong to the same group; The obtaining of data communicated between the first process and the second process includes: generating the data; The processing of the data according to the correspondence between the first process and the second process includes: The data is stored in the first process, and the data is sent to the second computing node.
6. The method according to claim 3, characterized in that The first computing node runs the first process, the second computing node runs the second process, and the second computing node and the first computing node belong to the same group; The obtaining of data communicated between the first process and the second process includes: receiving the data sent by the second computing node; The processing of the data according to the correspondence between the first process and the second process includes: The data is stored in the first process, and the data obtained from the first process is processed.
7. The method according to claim 3, characterized in that The first computing node runs the first process, the second computing node runs the second process, and the second computing node and the first computing node belong to different groups; The processing of the data according to the correspondence between the first process and the second process includes: The identifier of the first process and the identifier of the second process belonging to the same application on the inter-group computing node are the same, the data is stored in the first process, and the data obtained from the first process is processed.
8. A network card, characterized in that: The invention comprises a processor, a memory and a communication interface, wherein the memory is used to store the correspondence between the first process and the second process and the data communicated between the first process and the second process, the communication interface is used to send and receive the data communicated between the first process and the second process, and the processor is used to execute the operation steps of obtaining the data communicated between the first process and the second process; and processing the data according to the correspondence between the first process and the second process.
9. A computer device, characterized in that: The method comprises a processor, a memory and a network card as claimed in claim 8, wherein the processor is used to divide a plurality of computing nodes of a computer cluster into a first group and a second group, wherein the first group includes at least two computing nodes and the second group includes at least two computing nodes; The method steps of establishing a fully connected correspondence between processes on computing nodes within the first group, and a correspondence between processes belonging to the same application on computing nodes between the first group and the second group, wherein the network card is used to execute acquisition of data communicated between the first process and the second process; The operating steps of the method for processing the data according to the corresponding relationship between the first process and the second process.
10. A computer cluster, characterized in that: The method comprises a plurality of computing nodes, wherein the plurality of computing nodes are divided into a first group and a second group, wherein the first group contains at least two computing nodes, and the second group contains at least two computing nodes, wherein processes on computing nodes within the first group have a fully connected correspondence relationship, and processes belonging to the same application on computing nodes between the first group and the second group have a correspondence relationship, wherein the plurality of computing nodes include a first computing node, wherein a processor of the first computing node is used to execute the operation steps of the method for grouping computing nodes and establishing a correspondence relationship between processes, and wherein a network card of the first computing node is used to execute the acquisition of data communicated between the first process and the second process; The operating steps of the method for processing the data according to the corresponding relationship between the first process and the second process.
Citation Information
Patent Citations
Data processing method, network card, computer equipment and computer cluster
CN119903013A
Multi-layer dragonfly interconnecting network and self-adaptive routing method
CN104079490A
Storage device, storage device array and network adapter
CN106020731A
Distributed storage system, data migration method and storage device
CN115495433A
Low latency RDMA-based distributed storage
US20170149890A1