Data processing method, network card, computer equipment and computer cluster
By grouping computing nodes in computer clusters and establishing process correspondence, the problems of small scale of computer clusters, large computing overhead and communication delay are solved, and efficient data processing and communication are achieved.
Patent Information
- Application Number
- CN202311411791.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
Due to the limited storage space of network card in computer clusters, the use of full connection method will lead to a small scale of the computer cluster. Although it can be expanded based on UD protocol or dynamic connection method, it will lead to large computing overhead and communication delay problems.
By dividing multiple computing nodes into different packets, a correspondence relationship between intra-group and inter-group processes is established, and data is processed based on these relationships is used by the network card, thereby reducing the number of connections and improving communication efficiency.
It realizes that while expanding the scale of the computer cluster, it reduces computing overhead and communication delays, and improves the performance and efficiency of the system.
Smart Images

Figure CN119903013A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] At present, computing nodes in a computer cluster can be equipped with network cards, and computing nodes can establish connections through network cards based on remote direct memory access (RDMA) technology to achieve communication. Usually, computing nodes can establish connections based on a reliable connection (RC) protocol using a full connection method. However, since the storage space of the network card is limited, the full connection method will limit the number of computing nodes set in the computer cluster, resulting in a small scale of the computer cluster. For another example, a computing node communicates with another computing node based on an unreliable datagram (UD) protocol. Although this method expands the scale of the computer cluster by reducing the number of connections, since the UD protocol cannot guarantee the reliability of data transmission (such as reordering of out-of-order messages and retransmission of lost packets, etc.), if these reliability functions are implemented, additional computing overhead is required. For another example, the number of connections can be reduced through dynamic connection to expand the scale of the computer cluster. However, this method requires frequent creation and destruction of connections, which will lead to problems such as high computing overhead and high communication delay. Summary of the invention
[0003] 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.
[0004] In the first aspect, the present application provides a data processing method, the method comprising: applying to a computer cluster, the computer cluster comprising a plurality of computing nodes, the plurality of computing nodes communicating based on RDMA, the plurality of computing nodes comprising a first computing node, the processor of the first computing node executing the method, the method comprising: dividing the plurality of computing nodes into a first group and a second group, the first group and the second group both comprising at least two computing nodes; 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. 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 the correspondence.
[0005] By grouping multiple computing nodes, there is a corresponding relationship 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 corresponding relationship between the processes running on different computing nodes (one-to-one correspondence between the multiple processes running on the source computing node and the multiple processes running on the destination computing node), the present 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 the computing overhead and communication delay compared to dynamically creating and destroying the connection relationship between the processes.
[0006] In a possible implementation, dividing a plurality of computing nodes of a computer cluster into a first group and a second group includes dividing the plurality of computing nodes into the first group and the second group according to a communication delay between any two computing nodes among the plurality of computing nodes.
[0007] Communication delay can be the time it takes for data to be transmitted from a source computing node to a destination computing node. The communication delays between different computing nodes are different. By grouping multiple computing nodes based on the results of the communication delays, at least two computing nodes with low communication delays can be grouped into the same group, thereby reducing the communication delay between computing nodes.
[0008] 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.
[0009] After the processor completes the computing node grouping and process establishment connection, since the 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 computing overhead of the processor.
[0010] 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 the 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.
[0011] When the third computing node (source computing node) and the second computing node (destination computing node) belong to different groups, the identifiers of the first process and the second process belonging to different applications on the computing nodes between the groups are different, and the first process and the second process cannot communicate. To achieve communication, the third process running on the first computing node is required, and the correspondence between the first process and the second process is connected through the third process as an intermediary. In this case, the first computing node acts as a forwarding computing node, and first stores the data received from the third computing node into the third process, and then forwards the data to the second computing node, thereby achieving communication between the first process and the second process with the help of the third process. Compared with dynamically creating and destroying the connection relationship between processes, it can reduce computing overhead and communication delay.
[0012] In another possible implementation, the first computing node runs a first process, the 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.
[0013] In another possible implementation, the first computing node runs a first process, the 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.
[0014] 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 (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 correspondingly connected, and the first process and the second process can communicate directly. In this case, when the first computing node acts as a 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 a 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 the communication between the first process and the second process, which can reduce computing overhead and communication delay compared to dynamically creating and destroying the connection relationship between processes.
[0015] 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.
[0016] When the second computing node (source computing node) and the first computing node (destination computing node) belong to different groups, 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, and the first process and the second process are connected correspondingly, and the first process and the second process can communicate directly. In this case, the first computing node stores the data sent by the second computing node received into the first process, and directly processes the data in the first process, thereby realizing the communication between the first process and the second process, which can reduce the computing overhead and communication delay compared to dynamically creating and destroying the connection relationship between processes.
[0017] 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 a 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 above-mentioned first aspect or a possible implementation of the first aspect, the operating steps of obtaining data communicated between the first process and the second process; and processing data according to the correspondence between the first process and the second process.
[0018] In a third aspect, the present application provides a computer device, comprising a processor, a memory, and a network card, the memory being 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.
[0019] 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, each of the first group and the second group contains at least two computing nodes, there is a fully connected correspondence between the running processes on the computing nodes in the first group, 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, the processor of the first computing node executes the operation 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, and the network card of the first computing node executes the operation 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 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.
[0021] 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 operation steps of the data processing method in the first aspect or any possible implementation of the first aspect.
[0022] The technical effects brought about by any design method in the second to sixth aspects can refer to the technical effects brought about by the first aspect or different design methods in the first aspect, and will not be repeated here.
[0023] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of the structure of a computer system provided for this application;
[0025] Figure 2 A flowchart of a process connection method provided by this application;
[0026] Figure 3 A schematic diagram of a process for grouping multiple computing nodes according to the minimum RTT result provided by the present application;
[0027] Figure 4 A schematic diagram of a process for grouping multiple computing nodes according to the shortest path provided by the present application;
[0028] Figure 5 A schematic diagram of the corresponding relationship between processes provided for this application;
[0029] Figure 6 A schematic diagram of a data forwarding process provided by this application;
[0030] Figure 7 A schematic diagram of the structure of a computing device provided in this application. DETAILED DESCRIPTION
[0031] In order to make the description of the following embodiments clear and concise, the terms involved in this application are first briefly introduced:
[0032] A computer cluster is a group of loosely or tightly connected computer devices that work together, usually to perform large operations. Clustered computer devices are usually more efficient than single computer devices of comparable speed or availability. By using multiple computer devices to perform parallel operations and using multiple computing resources to solve problems, the computing speed and processing speed of the cluster system can be improved, thereby improving the overall performance of the cluster system. Each computer device is connected to each other through a network, and each computer device runs its own operating system instance.
[0033] Remote direct memory access (RDMA) means that the source computing node and the destination computing node can establish a connection through a network card to achieve communication. The source computing node can directly access the memory of the destination computing node based on the network card. The encapsulation, transmission and parsing of the message are all completed by the network card without the participation of the processor, which can reduce the load of the processor. This network communication technology can be applied to the field of high-performance computing.
[0034] The computing nodes in a computer cluster can be equipped with network cards, and the computing nodes can establish connections through network cards based on RDMA technology to achieve network communication. The more computing nodes there are in a computer cluster, the more connections there are between the computing nodes. However, since the storage space of the network card is limited, a large number of connections using a full connection method will limit the number of computing nodes set in the computer cluster, resulting in a small computer cluster size. Although the UD protocol or dynamic connection method can reduce the number of connections and thus expand the scale of the computer cluster, these methods will lead to problems such as high computing overhead and high communication delay.
[0035] In order to solve the problems of high computing overhead and high communication delay while ensuring the scale of computer clusters by reducing the number of connections, the present application provides a data processing method, which is applied to computer clusters. The computer clusters include 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, which includes: dividing the multiple computing nodes into a first group and a second group, each of the first group and the second group contains at least two computing nodes; establishing a fully connected correspondence between processes on the computing nodes in 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.
[0036] By grouping multiple computing nodes, there is a corresponding relationship 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 corresponding relationship between the processes running on different computing nodes, the present 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 the computing overhead and communication delay compared to dynamically creating and destroying the connection relationship between the processes.
[0037] The data processing method provided by the present application is described in detail below with reference to the accompanying drawings.
[0038] Figure 1 A schematic diagram of a computer system provided in this application. Figure 1 As shown, computer system 100 includes computer cluster 110 .
[0039] The computer cluster 110 includes a plurality of computing nodes. For example, Figure 1 As shown, 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. For a computing node, it can include multiple processors or processor cores, each processor or processing core 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 through network 117. Network 117 can be any telecommunication or computer network, including, for example, an intranet, a wide area network (WAN), a local area network (LAN) or the Internet.
[0040] In some embodiments, each computing node in the computer cluster 110 may be equipped with a network interface controller (NIC), such as Figure 1 Computing node 116 is equipped with network card 216, computing node 115 is equipped with network card 215, computing node 114 is equipped with network card 214, computing node 113 is equipped with network card 213, computing node 112 is equipped with network card 212, and computing node 111 is equipped with network card 211. The computing nodes communicate with each other through the network card. For example, computing node 116 and computing node 115 can establish a connection based on RDMA technology through network card 216 and network card 215 to achieve communication. Network card 216 and computing node 116 can communicate with each other through an input / output (I / O) bus on the motherboard in a parallel transmission mode.
[0041] 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 the data of the communication between the first process and the second process; and process the data according to the corresponding relationship between the first process and the second process. The specific implementation process can refer to the description in the subsequent method steps. The memory can be used to store the corresponding relationship between the first process and the second process, the data of the communication between the first process and the second process stored in the sending queue, receiving queue, and forwarding queue of each process, and send and receive the data of the communication between the first process and the second process through the communication interface.
[0042] Any computing node in the computer cluster 110 can control the execution 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. Exemplarily, computing node 116 divides computing node 116, computing node 115 and computing node 114 into a first group according to the result of communication delay, and divides computing node 113, computing node 112 and computing node 111 into a second group, establishes a fully connected correspondence between running processes on computing nodes within the group, and 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.
[0043] Next, combine Figures 2 to 7 , the data processing method provided in this application is described in detail.
[0044] In some embodiments, before the first computing node processes the data communicated between the first process and the second process according to 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 first computing node can query the correspondence between the first process and the second process from the memory when processing data. Figure 2 A flow chart of a data processing method provided in this application is as follows: Figure 2 As shown, the data processing method may include the following steps.
[0045] Step 210: Divide multiple computing nodes of the computer cluster into a first group and a second group.
[0046] The computer cluster includes multiple computing nodes, the multiple computing nodes communicate based on RDMA, and the first computing node can be any computing node among the multiple computing nodes. The processor of the first computing node can group the multiple computing nodes to obtain at least two groups, each of which contains at least two different computing nodes. For ease of explanation, the first group and the second group are used as examples of at least two groups.
[0047] In some embodiments, the processor of the first computing node can divide the multiple computing nodes into a first group and a second group according to the communication delay between any two computing nodes in the multiple computing nodes. There will be communication delays between different computing nodes, and the communication delays between any two computing nodes are different. The processor of the first computing node can group the multiple computing nodes according to the result of the communication delay between any two computing nodes, and divide at least two computing nodes with low communication delay into the same group.
[0048] In a possible implementation, the first computing node may obtain a round-trip time (RTT) result between any two computing nodes, where RTT may represent the total round-trip time consumed by a sending computing node of the two computing nodes from the start of sending data to the receipt of a confirmation of receipt of data returned from a receiving computing node. The first computing node may group multiple computing nodes according to the RTT result between any two computing nodes, and illustratively, group at least two computing nodes with the lowest RTT result into the same group.
[0049] Figure 3 A schematic diagram of a process for grouping multiple computing nodes according to the minimum RTT result provided by this application. Figure 3As shown in (a), 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 as 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 inaccurate RTT results caused by network congestion.
[0050] like Figure 3 As shown in (b), N computing nodes (such as node 0 and node 2) are randomly selected from nc computing nodes, and each computing node sends a detection RTT task request to all other computing nodes to obtain the RTT result with any computing node among all other computing nodes. The first computing node can obtain the RTT result between any two computing nodes.
[0051] like Figure 3 As shown in (c), the two computing nodes with the lowest RTT results between any two computing nodes are grouped into the same group (e.g., if the RTT result between node 0 and destination node 1 is the lowest, node 0 and node 1 are grouped into the same group; if the RTT result between node 2 and destination node nc-1 is the lowest, node 2 and node nc-1 are grouped into the same group). When grouping conflicts occur, computing nodes with smaller numbers can be grouped into the same group (e.g., if the RTT results between node 0 and destination node 1 and the RTT results between node 0 and destination node 2 are the same, node 0 and destination node 1 are grouped into the same group).
[0052] like Figure 3 As shown in (d) in the figure, after completing the grouping according to the minimum RTT result, the first computing node can obtain the grouping result of the computing node that has completed the grouping (such as node 2 sending the grouping result of itself and node nc-1 as the same group to node 0), and broadcast the grouping result to all other computing nodes. The computing nodes that have not completed the grouping repeat the above grouping process according to the minimum RTT result until all computing nodes have completed the grouping.
[0053] In another possible implementation, the first computing node may group multiple computing nodes according to the communication path between any two computing nodes. Exemplarily, the first computing node may obtain a traceroute result between any two computing nodes. Traceroute may represent the path of two computing nodes connected through switches in the network topology of the computer cluster. The number of switches passed through is usually represented by the number of hops. The smaller the number of hops, the shorter the path and the lower the communication delay between the two computing nodes. The first computing node may group multiple computing nodes according to the path result between any two computing nodes. Exemplarily, at least two computing nodes of the shortest path are grouped into the same group.
[0054] Figure 4 A schematic diagram of a process for grouping multiple computing nodes according to the shortest path provided by this application. Figure 4 As shown in (a), nc represents the total number of computing nodes. The value range of nc can be between 100-200. The nc computing nodes are numbered as 0, 1, 2...nc-1. The computing nodes can be connected and communicated based on the UD protocol.
[0055] like Figure 4 As shown in (b), each computing node sends a traceroute task request to all other computing nodes to obtain the hop count result with any one of the other computing nodes. The first computing node can obtain the hop count result between any two computing nodes.
[0056] Since the hop count is smaller, the path between two computing nodes is shorter. Figure 4 As shown in (c), the two computing nodes with the smallest hop count results between any two computing nodes are grouped into the same group (e.g., if the hop count result between node 0 and destination node 1 is the smallest, node 0 and node 1 are grouped into the same group; if the hop count result between node 2 and destination node nc-1 is the smallest, node 2 and node nc-1 are grouped into the same group). When grouping conflicts occur, the computing nodes with smaller numbers can be grouped into the same group (e.g., if the hop count results between node 0 and destination node 1 and the hop count results between node 0 and destination node 2 are the same, node 0 and destination node 1 are grouped into the same group).
[0057] like Figure 4 As shown in (d), after completing the grouping according to the minimum hop count result, the first computing node can obtain the grouping results of any two computing nodes (such as 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.
[0058] 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.
[0059] After dividing multiple computing nodes into a first group and a second group according to the result 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.
[0060] In some embodiments, the first computing node may establish a fully connected correspondence between processes running on computing nodes in each group, wherein the computing nodes in the group include the first computing node and the second computing node, and the fully connected correspondence may be a one-to-one correspondence between multiple processes running on the first computing node in the group and multiple processes running on the second computing node in the group. Exemplarily, the multiple processes running on the first computing node and the second computing node are numbered, the process number may be used as a process identifier, the process identifier may be used to uniquely indicate the process, and the process identifiers of the multiple processes running on the first computing node and the second computing node may 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 may be a one-to-one correspondence between process No. 0 running on the first computing node and processes No. 0 to n running on the second computing node, a one-to-one correspondence between process No. 1 running on the first computing node and processes No. 0 to n running on the second computing node, and so on..., process No. n running on the first computing node and processes No. 0 to n running on the second computing node correspond one-to-one.
[0061] 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 belonging to the same application on the computing nodes between the groups is the same as the identifier of the second process. 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.
[0062] The corresponding relationship between the above processes will be understood below with reference to the accompanying drawings. Figure 5A schematic diagram of the corresponding relationship between processes provided for this application, such as Figure 5 As shown, group0, group1 and group2 are different groups, and 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 by 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.
[0063] It should be noted that if process n running on a computing node in group2 is connected to process n-1 running on a computing node in group1, process n in group2 needs to be connected to process n-1 in the group first, and then process n-1 in group2 needs to be connected to process n-1 in group1. Alternatively, when processes 0-n are running on a computing node in group1, process n in group2 needs to be connected to process n in group1 first, and then process n in group1 needs to be connected to process n-1 in the group.
[0064] Optionally, after the plurality of computing nodes are grouped and the corresponding relationship between the processes is established, the network card of the first computing node can process the data communicated between the first process and the second process according to the corresponding relationship between the first process and the second process. The specific implementation method is described in the following steps 230 to 240.
[0065] Step 230: Acquire data communicated between the first process and the second process.
[0066] The network card of the first computing node can obtain a message for transmitting data between the source computing node and the destination computing node, wherein the message includes data for communication between the first process and the second process, an identifier of the first process and an identifier of the second process, and a source address of the network card of the source computing node and a destination address (such as an IP address) of the network card of the destination computing node. The first process may be a process running on the source computing node, the second process may be a process running on the destination computing node, the source address of the network card may represent the address of the network card at the sending end, and the destination address of the network card may represent the address of the network card at the receiving end.
[0067] 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.
[0068] Based on the fact that the grouping of computing nodes has been completed in the method described in step 210, the first computing node queries the grouping result of computing nodes stored in the memory on its network card according to the address of the network card of the computing node to which the first process and the second process belong, so as to first determine 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 fact that the corresponding relationship between processes has been established in the method described in step 220, the first computing node queries the corresponding relationship between processes stored in the memory on its network card according to the identifiers of the first process and the second process, so as to then determine the corresponding relationship between the first process and the second process belonging to the same group or different groups.
[0069] Step 240: Process data according to the corresponding relationship between the first process and the second process.
[0070] Since the source computing node to which the first process belongs and the destination computing node to which the second process belongs may belong to the same group or different groups, the first process and the second process may belong to the same application or different applications, that is, the identifier of the first process and the identifier of the second process may be the same or different, there is a fully connected correspondence between the running processes on the computing nodes within the group, and there is a correspondence between the processes belonging to the same application on the computing nodes between the groups. Therefore, the first computing node processes data in different ways according to the different correspondences between the first process and the second process, which may specifically include the following three ways.
[0071] 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 relationship between the first process and the second process.
[0072] The first computing node can run the first process, and the second computing node can run the second process. When the first computing node and the second computing node belong to the same group, since there is a full connection correspondence between the running processes on the computing nodes 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 can communicate based on the full connection correspondence.
[0073] In some embodiments, the first computing node can be used as a source computing node, and the second computing node can be used as a destination computing node. The first computing node can generate data for communication between the first process and the second process, and process the data according to the fully connected correspondence between the first process and the second process, which can be storing the data in the sending queue of the first process, sending the data to the second computing node, so that the data is stored in the receiving queue of the second process.
[0074] In other embodiments, the second computing node can be used as a source computing node, and the first computing node can be used as a destination computing node. The first computing node can receive data sent by the second computing node for communication between the first process and the second process, and process the data according to the fully connected correspondence between the first process and the second process, which can be storing the data in a receiving queue of the first process, processing the data obtained from the receiving queue, and storing the data in a completion queue of the first process after the processing is completed.
[0075] 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.
[0076] The first computing node can run the first process, and the second computing node can run the second process. When the first computing node and the second computing node belong to different groups, since there is a correspondence between the processes belonging to the same application on the computing nodes between the groups, the identifier of the first process and the identifier of the second process belonging to the same application are the same, so when the identifier of the first process and the identifier of the second process are the same, the first process and the second process can communicate based on the correspondence between the processes with the same identifier.
[0077] In some embodiments, the first computing node can be used as a source computing node, and the second computing node can be used as a destination computing node. The first computing node can generate data 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 data can be processed according to the corresponding relationship between the processes with the same identifier, which can be storing the data in the sending queue of the first process, sending the data to the second computing node, and thus storing the data in the receiving queue of the second process.
[0078] In other embodiments, the second computing node can be used as a source computing node, and the first computing node can be used as a destination computing node. The first computing node can receive data sent by the second computing node for communication between the first process and the second process, and when the identifier of the first process and the identifier of the second process are the same, the data can be processed according to the corresponding relationship between processes with the same identifier, which can be storing the data in a receiving queue of the first process, processing the data obtained from the receiving queue, and storing the data in a completion queue of the first process after the processing is completed.
[0079] 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.
[0080] 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 the processes belonging to the same application on the computing nodes between the groups, however, there is no correspondence between the processes belonging to different applications on the computing nodes between the groups. Therefore, when the first process and the second process belong to different applications, and the identifier of the first process and the identifier of the second process belonging to different applications are different, the first process and the second process cannot communicate directly, and need to use the first computing node as a forwarding computing node, and the third process running on the first computing node as a forwarding process to realize the communication between the first process and the second process.
[0081] In some embodiments, the third computing node can be used as a source computing node, and the second computing node can be used 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 is different from the identifier of the second process, the data can be processed according to the forwarding correspondence between processes with different identifiers, which can be storing the data in the forwarding queue of the third process, sending the data to the second computing node, and thus storing the data in the receiving queue of the second process.
[0082] In other embodiments, the second computing node can be used as a source computing node, and the third computing node can be used as a destination computing node. The first computing node can 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 is different from the identifier of the second process, the data can be processed according to the forwarding correspondence between processes with different identifiers, which can be storing the data in the forwarding queue of the third process, sending the data to the third computing node, and thus storing the data in the receiving queue of the first process.
[0083] 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.
[0084] In a possible implementation, when the first computing node and the third computing node belong to the same group, the third computing node is used as the source computing node, the second computing node is used as the destination computing node, the first computing node runs the third process, the second computing node runs the second process, and the third computing node runs the first process. For example, the first computing node can receive data sent by the third computing node for communication between the first process and the second process. Since there is a fully connected correspondence between the running processes on the computing nodes in the group, the data is processed according to the fully connected correspondence between the first process and the third process, and the first computing node can store the data in the forwarding queue of the third process. Since there is a correspondence between the processes belonging to the same application on the computing nodes between the groups, the second process and the third process belong to the same application, and the two have the same identifier, the data is processed according to the correspondence between the processes with the same identifier, and the first computing node can send data to the second computing node and store the data in the receiving queue of the second process. The second computing node processes the data obtained from the receiving queue, and after processing, stores the data in the completion queue of the second process.
[0085] In another possible implementation, when the first computing node and the second computing node belong to the same group, the third computing node is used as the source computing node, the second computing node is used as the destination computing node, the first computing node runs the third process, the second computing node runs the second process, and the third computing node runs the first process. The first computing node can receive data sent by the third computing node for communication between the first process and the second process. Since there is a correspondence between the processes belonging to the same application on the computing nodes between the groups, the first process and the third process belong to the same application, and the two have the same identifier. According to the correspondence between the processes with the same identifier, the first computing node can store the data in the forwarding queue of the third process. Since there is a full connection correspondence between the running processes on the computing nodes within the group, according to the full connection correspondence between the second process and the third process, the data is processed, and the first computing node can send data to the second computing node and store the data in the receiving queue of the second process. The second computing node processes the data obtained from the receiving queue, and after processing, stores the data in the completion queue of the second process.
[0086] The process of achieving inter-process communication with the help of forwarding queues is described below with reference to the accompanying drawings. Figure 6 A schematic diagram of a data forwarding process provided by this application, such as Figure 6As shown, 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 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) into the forwarding queue (forwarding queue, FQ), and can also pre-store the waiting WQE and the sending WQE into the sending queue (sendqueue, SQ).
[0087] like Figure 6 As shown in (a) in FIG, the source network card on the source computing node sends the send WQE in the process forwarding queue to the receive WQE in the process forwarding queue of the forwarding network card on the forwarding computing node. Figure 6 As shown in (b) in the figure, the forwarding network card on the forwarding computing node processes the received WQE and stores the data to be forwarded in the RDMA buffer. After generating a completion queue event (CQE), it triggers the waiting in the process send queue, thereby activating the subsequent send WQE. Figure 6 As shown in (c), the forwarding network card on the forwarding computing 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 network card on the destination node.
[0088] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that in order to achieve 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 realize that, in combination with the algorithm steps of each example described in the embodiment 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 the form of hardware or computer software driving hardware 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 the present application.
[0089] Combined with the above Figures 2 to 6 , describes in detail the data processing method provided according to the embodiment of the present application, and will be combined with Figure 7 , describes a computing device that implements the data processing method provided in an embodiment of the present application.
[0090] Figure 7 A schematic diagram of the structure of a computing device provided in this embodiment. Figure 7As shown, computing device 700 includes processor 710, bus 720, memory 730, memory unit 750 (also referred to as main memory unit), network card 760 and communication interface 740. Processor 710, memory 730, memory unit 750, network card 760 and communication interface 740 are connected via bus 720.
[0091] It should be understood that in this embodiment, the processor 710 may be a CPU, and the processor 710 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.
[0092] 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.
[0093] The bus 720 may include a path for transmitting information between the above components (such as the processor 710, the memory unit 750, and the memory 730). In addition to the data bus, the 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. The bus 720 may be a Peripheral Component Interconnect Express (PCIe) bus, or 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.
[0094] 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 a correspondence 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 which contains at least two computing nodes in the first group and the second group; establish a fully connected correspondence between processes on the computing nodes in 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.
[0095] It is worth mentioning that Figure 7 In the figure, the computing device 700 including one processor 710 and one memory 730 is taken 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.
[0096] 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 the data communicated between the first process and the second process. The network card 760 can implement the function of data processing, for example, the processor of the network card 760 is used to execute the acquisition of the 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.
[0097] The memory unit 750 may correspond to the grouping results of the computing nodes and the corresponding relationship between the processes in the above-mentioned method embodiment. 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 dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0098] The memory 730 is used to store computer instructions, grouping results of computing nodes, and correspondence between processes, etc., and can be a solid-state drive or a mechanical hard disk.
[0099] It should be understood that the computing device 700 according to this embodiment may correspond to executing Figure 2 The corresponding subject in order to achieve Figure 2 For the sake of brevity, the corresponding process in will not be repeated here.
[0100] 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 ROM (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 a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computer device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.
[0101] The present application also provides a chip system, which includes a processor for implementing the functions of grouping computing nodes and establishing corresponding relationships 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, or can include a chip and other discrete devices.
[0102] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part 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 instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may 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 may 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 may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0103] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope 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
Cited By
Data processing method, network card, computer device, and computer cluster
EP4793785A1
Data processing method, network card, computer device, and computer cluster
WO2025086664A1