A method for data processing and related apparatus

By preconfiguring the binding relationship between network card devices and DIE in a computer system with NUMA architecture, the access mechanism between network card devices and DIE is optimized, and the problem of slow communication speed between network card devices and DIE is solved, and more efficient communication and resource utilization is achieved.

CN115996153BActive Publication Date: 2025-08-01HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111216222.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-08-01
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

In computer systems with NUMA architecture, communication speed between network card devices and DIE is slower, especially when accessing remote DIE is longer.

Method used

By preconfiguring the binding relationship between the network card device and the computer system, the network card device is bound to the DIE with a close physical communication distance, and pass the conversation to the bound DIE for execution. Multiple network card devices are used to bind different DIEs to optimize the access mechanism.

Benefits of technology

It improves the communication speed between network card equipment and DIE, improves the utilization efficiency of computing resources and resource management efficiency, especially in multiple DIE systems, which significantly improves performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115996153B_ABST
    Figure CN115996153B_ABST
Patent Text Reader

Abstract

The present application discloses a method and related device for data processing. The method can be applied to a network card device, and the network card device is connected to M dies, where M is an integer greater than 1. The method includes: obtaining a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; determining a target die among the M dies according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target die, and the target die is the N dies with the closest physical communication distance to the network card device among the multiple dies, and N is a positive integer less than M; and transferring the target session to the target die so that the target die executes the target session. In the present application, the network card device will transfer the target session to the die with a relatively close physical communication distance to it for execution, thereby improving the communication speed between the network card device and the die.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a data processing method and related devices. Background Art

[0002] Non-uniform memory access (NUMA) is a multi-processor computer memory architecture in which memory access time depends on the memory's location relative to the processor. A computer system using NUMA typically includes multiple NUMA nodes, each of which consists of multiple dies. Each die node consists of multiple processor cores and memories. The time it takes for different processor cores to access different memories varies. The time required for a processor core in each die to access memory within its own node is shorter than the time it takes to access memory on other dies.

[0003] The aforementioned access mechanism between the processor core and memory is also mapped to the access mechanism between the network card device and the processor core in the computer device. Therefore, the network card device takes the shortest time to access the Die with the closest physical communication distance, while accessing Dies in other NUMA (remote) locations takes the longest time.

[0004] Therefore, a solution to improve the communication speed between the network card device and the DIE is in urgent need of introduction. Summary of the Invention

[0005] The embodiments of the present application provide a data processing method and related apparatus for improving the communication speed between a network card device and a DIE.

[0006] In a first aspect, embodiments of the present application provide a data processing method, which is applied to a network card device, wherein the network card device is connected to M bare chip DIEs in a computer system, where M is an integer greater than 1. First, before the computer system sends or receives a session through the network card device, it is necessary to pre-configure a binding relationship between the network card device and each DIE in the computer system. That is, the network card device is bound to a DIE in the computer system that has a relatively close physical communication distance. After the network card device determines the binding relationship, the session obtained by the network card device is only passed to the bound DIE for execution.

[0007] To better implement the solutions of the embodiments of the present application, a computer system may be configured with multiple network card devices. Each network card device is bound to different DIEs with relatively close physical communication distances, and each network card device can adopt the data processing method of the present application, thereby changing the access mechanism between the network card device and each die. Taking the computer system configured with two network card devices (network card device 1 and network card device 2) as an example, each network card device is bound to a DIE with a relatively close physical communication distance to itself.

[0008] In the embodiments of the present application, by binding corresponding DIEs to each network card device, the binding relationship between each IP address and the DIE is obtained. After establishing the above preset binding relationship, the computer system can implement the data processing method in the embodiments of the present application. Among them, the network card device obtains a target session, and the target session includes a target IP address, which is the IP address corresponding to the network card device.

[0009] Since the computer system includes M DIEs, and in the embodiments of the present application, when establishing the above binding relationship, the N DIEs with the closest physical communication distance to the network card device are bound as the target DIEs of the network card device, where N is a positive integer less than M. The physical communication distance between the network card device and the DIE refers to the length of the physical connection line between the network card device and the DIE.

[0010] Therefore, after the network card device obtains a session, it can determine the target DIE among the M DIEs according to the preset binding relationship. After determining the corresponding target DIE, the network card device can transfer the target session to the target DIE, and the target DIE executes the target session.

[0011] In the above manner, the network card device transfers the target session to the DIE with a relatively close physical communication distance to it for execution, thereby improving the communication speed between the network card device and the DIE.

[0012] In a possible implementation, in the embodiments of the present application, the number of DIEs (M) in the computer system and the number of target DIEs (N) configured as network card devices are not limited. In the binding relationship of the embodiments of the present application, it is only necessary that N is a positive integer less than M. For example, 2 DIEs or 1 DIE with the closest physical communication distance to the network card device can be selected as the target DIE. Exemplarily, if the computer system is configured with 4 DIEs (M = 4), then 2 DIEs (N = 2) with the closest physical communication distance to the network card device can be determined as the target DIEs, or 1 DIE (N = 1) with the closest physical communication distance to the network card device can also be determined as the target DIE.

[0013] Exemplarily, in practical applications, generally in a computer system, two DIEs are configured as a NUMA. Then, when the two DIEs with the closest physical communication distance to the network card device are selected as the target DIEs in this application (i.e., N = 2), these two target DIEs are in the same NUMA. In other words, in this example, the DIEs in the NUMA with the closest physical communication distance to the network card device are the target DIEs.

[0014] Exemplarily, in this application, one DIE with the closest physical communication distance to the network card device can also be selected as the target DIE (i.e., N = 1). Therefore, the target DIE is the DIE with the closest physical communication distance and the fastest communication speed to the network card device in the computer system.

[0015] In a possible implementation, the memory and DIEs in the computer system can be deployed as a NUMA system, and a non-uniform memory access (NUMA) node runs on each DIE.

[0016] In a possible implementation, the target session includes data to be executed. After the target DIE obtains the target session from the network card device, the target DIE can obtain the target process to be run according to the target session, and then use the target process to execute the data to be executed. Exemplarily, the target session can be initiated by a client device to a server device in the field of cloud computing. The client device requests to access the data to be executed in the server device. After the server device obtains the target session through the network card device, it determines the target process through the target session and uses the target process to execute the data to be executed, thereby realizing the access of the client server to the data to be executed.

[0017] In a second aspect, an embodiment of this application provides a computer system. The computer system includes a network card device and M die chips. The network card device is connected to the M die chips, and M is an integer greater than 1. Among them,

[0018] The network card device is configured to obtain a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; determine the target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is the N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M; and transfer the target session to the target DIE;

[0019] The target DIE is configured to execute the target session.

[0020] The content such as the information interaction and execution process of the embodiments shown in this aspect is based on the same concept as the embodiments shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect for details, and no specific description will be given here.

[0021] In a possible implementation, when the target DIE executes the target session, it is specifically used for:

[0022] Obtain multiple threads and the resource idle information of each thread;

[0023] According to the resource idle information, use the thread with the highest resource idle degree among the multiple threads to execute the target session.

[0024] In this embodiment, the target DIE uses the thread with the highest current resource idle degree to execute the target session, thereby improving the efficiency of resource utilization and achieving the balance of computing resources.

[0025] In a possible implementation, the resource idle information includes the number of sessions executed by each thread, and the resource idle degree is negatively correlated with the number of sessions. In this embodiment, the number of sessions executed by the thread is used to quantify the resource idle degree of the thread, improving the efficiency of resource management.

[0026] In a possible implementation, N is equal to 1 or 2.

[0027] In a possible implementation, a non-uniform memory access (NUMA) node runs on each DIE.

[0028] Based on the second aspect, in an alternative implementation, the target session includes data to be executed. After the target DIE obtains the target session from the network card device, the target DIE can obtain the target process to be run according to the target session, and then use the target process to execute the data to be executed.

[0029] In a third aspect, an embodiment of the present application provides a network card device. The network card device is connected to M die chips (DIEs), where M is an integer greater than 1. The network card device includes:

[0030] An acquisition unit, configured to acquire a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device;

[0031] A determination unit, configured to determine the target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is the N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M;

[0032] A transmission unit, configured to transmit the target session to the target DIE so that the target DIE executes the target session.

[0033] The content such as the information interaction and execution process of the embodiments shown in this aspect is based on the same concept as the embodiments shown in the first aspect. Therefore, for the description of the beneficial effects shown in this aspect, please refer to the above-mentioned first aspect for details, and specific details will not be elaborated here.

[0034] In a possible implementation, N is equal to 1 or 2.

[0035] In a possible implementation, a non-uniform memory access (NUMA) node runs on each DIE.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer is enabled to execute the data processing method described in any of the above aspects.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions. When the computer instructions run on a computer, the computer is enabled to execute the data processing method described in any of the above aspects.

[0038] An embodiment of the present application provides a data processing method and related device. The method is applied to a network card device, and the network card device is connected to M dies (DIEs), where M is an integer greater than 1. The method includes: obtaining a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; determining a target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is the N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M; and transferring the target session to the target DIE so that the target DIE executes the target session. By the above method, the network card device will transfer the target session to the DIE with a relatively close physical communication distance to execute, thereby improving the communication speed between the network card device and the DIE. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0040] Figure 1 It is a schematic architecture diagram of a NUMA system 100 provided by an embodiment of the present application;

[0041] Figure 2 It is a schematic connection diagram of two nodes in a NUMA architecture;

[0042] Figure 3 It is a logical schematic diagram of the access mechanism between the network card device of a computer device and each die in the prior art;

[0043] Figure 4 It is a schematic flowchart of the data processing method in the embodiments of the present application;

[0044] Figure 5 It is a schematic diagram of the application scenario of the data processing method in the embodiments of the present application;

[0045] Figure 6 It is a schematic deployment diagram of the data processing method in the embodiments of the present application applied to a database product;

[0046] Figure 7 It is a schematic diagram of the system framework of a single node of the database product in the embodiments of the present application;

[0047] Figure 8 It is a schematic flowchart of entering multiple IP addresses into a software application in the embodiments of the present application;

[0048] Figure 9 It is a schematic flowchart of a target DIE dispatching a target session to a thread for execution in the embodiments of the present application;

[0049] Figure 10 It is a logical schematic diagram of the access mechanism between multiple network card devices of a computer device and each die in the embodiments of the present application;

[0050] Figure 11 It is a possible application scenario of the data processing method in the embodiments of the present application;

[0051] Figure 12 It is a schematic diagram of the structure of a computer system provided by the embodiments of the present application;

[0052] Figure 13 It is a schematic diagram of the structure of a network card device provided by the embodiments of the present application. Detailed implementation manners

[0053] The embodiments of the present application provide a data processing method and related devices, which are used to improve the communication speed between a network card device and a DIE.

[0054] The embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention, rather than to limit the present invention. As is known to those of ordinary skill in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.

[0055] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data may be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that comprises a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0056] First, the application scenario of the present application will be introduced below. The method for running a process in the embodiments of the present application can be applied to a NUMA-based computer system. Please refer to Figure 1 , Figure 1 FIG. 100 is a schematic structural diagram of a NUMA system 100 provided in an embodiment of the present application. Among them, in the architecture of the NUMA system 100, it can be a multi-slot system 100. As Figure 1As shown, the NUMA system 100 includes socket 101a and socket 101b. Socket 101a and socket 101b may be collectively referred to as sockets herein and can be used to install dies, where each die includes multiple central processing unit cores (CPU cores). The sockets can be communicatively coupled to each other through an interconnect 104. Exemplarily, each socket can be connected to each of the other sockets via a point-to-point quick path interconnect (QPI) link. It should be noted that QPI is an interconnect architecture, and the interconnect between the sockets in the embodiments of the present application can also be implemented through other interconnect architectures, such as other point-to-point architectures, ring architectures, and bus architectures, which are not limited herein. The number of sockets depicted in the NUMA system 100 is only an example, and those skilled in the art will understand that there can be different numbers of sockets. For example, the NUMA system 100 can include, for example, six, four or fewer sockets, or the NUMA system 100 can include, for example, sixteen, thirty-two or more sockets.

[0057] The socket can include multiple dies, each die corresponding to a NUMA node, and each node has its own CPU core and memory. The nodes are connected and communicate with each other through the interconnect 104, as Figure 1 As shown, socket 101a includes node 102a and node 102b, and socket 101b includes node 103a and node 103b. Each node includes a memory and multiple CPU cores (not shown in the figure). It should be noted that the number of nodes and CPU cores depicted in the NUMA system 100 is only an example, and those skilled in the art will understand that each socket can include other numbers of nodes, and each node can include other numbers of CPU cores.

[0058] Regarding the CPU cores within each node, there are two distances for the memory they access: one is the memory within the node itself, i.e., the proximal memory; the other is the memory within other nodes, i.e., the distal memory. Refer to Figure 2 , Figure 2 For a schematic diagram of the connection between two nodes in a NUMA architecture, as Figure 2 As shown, when the CPU core on node 201 accesses the memory on node 202 (remote access), it needs to be transmitted through the interconnect 104, while the CPU core on node 201 accessing its own memory (proximal access) only needs to access through the memory channel. The time required for remote access is significantly greater than the time required for proximal access.

[0059] Regarding the access mechanism between the above-mentioned processor core and the memory, the access mechanism mapped to the access mechanism between the network card device and the processor core in the computer device is the same. Therefore, the network card device spends the shortest time accessing the Die with the closest physical communication distance, and the longest time accessing the Die in other NUMA (remote).

[0060] For ease of understanding, please refer to Figure 3 , Figure 3 which is a logical schematic diagram of the access mechanism between the network card device of the computer device and each die in the prior art. As Figure 3 shown, taking the session received from an external input by the network card device as an example, since the network card device has established communication with each DIE of the computer device, after the network card device obtains the session, it can dispatch the session to any DIE for execution. And Figure 3 the physical communication distance between the network card device and the DIE in NUMA1 is the closest. If the network card device dispatches the session to the DIE on other NUMA for execution, it will take a longer access time.

[0061] In view of this, the embodiments of the present application provide a data processing method and related device for improving the communication speed between the network card device and the DIE. Next, the data processing method in the embodiments of the present application will be introduced with reference to the accompanying drawings. Please refer to Figure 4 , Figure 4 which is a flowchart of the data processing method in the embodiments of the present application. As Figure 4 shown, the data processing method in the embodiments of the present application includes:

[0062] 301. The network card device obtains a target session;

[0063] The data processing method provided by the present application is applied to the network card device, and the network card device is connected to M die DIEs in the computer system, where M is an integer greater than 1. The memory and DIE in the computer system can be deployed as a NUMA system, and a non-uniform memory access NUMA node runs on each DIE. For example Figure 1 shows 4 die DIEs, and correspondingly 4 NUMA nodes are running.

[0064] In the embodiments of the present application, before the computer system sends and receives sessions through a network card device, it is necessary to pre-configure the binding relationship between the network card device and each DIE in the computer system, that is, bind the network card device to the DIE with a relatively close physical communication distance in the computer system. After the network card device determines the binding relationship, the session obtained by the network card device will only be transmitted to the bound DIE for execution. Exemplarily, if the position of the network card device is close to Figure 1 the physical communication distances of the dies 102a and 102b in slot 101a in Figure 1 and relatively far from the physical communication distances of the dies 103a and 103b in slot 101b in Figure 1 then the network card device can be bound to the dies 102a and 102b in slot 101a in

[0065] Figure 1 . Then, the session obtained by the network card device will not be transmitted to the unbound dies 103a and 103b in slot 101b for execution, avoiding the network card device from accessing the dies with a relatively far communication distance, and improving the communication efficiency.

[0065] Furthermore, to better implement the solutions of the embodiments of the present application, the computer system can configure multiple network card devices. Each network card device is bound to a different DIE with a relatively close physical communication distance, and each network card device can adopt the data processing method of the present application, thereby changing the access mechanism between the network card device and each die. Taking the computer system configuring two network card devices (network card device 1 and network card device 2) as an example, each network card device is bound to the DIE with a relatively close physical communication distance to itself. For example, the position of network card device 1 is closest to the physical communication distances of the dies 102a and 102b in Figure 1 slot 101a, while the position of network card device 2 is closest to the physical communication distances of the dies 103a and 103b in Figure 1 slot 101b. Therefore, network card device 1 is bound to dies 102a and 102b, and the session obtained through network card device 1 is transmitted to dies 102a and 102b for execution. Network card device 2 is bound to dies 103a and 103b, and the session obtained through network card device 2 is transmitted to dies 103a and 103b for execution.

[0066] Please refer to Figure 5 , Figure 5 which is a schematic diagram of the application scenario of the data processing method in the embodiments of the present application. As shown in Figure 5As shown, a physical machine can obtain a session of another physical machine or send a session to another physical machine by configuring a network card device and adopting the data processing method in the embodiments of the present application. The specific method is not limited herein.

[0067] Exemplarily, taking a database product as an example, please refer to Figure 6 , Figure 6 which is a deployment schematic diagram of the data processing method in the embodiments of the present application applied to a database product. As shown in Figure 6 , the data processing method can be applied to the Figure 6 client node in Figure 6 or the server node in Figure 7 . Further, please refer to Figure 7 which is a system framework schematic diagram of a single node of the database product in the embodiments of the present application. In Figure 7 , Transaction can refer to a transaction (in database operations, it can refer to a query). A session is sent to Java Database Connectivity (JDBC) via a network card device, and then the JDBC software layer passes the session to the DIE bound to the network card device for execution.

[0068] It should be understood that the data processing method provided in the embodiments of the present application is not limited to being applied to a database product. In actual use, it can also be applied to other computer systems configured with multiple dies. For example, it can be a cloud storage computer system, a cloud computing system, or a big data engine, etc. The specific application is not limited herein.

[0069] Next, continuing with the example of a computer system configured with two network card devices, this section describes how a computer system implements the data processing method provided in the present application by using multiple network card devices simultaneously.

[0070] First, it is necessary to configure an ip route for the operating system (OS) to bind the IP address of each network card to the ip table.

[0071] Specifically, during system initialization, the ip link is modified to configure the route. Taking the IP addresses corresponding to two network card devices as enp3s0 (192.168.6.52) and enp23s0 (192.168.10.51) as an example, the root user executes:

[0072] ip route (to view the current route configuration and check if multiple network IPs are configured).

[0073] ip route add 192.168.6.0 / 24 dev enp3s0 proto kernel scope link src 192.168.6.52 table 111 (Configure the IP of enp3s0 network card: 192.168.6.52 to the 192.168.6.0 network segment, iptable number 111). Among them, table# can be customized from 1 to 252.

[0074] ip route add 192.168.10.0 / 24 dev enp23s0 proto kernel scope link src 192.168.10.51 table 112 (Configure the IP of enp23s0 network card: 192.168.10.51 to the 192.168.10.0 network segment, ip table number 112). Among them, table# can be customized from 1 to 252.

[0075] ip rule add from 192.168.6.52 / 32 table 111 (Add a rule for the ip table 111 of 192.168.6.52).

[0076] ip rule add from 192.168.10.51 / 32 table 112 (Add a rule for the ip table 112 of 192.168.10.51).

[0077] ip route show table 111 (View the basic information of ip table 111).

[0078] ip route show table 112 (View the basic information of ip table 111).

[0079] Next, taking the database software as an example, it is also necessary to read each IP address during the initialization phase of the software layer, and bind the IP to the corresponding DIE through the index. For details, please refer to Figure 8 , Figure 8 is the flow chart for entering multiple IP addresses into the software application in the embodiment of this application. Among them, the Main function is the main function of the software layer; the PostmasterMain function is the initialization function used to establish connections for the basic information of each node; the Set_multiplu_nic_ip function is used to add a global variable (g_nic_list) to record all IP addresses.

[0080] Further, it is also necessary to bind corresponding DIEs to each network card device, so as to obtain the binding relationship between each IP address and the DIE. After establishing the above preset binding relationship, the computer system can implement the data processing method in the embodiments of the present application. Among them, the network card device obtains a target session, and the target session includes a target IP address, and the target IP address is the IP address corresponding to the network card device.

[0081] 302. The network card device determines the target DIE among the M DIEs according to the target IP address and the preset binding relationship;

[0082] The computer system includes M DIEs. In the embodiments of the present application, when establishing the above binding relationship, the N DIEs with the closest physical communication distance to the network card device are bound as the target DIEs of the network card device. N is a positive integer less than M. Among them, the physical communication distance between the network card device and the DIE refers to the length of the physical connection line between the network card device and the DIE. Exemplarily, if the physical position of the network card device is located Figure 1 in a position close to slot 101a, then the physical communication distance between the network card device and Figure 1 the dies 102a and 102b in slot 101a is relatively close, while the physical communication distance from Figure 1 the dies 103a and 103b in slot 101b is relatively far. For this network card device, the dies 102a and 102b can be determined as the target DIEs of the network card device.

[0083] It should be noted that in the present application, the number of DIEs (M) in the computer system and the number of DIEs (N) configured as the target DIEs of the network card device are not limited. In the binding relationship of the embodiments of the present application, it is only necessary that N is a positive integer less than M. For example, 2 DIEs or 1 DIE with the closest physical communication distance to the network card device can be selected as the target DIEs. Exemplarily, if the computer system is configured with 4 DIEs (M = 4), then 2 DIEs (N = 2) with the closest physical communication distance to the network card device can be determined as the target DIEs, or 1 DIE (N = 1) with the closest physical communication distance to the network card device can also be determined as the target DIEs.

[0084] Exemplarily, in practical applications, generally two DIEs in the computer system are configured as a NUMA. Then, if 2 DIEs with the closest physical communication distance to the network card device are selected as the target DIEs in the present application (i.e., N = 2), these two target DIEs are in the same NUMA. In other words, in this example, the DIEs in the NUMA with the closest physical communication distance to the network card device are the target DIEs.

[0085] Exemplarily, in the present application, 1 DIE with the closest physical communication distance to the network card device can also be selected as the target DIE (i.e., N = 1). Therefore, the target DIE is the DIE with the closest physical communication distance and the fastest communication speed to the network card device in the computer system.

[0086] Therefore, after obtaining the session in step 301, the target DIE among the M DIEs can be determined according to the preset binding relationship.

[0087] 303. The network card device transmits the target session to the target DIE;

[0088] After the network card device determines the corresponding target DIE, it can transmit the target session to the target DIE, and the target DIE executes the target session, that is, step 304 is executed.

[0089] 304. The target DIE executes the target session;

[0090] The target session includes data to be executed. After the target DIE obtains the target session from the network card device, the target DIE can obtain the target process to be run according to the target session, and then use the target process to execute the data to be executed.

[0091] Exemplarily, the target session can be initiated by a client device to a server device in the field of cloud computing. The client device requests to access the data to be executed in the server device. After the server device obtains the target session through the network card device, it determines the target process through the target session and uses the target process to execute the data to be executed, so as to realize the access of the client server to the data to be executed.

[0092] In the computer system, each DIE runs multiple CPU cores, and each CPU core can run multiple threads. A thread is the smallest unit that the operating system can perform operation scheduling. After the target DIE obtains the target session from the network card device, it needs to allocate the target session to the threads in the target DIE for execution.

[0093] Specifically, in the embodiments of the present application, an operation logic for the target DIE to dispatch the target session to each thread is provided. Please refer to Figure 9 , Figure 9 which is a schematic flowchart of the target DIE in the embodiments of the present application dispatching the target session to the threads for execution. As Figure 9As shown in the figure, after the software process is launched by the main function, it enters the main database communication function (PostmasterMain), where the SeverLoop function is responsible for initializing all nodes in a loop and establishing connections. After the above process is completed, it enters the dispatching process of the target session (DispatchSession function). Next, the present application adds a FindThreadGroupWithIP function to implement the binding of the target session and the thread. In the FindThreadGroupWithIP function, the principle of "allocating to the least busy" is followed, that is, the target DIE needs to obtain multiple threads in the target DIE and the resource idle information of each thread. After the target DIE masters the resource idle information of each thread, it uses the thread with the highest resource idle degree among the multiple threads to execute the target session. In this embodiment, the target DIE uses the thread with the highest current resource idle degree to execute the target session, thereby improving the efficiency of resource utilization and achieving the balance of computing resources.

[0094] Furthermore, the resource idle information includes the number of sessions currently being executed by each thread, and the resource idle degree of the thread is negatively correlated with the number of sessions executed by the thread, that is, the fewer the number of sessions executed by the thread, the higher the resource idle degree of the thread. In other words, the target DIE will select the thread with the fewest currently executed sessions through the FindThreadGroupWithIP function to execute the target session. By the above method, the resource idle degree of the thread is quantified by the number of sessions executed by the thread, improving the efficiency of resource management.

[0095] For easy understanding, please refer to Figure 10 , Figure 10 which is a logical schematic diagram of the access mechanism between multiple network card devices and each die in the computer device in the embodiment of the present application. As Figure 10 shown, the physical communication distance between network card 1 and the DIE in NUMA 1 is the closest, and the physical communication distance between network card N and the DIE in NUMA N is the closest. Therefore, the sessions obtained by network card 1 will only be sent down to the DIE in NUMA1, and the sessions obtained by network card N will only be sent down to the DIE in NUMAN. The dispatched target sessions will ultimately be bound to the least busy thread for execution.

[0096] The method provided by the embodiment of the present application is applicable to any computer system configured with network card devices. Please refer to Figure 11 , Figure 11 which is a possible application scenario of the data processing method in the embodiment of the present application. As Figure 11As shown in the figure, Node 1 is a client node and Node 2 is a server node. All the data processing methods provided in this application can be applied to the client node or the server node in the figure.

[0097] After experimental tests by the Transaction Processing Performance Council (TPCC), the performance of a single-machine centralized server has generally increased by 6% to 8%, and the performance of a distributed server cluster with 32 nodes has generally increased by 10 - 12%. Moreover, the more the number of DIEs in the server, the more obvious the performance improvement effect; the more the number of CPU cores in the server, the more obvious the performance improvement effect.

[0098] An embodiment of this application provides a data processing method. This method is applied to a network card device, and the network card device is connected to M DIEs, where M is an integer greater than 1. The method includes: obtaining a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; determining a target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is the N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M; and transferring the target session to the target DIE so that the target DIE executes the target session. In the above manner, the network card device will transfer the target session to the DIE with a relatively close physical communication distance to it for execution, thereby improving the communication speed between the network card device and the DIE.

[0099] In Figure 4 Based on the corresponding embodiment, in order to better implement the above solution of the embodiment of this application, the following also provides related devices for implementing the above solution. Specifically, please refer to Figure 12 , Figure 12 which is a schematic structural diagram of a computer system provided by an embodiment of this application. As Figure 12 shown, the computer system 400 includes a network card device 401 and a target die 402;

[0100] The network card device 401 is connected to M DIEs, where M is an integer greater than 1; the network card device 401 is configured to obtain a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; determine a target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target die 402, and the target die 402 is the N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M; and transfer the target session to the target die 402;

[0101] The target die 402 is used to execute the target session.

[0102] In a possible design, when the target die 402 executes the target session, specifically, it is used to obtain the resource idle information of each thread in multiple threads, and the resource idle information is used to indicate the degree of resource idleness.

[0103] According to the resource idle information, use the target thread with the highest degree of resource idleness among the multiple threads to execute the target session.

[0104] In a possible design, the resource idle information includes the number of sessions executed by each thread, and the degree of resource idleness is negatively correlated with the number of sessions.

[0105] In a possible design, N is equal to 1 or 2.

[0106] In a possible design, a non-uniform memory access (NUMA) node runs on each DIE.

[0107] In a possible design, the target session includes data to be executed. When the target die 402 executes the target session, specifically, it is used for:

[0108] According to the target session, determine the target process, and use the target process to execute the data to be executed.

[0109] It should be noted that the information interaction, execution process, etc. between the modules / units in the computer device are based on the same concept as the method embodiments in this application. For specific content, please refer to the description in the method embodiments shown above in this application, and details will not be repeated here. Figure 4 Based on the corresponding embodiments, in order to better implement the above solutions of the embodiments of this application. Please refer to

[0110] In Figure 4 On the basis of the corresponding embodiments, in order to better implement the above solutions of the embodiments of this application. Please refer to Figure 13 , Figure 13 FIG. is a schematic structural diagram of a network card device provided for an embodiment of this application. The network card device is connected to M dies DIE, where M is an integer greater than 1. The network card device includes:

[0111] An obtaining unit 501, configured to obtain a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device;

[0112] A determining unit 502, configured to determine the target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is N DIEs with the closest physical communication distance to the network card device among the multiple DIEs, and N is a positive integer less than M;

[0113] A transfer unit 503, configured to transfer a target session to a target DIE so that the target DIE executes the target session.

[0114] In a possible design, N is equal to 1 or 2.

[0115] In a possible design, a non-uniform memory access (NUMA) node runs on each DIE.

[0116] It should be noted that the information interaction, execution process, etc. between the modules / units in the computer device are based on the same concept as the method embodiments in this application. For specific content, reference can be made to the descriptions in the method embodiments shown above in this application, which will not be elaborated here. Figure 4 The method embodiments in this application also provide a computer program product, which, when running on a computer, causes the computer to execute the steps performed by the server in the method described in the foregoing embodiments.

[0117] The method embodiments in this application also provide a computer-readable storage medium storing a program for signal processing, which, when running on a computer, causes the computer to execute the steps performed by the server in the method described in the foregoing embodiments. Figure 4 The method embodiments in this application also provide a computer-readable storage medium storing a program for signal processing, which, when running on a computer, causes the computer to execute the steps performed by the server in the method described in the foregoing embodiments.

[0118] It should be further noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Figure 4 The method embodiments in this application also provide a computer-readable storage medium storing a program for signal processing, which, when running on a computer, causes the computer to execute the steps performed by the server in the method described in the foregoing embodiments.

[0119] It should be further noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.

[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits, etc. However, for the present application, in more cases, software program implementation is a better embodiment. Based on such an understanding, the technical solution of the present application, in essence or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0121] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0122] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions 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 instructions can be transmitted from a website, computer, training device or data center to another website, computer, training device or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

Claims

1. A method for data processing, characterized in that, The method is applied to a network card device, which is connected to M dies, where M is an integer greater than 1. The method includes: Obtain a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; Determine a target die among the M dies according to the target IP address and a preset binding relationship. The binding relationship indicates that the target IP address corresponds to the target die. The target die is N dies among the M dies with the shortest physical communication distance from the network card device. N is a positive integer less than M. The physical communication distance between the network card device and the die refers to the length of the physical connection line between the network card device and the die; Transmit the target session to the target die so that the target die can execute the target session.

2. The method according to claim 1, wherein The N is equal to 1 or 2.

3. The method according to claim 1 or 2, characterized in that, A non-uniform memory access (NUMA) node runs on each die.

4. The method according to claim 1 or 2, characterized in that, The target session includes data to be executed. When the target die executes the target session, it includes: The target die determines a target process according to the target session and uses the target process to execute the data to be executed.

5. A computer system, characterized in that, The computer system includes a network card device and M dies. The network card device is connected to the M dies, and M is an integer greater than 1; where The network card device is configured to obtain a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; Determine a target die among the M dies according to the target IP address and a preset binding relationship. The binding relationship indicates that the target IP address corresponds to the target die. The target die is N dies among the M dies with the shortest physical communication distance from the network card device. N is a positive integer less than M. The physical communication distance between the network card device and the die refers to the length of the physical connection line between the network card device and the die; Transmit the target session to the target die; The target die is configured to execute the target session.

6. The computer system according to claim 5, wherein, When the target die executes the target session, it is specifically configured to: Obtain the resource idle information of each thread among multiple threads. The resource idle information is used to indicate the degree of resource idleness; According to the resource idle information, use the target thread with the highest degree of resource idleness among the multiple threads to execute the target session.

7. The computer system according to claim 6, wherein, The resource idle information includes the number of sessions executed by each thread, and the degree of resource idleness is negatively correlated with the number of sessions.

8. The computer system according to claim 5, 6 or 7, characterized in that The N is equal to 1 or 2.

9. The computer system according to claim 5, 6 or 7, characterized in that, A non-uniform memory access (NUMA) node runs on each die.

10. The computer system according to claim 5, 6 or 7, characterized in that, The target session includes data to be executed. When the target die executes the target session, it is specifically configured to: Determine a target process according to the target session and use the target process to execute the data to be executed.

11. A network card device, characterized in that, The network card device is connected to M dies, where M is an integer greater than 1. The network card device includes: An acquisition unit, configured to acquire a target session, where the target session includes a target IP address, and the target IP address is the IP address of the network card device; A determination unit, configured to determine a target DIE among the M DIEs according to the target IP address and a preset binding relationship, where the binding relationship indicates that the target IP address corresponds to the target DIE, and the target DIE is N DIEs among the M DIEs that have the shortest physical communication distance from the network card device, N is a positive integer less than M, and the physical communication distance between the network card device and the DIE refers to the length of the physical connection line between the network card device and the DIE; A transmission unit, configured to transmit the target session to the target DIE so that the target DIE executes the target session.

12. The network card device according to claim 11, characterized in that, The N is equal to 1 or 2.

13. The network card device according to claim 11, characterized in that, A non-uniform memory access (NUMA) node runs on each DIE.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.

15. A computer program product, characterized in that, The computer program product stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Dispatching method of virtual processor based on NUMA high-performance network cache resource affinity

    CN104199718A

  • Network message processing method and network access equipment

    CN111884945A