Resource management method and device, computer readable storage medium and electronic equipment

By monitoring and managing the resource information exchange activity between the network card and the host node, the resource information to be scheduled is replaced from the host node to the network card, which solves the performance consumption problem caused by the limited resources of the RDMA network card and improves the network card processing performance.

CN118819828APending Publication Date: 2024-10-22CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410804535.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In the large-scale distributed networking architecture of the data center, RDMA network card hardware resources are limited, causing the network card to frequently communicate with host nodes through IO, consuming processing performance.

Method used

By monitoring the resource information exchange activity between the network card and the host node, the set of communication resources to be scheduled is obtained, and when the information exchange activity exceeds the threshold, the resource information to be scheduled is completely replaced from the host node to the network card to reduce IO interaction. frequency to improve network card performance.

Benefits of technology

Understand the activity of information exchange in real time, reduce the frequency of IO interaction between the network card and the host node, improve the processing performance of the network card, and solve the problem of network card performance consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819828A_ABST
    Figure CN118819828A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a resource management method, a resource management device, a computer readable storage medium and electronic equipment.The resource management method comprises the steps that the information exchange activeness of resource information between a network card and a host node is monitored; the network card is configured on the host node, the network card is used for providing communication resources, and the communication resources are associated with the resource information; the host node and the network card jointly store the resource information; when the information exchange activeness exceeds an activeness threshold value, acquiring a communication resource set to be scheduled of the network card; and in response to the situation that the to-be-scheduled resource information associated with the communication resource set is stored in the host node, integrally replacing the to-be-scheduled resource information into the network card from the host node. According to the invention, the processing delay caused by frequent IO (Input / Output) interaction can be reduced, and the processing performance of the network card is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the rapid development of cloud computing and AIGC (Artificial Intelligence Generated Content) applications, data centers have an increasing demand for network bandwidth, low latency, and high efficiency. As a high-performance network technology, RDMA (Remote Direct Memory Access) has been widely used in data center networks.

[0003] However, in the large-scale distributed networking architecture of data centers, when RDMA is selected as the communication mode between different nodes, the resources in the actual RDMA network card hardware are limited. Large-scale QP (Queue Pair) creation and maintenance require frequent IO communication with the host node's memory when the network card switches QP, which consumes the processing performance of the network card.

[0004] In view of this, there is an urgent need in the art to develop a new resource management method and device.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure. Summary of the invention

[0006] The purpose of the present disclosure is to provide a resource management method, a resource management device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the technical problem of network card performance consumption caused by frequent IO communication between the network card and the host node in the related technology.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of the present disclosure, there is provided a resource management method, comprising:

[0009] Monitoring the activity of information exchange between a network card and a host node for resource information; the network card is configured on the host node, the network card is used to provide communication resources, and the communication resources are associated with the resource information; the host node and the network card jointly store the resource information;

[0010] When the information exchange activity exceeds the activity threshold, obtaining a set of communication resources to be scheduled by the network card;

[0011] In response to the to-be-scheduled resource information associated with the communication resource set being stored in the host node, the to-be-scheduled resource information is replaced as a whole from the host node to the network card.

[0012] In an exemplary embodiment of the present disclosure, when the information exchange activity exceeds an activity threshold, acquiring a set of communication resources to be scheduled by the network card includes:

[0013] When the information exchange activity exceeds the activity threshold, the resource information associated with the communication resource is integrated and analyzed to obtain a scheduling rule of the network card for the communication resource; the scheduling rule is used to describe the polling order of multiple service types associated with the network card, and the mapping relationship between each service type and the communication resource set it needs to call;

[0014] According to the scheduling rule, a set of communication resources to be scheduled by the network card is determined.

[0015] In an exemplary embodiment of the present disclosure, the replacing the to-be-scheduled resource information from the host node to the network card as a whole includes:

[0016] Acquire the to-be-scheduled resource information from the host node;

[0017] Using the resource information to be scheduled to replace the target resource information in the network card as a whole;

[0018] The target resource information includes resource information associated with the low-frequency scheduling resources.

[0019] In an exemplary embodiment of the present disclosure, the method further includes:

[0020] Monitoring the communication status between the host node and a plurality of other host nodes, wherein the host node and the plurality of other host nodes are all included in a distributed networking system;

[0021] When the information exchange activity does not exceed the activity threshold, an allocation strategy for the communication resources is configured according to the communication status.

[0022] In an exemplary embodiment of the present disclosure, when the information exchange activity does not exceed the activity threshold, determining an allocation strategy for the communication resource according to the communication status includes:

[0023] When the information exchange activity does not exceed the activity threshold, detecting whether the communication status meets a preset condition, the preset condition including that both a first type of transmission task and a second type of transmission task exist between the host node and any of the other host nodes, and the amount of data carried by the first type of transmission task is greater than the amount of data carried by the second type of transmission task;

[0024] In response to the communication status satisfying the preset condition, determining whether the second type of transmission task belongs to a specific task;

[0025] In response to the second type of transmission task not belonging to the specific task, the second type of transmission task is allocated to a specific communication resource used to carry the first type of transmission task, so as to transmit the second type of transmission task through the specific communication resource.

[0026] In an exemplary embodiment of the present disclosure, after determining that the second type transmission task does not belong to the specific task, the method further includes:

[0027] The network card is prevented from creating new communication resources for carrying the second type of transmission tasks.

[0028] In an exemplary embodiment of the present disclosure, the specific communication resource includes a specific queue pair;

[0029] The allocating the second type transmission task to a specific communication resource used to carry the first type transmission task, so as to transmit the second type transmission task through the specific communication resource, comprises:

[0030] Sending the to-be-transmitted data packets associated with the second type of transmission task to the specific queue pair, and increasing the transmission priority of the to-be-transmitted data packets in the specific queue pair;

[0031] A marking tag is set for the data packet to be transmitted so as to transmit the data packet to be transmitted through the specific queue pair; the marking tag is used to indicate that the data packet to be transmitted is associated with the second type of transmission task.

[0032] According to a second aspect of the present disclosure, there is provided a resource management device, comprising:

[0033] A monitoring module, used for monitoring the information exchange activity between the network card and the host node for resource information; the network card is configured on the host node, the network card is used for providing communication resources, and the communication resources are associated with the resource information; the host node and the network card jointly store the resource information;

[0034] An acquisition module, configured to acquire a set of communication resources to be scheduled by the network card when the information exchange activity exceeds an activity threshold;

[0035] The replacement module is used for replacing the to-be-scheduled resource information associated with the communication resource set from the host node to the network card as a whole in response to the to-be-scheduled resource information being stored in the host node.

[0036] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the resource management method described in the first aspect is implemented.

[0037] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the resource management method described in the first aspect above by executing the executable instructions.

[0038] It can be seen from the above technical solutions that the resource management method, resource management device, computer-readable storage medium and electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:

[0039] In the technical solutions provided in some embodiments of the present disclosure, by monitoring the information exchange activity for resource information between the network card and the host node, when the information exchange activity exceeds the activity threshold, the communication resource set to be scheduled of the network card is obtained, and in response to the resource information to be scheduled associated with the communication resource set being stored in the host node, the resource information to be scheduled is replaced as a whole from the host node to the network card, so that the information exchange activity between the network card and the host node can be understood in real time. When the information exchange activity exceeds the activity threshold, the resource information to be scheduled is replaced as a whole from the host node to the network card at one time, thereby solving the technical problem in the related technology that when the information exchange is active, the network card frequently performs multiple QP resource information replacements with the host node, resulting in multiple IO communications, thereby seriously consuming the performance of the network card, reducing the IO interaction frequency between the network card and the host node, and improving the processing performance of the network card.

[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0042] Figure 1 An architecture diagram showing an RDMA communication mode in a large-scale connection scenario in the related art;

[0043] Figure 2 A schematic diagram showing a flow chart of a resource management method in an embodiment of the present disclosure;

[0044] Figure 3 A schematic diagram showing a flow chart of how to obtain a communication resource set to be scheduled by a network card when the information exchange activity exceeds an activity threshold in an embodiment of the present disclosure;

[0045] Figure 4 A flow chart showing how to configure a communication resource allocation strategy according to a communication status when the information exchange activity does not exceed the activity threshold in an embodiment of the present disclosure;

[0046] Figure 5 A schematic diagram showing the overall process of the resource management method in an embodiment of the present disclosure is shown;

[0047] Figure 6 A schematic diagram showing a resource management system in an embodiment of the present disclosure is shown;

[0048] Figure 7 A schematic diagram showing the structure of a resource management device in an exemplary embodiment of the present disclosure is shown;

[0049] Figure 8 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0051] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0052] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0053] First, the communication terms involved in this disclosure are explained:

[0054] RDMA: is a data transmission technology that allows the memory of one computer to directly access the memory of another computer, bypassing the processing of the operating system CPU and the conventional network protocol stack, thereby reducing the delay and CPU burden during the data transmission process. It has the advantages of low latency (since data can be directly transferred from the memory of one system to the memory of another system without the need for operating system processing and additional data copying, the latency is greatly reduced), high bandwidth (by eliminating unnecessary data processing steps, RDMA can more effectively utilize network bandwidth and achieve higher data transmission rates) and improved CPU operating efficiency (since most of the work in the data transmission process is directly completed by the RDMA hardware, the CPU is freed up to handle other tasks, improving the overall system performance).

[0055] RNIC (RDMA Network Interface Card) is a network interface card that can implement remote memory direct access. RNIC provides hardware-level RDMA function support, allowing efficient data transmission between servers or nodes through high-speed network connections. It is usually integrated into the server as part of the network adapter, interacting directly with the host memory and processor to achieve fast data transmission and communication.

[0056] QP (Queue Pair): It is the basic unit for communication in the RDMA network. It represents a virtual interface for interaction between hardware and software. It consists of two queues, the send queue (SQ) and the receive queue (RQ). Each QP has a unique ID for identification and addressing between the two communicating parties. The send queue stores the data to be sent, which will be transmitted to the remote node through the RDMA network. The receive queue stores the data received from the remote node. By separating the send and receive queues, bidirectional transmission can be achieved and the network throughput can be improved. QP also maintains the connection status with the remote QP to ensure reliable data transmission. By establishing a connection between QPs, the RDMA network can directly read or write the memory of the remote node from the memory of the local node without the involvement of the operating system, thereby reducing the overhead of data replication and interrupt processing and improving the performance of the application.

[0057] Elephant Flow: Elephant Flow refers to data flows that last for a long time and transmit a large amount of data in the network. It is usually the traffic generated by video streaming, large file transfer, etc.

[0058] Mouse Flow: Mouse Flow refers to data flows that are short-lived and transmit a small amount of data, such as traffic generated by web browsing and email transmission.

[0059] With the rapid development of cloud computing and AIGC applications, data centers have an increasing demand for network bandwidth, low latency, and high efficiency. As a high-performance network technology, RDMA (Remote Direct Memory Access) has been widely used in data center networks.

[0060] refer to Figure 1 , Figure 1 The architecture diagram of the RDMA communication mode in the large-scale connection scenario in the related art is shown as follows: Figure 1 As shown:

[0061] The Ethernet switching network includes multiple host nodes (such as Figure 1 The local node and remote node N shown in the figure have an RNIC network card deployed on each node, and each network card provides multiple QP communication resources.

[0062] However, in large-scale connection scenarios, the above RDMA communication mode has the following problems:

[0063] First, in the large-scale distributed networking architecture of data centers, when RDMA is selected as the communication mode between different nodes, the resources in the actual RDMA network card (RNIC) hardware are limited. Large-scale QP creation and maintenance cause the network adapter to frequently perform IO communication with the host node's memory when switching QPs, which consumes the processing performance of the network card.

[0064] Second, when large flows (elephant flows) and small flows (mouse flows) share bandwidth resources, if there is no reasonable bandwidth allocation and flow control mechanism, small flows will have to wait in line for a long time while waiting for transmission because large flows occupy most of the bandwidth resources, which will significantly increase the delay of small flows and lengthen the completion time, leading to a long tail effect, thus affecting the network fairness performance of small flows. Moreover, when the QP for processing large flows occupies the resources of the RDMA network adapter, the QP used by the bursty small flows may also increase the IO communication with the host memory due to cache miss, thus causing communication delay of the overall network.

[0065] In response to the above problems, the present disclosure proposes a solution to optimize QP resource management, which reduces the IO latency during QP switching in large-scale networking by reasonably scheduling IO operations during multi-QP switching. At the same time, by modifying relevant resource parameters and configurations, small traffic transmission tasks that meet the conditions are carried on large traffic communication resources, thereby eliminating the need to create new QP resources corresponding to small traffic transmission tasks, thereby improving the overall processing performance of the system.

[0066] In the embodiments of the present disclosure, a resource management method is first provided, which at least to some extent overcomes the defect of network card performance consumption caused by frequent IO communications between the network card and the host node in the related art.

[0067] Figure 2 A flow chart of a resource management method in an embodiment of the present disclosure is shown. The execution subject of the resource management method may be the resource management system in the present disclosure.

[0068] refer to Figure 2 According to an embodiment of the present disclosure, a resource management method includes the following steps:

[0069] Step S210, monitoring the information exchange activity between the network card and the host node for resource information; the network card is configured on the host node, the network card is used to provide communication resources, and the communication resources are associated with resource information; the host node and the network card jointly store the resource information;

[0070] Step S220, when the information exchange activity exceeds the activity threshold, obtaining a set of communication resources to be scheduled by the network card;

[0071] Step S230 , in response to the to-be-scheduled resource information associated with the communication resource set being stored in the host node, the to-be-scheduled resource information is replaced as a whole from the host node to the network card.

[0072] exist Figure 2 In the technical solution provided by the illustrated embodiment, by monitoring the information exchange activity for resource information between the network card and the host node, when the information exchange activity exceeds the activity threshold, the communication resource set to be scheduled of the network card is obtained, and in response to the resource information to be scheduled associated with the communication resource set being stored in the host node, the resource information to be scheduled is replaced as a whole from the host node to the network card, so that the information exchange activity between the network card and the host node can be understood in real time. When the information exchange activity exceeds the activity threshold, the resource information to be scheduled is replaced as a whole from the host node to the network card at one time, thereby solving the technical problem in the related technology that when the information exchange is active, the network card frequently performs multiple QP resource information replacements with the host node, resulting in multiple IO communications, thereby seriously consuming the performance of the network card, reducing the IO interaction frequency between the network card and the host node, and improving the processing performance of the network card.

[0073] The following Figure 2 The specific implementation process of each step is described in detail:

[0074] In step S210, the activity of information exchange between the network card and the host node for resource information is monitored.

[0075] In this step, first of all, it should be explained that the present disclosure is applied to a distributed networking system, which may include multiple host nodes. The host node in the present disclosure refers to any one of the above-mentioned multiple host nodes, and the remaining host nodes except the host node are called other host nodes.

[0076] A network card may be configured on the host node to support RDMA communication. The network card is used to provide communication resources. The communication resources may be QPs, and the resource information may be QP contexts.

[0077] Among them, the QP context is a data structure used to describe and manage all necessary information and runtime status of this QP. It contains various attributes and configuration information of the QP, such as the buffer address of SQ and RQ, queue depth, QP status (such as INIT, RTR, RTS, etc.), and the memory region (MR) information associated with it. The QP context enables the software to track and control the operation of each QP, ensuring that data can be correctly and efficiently transmitted directly to the other party's memory through the network without the operating system intervening in data copying.

[0078] When the number of created QPs is small, the NIC can store the resource information associated with the QP in the memory of the NIC hardware. However, in the case of large-scale connections, the NIC needs to create a large number of QPs to support RDMA communication. Since the memory resources in the NIC are limited, the NIC needs to use the memory of the host device to store part of the QP context, that is, the host node and the NIC jointly store resource information. Later, when the NIC needs to communicate through a certain QP, the QP context of the QP in the host device is replaced back to the NIC memory. Therefore, there is information exchange between the host node and the NIC.

[0079] The present disclosure can monitor the information exchange activity for the QP context between the above-mentioned network card and the host node. Exemplarily, the above-mentioned information exchange activity can be the amount of resource information exchanged per unit time, and can also be expressed as the information replacement degree. It can be set according to actual conditions, and the present disclosure does not make any special limitation on this.

[0080] In step S220, when the information exchange activity exceeds the activity threshold, a communication resource set to be scheduled by the network card is obtained.

[0081] In this step, if the above information exchange activity exceeds the activity threshold, you can refer to Figure 3 , Figure 3 A flow chart showing how to obtain a communication resource set to be scheduled by a network card when the information exchange activity exceeds an activity threshold in an embodiment of the present disclosure includes steps S301 and S302:

[0082] In step S301, when the information exchange activity exceeds the activity threshold, the resource information associated with the communication resources is integrated and analyzed to obtain the scheduling rule of the network card for the communication resources.

[0083] In this step, when the above-mentioned information exchange activity exceeds the activity threshold, that is, when the information exchange between the network card and the host node occurs frequently, the resource information associated with the communication resources can be integrated and analyzed to analyze the scheduling rules of the network card for the communication resources, wherein the scheduling rules can be used to describe the polling order of multiple service types associated with the network card (for example: service type A-service type B-service type C), and the mapping relationship between each service type and the communication resource set it needs to call (that is, which communication resource set each service type calls, and the communication resource set contains at least two groups of communication resources that need to be called).

[0084] In step S302, a communication resource set to be scheduled by the network card is determined according to a scheduling rule.

[0085] In this step, considering that the above-mentioned scheduling rules can describe the polling order of multiple service types associated with the network card, as well as the mapping relationship between each service type and the communication resource set it needs to call, it is possible to determine which service type is about to be polled and which communication resource set needs to be called for this service type based on the above-mentioned scheduling rules, thereby determining the communication resource set to be scheduled by the network card.

[0086] After determining the communication resource set, it can be detected whether the to-be-scheduled QP context associated with the communication resource set is stored in the host node. If the to-be-scheduled QP context is stored in the network card, it will not affect the subsequent scheduling process. If the to-be-scheduled QP context is stored in the host node, cache misses will frequently occur in the subsequent scheduling process. To avoid this situation, the present disclosure can perform the following step S230.

[0087] Next reference Figure 2 In step S230, in response to the to-be-scheduled resource information associated with the communication resource set being stored in the host node, the to-be-scheduled resource information is replaced as a whole from the host node to the network card.

[0088] In this step, when it is detected that the to-be-scheduled resource information associated with the communication resource set is stored in the host node, the to-be-scheduled resource information can be obtained from the host node, and then, the to-be-scheduled resource information in the network card (exemplarily, the target resource information can be the resource information associated with N groups of low-frequency scheduling resources) is replaced as a whole, so as to achieve a one-time replacement of the to-be-scheduled resource information corresponding to the QP set to be scheduled from the host node to the network card as a whole. Therefore, in the present disclosure, the network card can complete the update of its own QP resource context with minimal IO interaction, reducing a large number of frequent IO interactions with the memory between the host node caused by improper management of network card resources.

[0089] Optionally, the present disclosure may also pre-collect statistics on the performance upper limit information of the network card (for example, memory upper limit, bandwidth upper limit, etc.), and then, based on the above performance upper limit information, perform modeling analysis on the amount of information when a single information replacement is performed, so as to determine the optimal replacement information amount that can be set when a single resource information replacement is performed based on the modeling analysis results.

[0090] Based on the above implementations, the present disclosure can periodically perceive the usage of QP resources by the host device and the network card. When the QP context needs to be frequently exchanged, the context information of multiple QPs is updated at one time as much as possible to reduce the IO interaction frequency between the host memory and the network card.

[0091] In addition, it should be noted that while executing the above step S210 (monitoring the information exchange activity for resource information between the network card and the host node), the present disclosure can also monitor the communication status between the host node and multiple other host nodes. When the information exchange activity does not exceed the activity threshold, the allocation strategy for communication resources is configured according to the communication status.

[0092] Specifically, please refer to Figure 4 , Figure 4 A flow chart showing how to configure a communication resource allocation strategy according to a communication status when the information exchange activity does not exceed the activity threshold in an embodiment of the present disclosure includes steps S401 to S403:

[0093] In step S401, when the information exchange activity does not exceed the activity threshold, it is detected whether the communication status meets the preset condition.

[0094] In this step, when the information exchange activity does not exceed the activity threshold, it can be detected whether the communication status between the host node and other host nodes meets the preset conditions.

[0095] Among them, the above-mentioned preset conditions may include: there are both first-type transmission tasks and second-type transmission tasks between any other host nodes of the above-mentioned host node, wherein the amount of data carried by the first-type transmission task is greater than the amount of data carried by the second-type transmission task. Exemplarily, the first-type transmission task can also be called a large-flow transmission task, and the second-type transmission task can also be called a small-flow transmission task.

[0096] If the above communication conditions do not meet the above preset conditions, that is, the above communication conditions (both the first type of transmission tasks and the second type of transmission tasks) do not exist between the host node and any other host node, then the resource allocation strategy of the network card does not need to be intervened, and conventional RDMA communication can be performed as required.

[0097] In step S402, in response to the communication status satisfying a preset condition, it is determined whether the second type transmission task belongs to a specific task.

[0098] In this step, if it is detected that there are both first-type transmission tasks and second-type transmission tasks between the above-mentioned host node and any other host node, it can be determined whether the above-mentioned second-type transmission task belongs to a specific task. Exemplarily, the specific task may be a task that is not associated with the RDMA protocol, or a task that is incompatible with the RDMA protocol, or a task that has completed the transmission. It can be set according to actual conditions, and the present disclosure does not make any special limitations on this.

[0099] In step S403, in response to the second type transmission task not belonging to a specific task, the second type transmission task is allocated to a specific communication resource used to carry the first type transmission task, so as to transmit the second type transmission task through the specific communication resource.

[0100] In this step, if it is detected that the second type of transmission task does not belong to a specific task, the network card can be prevented from creating a new QP for carrying the second type of transmission task, and the second type of transmission task can be directly assigned to the specific QP (which can be a QP for transmitting large traffic) for carrying the first type of transmission task, so as to transmit the second type of transmission task through the specific QP, that is, to transmit the small traffic task through the QP for transmitting the large traffic task, so as to realize direct ride of small traffic without waiting for the creation of a new QP.

[0101] Specifically, the load associated with the above-mentioned second type of transmission task (i.e., the data packets to be transmitted) can be sent to the above-mentioned specific QP through network card adaptation, and the transmission priority of the above-mentioned data packets to be transmitted in the above-mentioned specific queue can be increased. In addition, a mark label can be set for the above-mentioned data packets to be transmitted (the mark label is used to characterize that the data packets to be transmitted are associated with the second type of transmission task) so as to transmit the above-mentioned data packets to be transmitted through the above-mentioned specific queue.

[0102] By marking the above-mentioned data packets to be transmitted, when the receiving end receives such data packets, it can be determined through the label that the data packet is a small-flow data packet that "hitchhiks". The receiving end can then perform special verification processing on the data packet and complete the data processing on the other end through the network card.

[0103] Based on the above implementation methods, on the one hand, the present disclosure can optimize the network card driver, reduce unnecessary QP resource creation and maintenance, and allow small-flow transmission tasks to share the resources of large-flow QP as much as possible, so that the communication needs of small-flow can be directly sent to the destination through the large-flow QP, reducing IO processing during QP switching; on the other hand, by optimizing the processing weights of small-flow packets to be transmitted, corresponding performance guarantees can be made for delay-sensitive applications.

[0104] refer to Figure 5 , Figure 5 The overall flow chart of the resource management method in the embodiment of the present disclosure is shown, including steps S501 to S516:

[0105] In step S501, start;

[0106] In step S502, the information exchange activity is evaluated;

[0107] In step S503, whether the current information exchange activity exceeds the activity threshold T;

[0108] If yes, then proceed to step S504, prepare to perform information replacement, and count the QP scheduling rules within a communication period; in step S505, sort the scheduling order of the QP resource set, and prepare to replace the TopN resource information that is not frequently accessed from the network card memory (N can be an integer greater than 1, and can be set according to actual conditions, and the present disclosure does not make special restrictions on this); in step S506, perform IO operations to complete information replacement; in step S507, update the log and policy information; then proceed to step S503 for another judgment;

[0109] If not, proceed to step S508 to maintain the original QP resource maintenance mode and update resource information in time when a cache miss occurs; in step S509, determine whether the communication status between the host node and multiple other host nodes meets the preset conditions;

[0110] If not, proceed to step S510 to perform RDMA communication as needed; jump to step S616;

[0111] If yes, proceed to step S511 to record the QP context of the small flow and related information in an accessible mapping table;

[0112] In step S512, the data packet to be transmitted with small traffic is carried in the QP corresponding to the large traffic for forwarding and carries a marking label;

[0113] In step S513, the peer end parses the data packet by identifying the tag and completes the communication;

[0114] In step S514, the peer end transmits the response information carrying the marking tag to the sending end;

[0115] In step S515, the transmitting end restores the QP related state before modification;

[0116] In step S516, end.

[0117] refer to Figure 6 , Figure 6 A schematic diagram of a resource management system in an embodiment of the present disclosure is shown. Figure 6 As shown, the present disclosure introduces a resource management system on each node (each node includes an RNIC network card for connecting to an Ethernet switching network). The resource management system may include a policy control module, a detection module, a scheduling module, and a driver control module. Through the coordinated processing of the above multiple modules, the overall QP resource management can be completed:

[0118] Specifically, the policy control module is used to: formulate management policies according to the status of the resource management system, the QP resource utilization of the network card and the network performance index, and collect the work logs of other modules and analyze their work logs;

[0119] The detection module is used to: detect the management content of the QP context by the host node, the activity of information exchange between the network card and the host node, and identify the QP information of the small traffic business when the QP resources of the network card are insufficient;

[0120] The above-mentioned scheduling module is used to: when the information exchange activity between the network card and the host node exceeds the threshold, use the resource information of the QP to be scheduled to replace the low-frequency access resource information in the network card as a whole, monitor the replacement process and results, and report to the policy control module whether the replacement is successful;

[0121] The above-mentioned drive control module is used to: when it is necessary to execute the operation of a small flow QP riding on a large flow QP, add a mark label to the data packet to be transmitted of the small flow, and forward the data packet to be transmitted to the QP with large flow, so as to transmit the above-mentioned small flow data packet to be transmitted through the QP with large flow; in addition, the drive control module can also serve as a software and hardware supplementary interface to complete the reading and writing of specified information.

[0122] In general, the present disclosure aims to optimize the management of network card QP resources in large-scale systems using RDMA communication. First, by detecting and identifying the activity of information exchange between the network card and the host for resource information, an activity threshold T is formulated, and the resource information to be scheduled is replaced to the host node at one time, thereby reducing the delay caused by frequent IO processing and achieving the purpose of optimizing system performance; secondly, through a customized driver interaction module, some information in the large-traffic QP is modified, so that small-traffic services can carry the communication pipeline of large-traffic services, reducing unnecessary QP resource creation and maintenance, and at the same time allowing delay-sensitive small-traffic communications to have a higher processing priority, thereby balancing resource usage and performance optimization.

[0123] Therefore, the present disclosure can be applied to at least the following scenarios:

[0124] When using RDMA network cards for traffic communication in large-scale distributed systems, it provides optimization of communication resource utilization and communication efficiency;

[0125] In-depth monitoring and customized configuration of QP resources for network communications in large-scale distributed systems;

[0126] Perform QP-granular communication analysis reporting and fault monitoring on network communications in large-scale distributed systems.

[0127] The present disclosure has at least the following practical values:

[0128] For networks of different scales, establish an RDMA communication model with QP granularity;

[0129] By analyzing the communication patterns of traffic of different natures through logs, we can help users design and optimize network communication capabilities for large model training.

[0130] The present disclosure also provides a resource management device, Figure 7 A schematic diagram showing the structure of a resource management device in an exemplary embodiment of the present disclosure is shown; Figure 7 As shown, the resource management device 700 may include a monitoring module 710, an acquisition module 720 and a replacement module 730. Among them:

[0131] A monitoring module 710 is used to monitor the activity of information exchange between a network card and a host node for resource information; the network card is configured on the host node, the network card is used to provide communication resources, and the communication resources are associated with the resource information; the host node and the network card jointly store the resource information;

[0132] An acquisition module 720, configured to acquire a set of communication resources to be scheduled by the network card when the information exchange activity exceeds an activity threshold;

[0133] The replacement module 730 is used to replace the to-be-scheduled resource information associated with the communication resource set from the host node to the network card as a whole in response to the to-be-scheduled resource information being stored in the host node.

[0134] In an exemplary embodiment of the present disclosure, when the information exchange activity exceeds the activity threshold, the acquisition module 720 acquires the communication resource set to be scheduled by the network card, including:

[0135] When the information exchange activity exceeds the activity threshold, the resource information associated with the communication resource is integrated and analyzed to obtain a scheduling rule of the network card for the communication resource; the scheduling rule is used to describe the polling order of multiple service types associated with the network card, and the mapping relationship between each service type and the communication resource set it needs to call;

[0136] According to the scheduling rule, a set of communication resources to be scheduled by the network card is determined.

[0137] In an exemplary embodiment of the present disclosure, the replacement module 730 replaces the to-be-scheduled resource information from the host node to the network card as a whole, including:

[0138] Acquire the to-be-scheduled resource information from the host node;

[0139] Using the resource information to be scheduled to replace the target resource information in the network card as a whole;

[0140] The target resource information includes resource information associated with the low-frequency scheduling resources.

[0141] In an exemplary embodiment of the present disclosure, the monitoring module 710 is configured to:

[0142] Monitoring the communication status between the host node and a plurality of other host nodes, wherein the host node and the plurality of other host nodes are all included in a distributed networking system;

[0143] When the information exchange activity does not exceed the activity threshold, an allocation strategy for the communication resources is configured according to the communication status.

[0144] In an exemplary embodiment of the present disclosure, when the information exchange activity does not exceed the activity threshold, the monitoring module 710 determines an allocation strategy for the communication resource according to the communication status, including:

[0145] When the information exchange activity does not exceed the activity threshold, detecting whether the communication status meets a preset condition, the preset condition including that both a first type of transmission task and a second type of transmission task exist between the host node and any of the other host nodes, and the amount of data carried by the first type of transmission task is greater than the amount of data carried by the second type of transmission task;

[0146] In response to the communication status satisfying the preset condition, determining whether the second type of transmission task belongs to a specific task;

[0147] In response to the second type of transmission task not belonging to the specific task, the second type of transmission task is allocated to a specific communication resource used to carry the first type of transmission task, so as to transmit the second type of transmission task through the specific communication resource.

[0148] In an exemplary embodiment of the present disclosure, after determining that the second type of transmission task does not belong to the specific task, the monitoring module 710 is configured to:

[0149] The network card is prevented from creating new communication resources for carrying the second type of transmission tasks.

[0150] In an exemplary embodiment of the present disclosure, the specific communication resource includes a specific queue pair;

[0151] The monitoring module 710 allocates the second type of transmission task to a specific communication resource used to carry the first type of transmission task, so as to transmit the second type of transmission task through the specific communication resource, including:

[0152] Sending the to-be-transmitted data packets associated with the second type of transmission task to the specific queue pair, and increasing the transmission priority of the to-be-transmitted data packets in the specific queue pair;

[0153] A marking tag is set for the data packet to be transmitted so as to transmit the data packet to be transmitted through the specific queue pair; the marking tag is used to indicate that the data packet to be transmitted is associated with the second type of transmission task.

[0154] The specific details of each module in the above resource management device have been described in detail in the corresponding resource management method, so they will not be repeated here.

[0155] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0156] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0157] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0158] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.

[0159] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0160] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0161] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.

[0162] In addition, an electronic device capable of implementing the above method is also provided in an embodiment of the present disclosure.

[0163] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0164] Refer to the following Figure 8 The electronic device 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0165] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include but are not limited to: at least one processor 810, at least one memory 820, a bus 830 connecting different system components (including the memory 820 and the processor 810), and a display 840.

[0166] The memory stores program codes, which can be executed by the processor 810, so that the processor 810 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processor 810 can perform the following steps: Figure 2As shown in: Step S210, monitoring the information exchange activity for resource information between the network card and the host node; the network card is configured on the host node, the network card is used to provide communication resources, and the communication resources are associated with the resource information; the host node and the network card jointly store the resource information; Step S220, when the information exchange activity exceeds the activity threshold, obtaining the communication resource set to be scheduled by the network card; Step S230, in response to the resource information to be scheduled associated with the communication resource set being stored in the host node, replacing the resource information to be scheduled from the host node to the network card as a whole.

[0167] The memory 820 may include a readable medium in the form of a volatile storage, such as a random access memory (RAM) 8201 and / or a cache memory 8202 , and may further include a read-only memory (ROM) 8203 .

[0168] The memory 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0169] Bus 830 may be a bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0170] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0171] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A resource management method, characterized in that: include: Monitor the activity of information exchange between the network card and the host node for resource information; The network card is configured on the host node, and the network card is used to provide communication resources, and the communication resources are associated with the resource information; The host node and the network card jointly store the resource information; When the information exchange activity exceeds the activity threshold, obtaining a set of communication resources to be scheduled by the network card; In response to the to-be-scheduled resource information associated with the communication resource set being stored in the host node, the to-be-scheduled resource information is replaced as a whole from the host node to the network card.

2. The method according to claim 1, characterized in that When the information exchange activity exceeds the activity threshold, obtaining the communication resource set to be scheduled by the network card includes: When the information exchange activity exceeds the activity threshold, the resource information associated with the communication resource is integrated and analyzed to obtain a scheduling rule of the network card for the communication resource; the scheduling rule is used to describe the polling order of multiple service types associated with the network card, and the mapping relationship between each service type and the communication resource set it needs to call; According to the scheduling rule, a set of communication resources to be scheduled by the network card is determined.

3. The method according to claim 2, characterized in that The replacing the to-be-scheduled resource information from the host node to the network card as a whole includes: Acquire the to-be-scheduled resource information from the host node; Using the resource information to be scheduled to replace the target resource information in the network card as a whole; The target resource information includes resource information associated with the low-frequency scheduling resources.

4. The method according to claim 1, characterized in that The method further comprises: Monitoring the communication status between the host node and a plurality of other host nodes, wherein the host node and the plurality of other host nodes are all included in a distributed networking system; When the information exchange activity does not exceed the activity threshold, an allocation strategy for the communication resources is configured according to the communication status.

5. The method according to claim 4, characterized in that When the information exchange activity does not exceed the activity threshold, determining an allocation strategy for the communication resources according to the communication status includes: When the information exchange activity does not exceed the activity threshold, detecting whether the communication status meets a preset condition, the preset condition including that both a first type of transmission task and a second type of transmission task exist between the host node and any of the other host nodes, and the amount of data carried by the first type of transmission task is greater than the amount of data carried by the second type of transmission task; In response to the communication status satisfying the preset condition, determining whether the second type of transmission task belongs to a specific task; In response to the second type of transmission task not belonging to the specific task, the second type of transmission task is allocated to a specific communication resource used to carry the first type of transmission task, so as to transmit the second type of transmission task through the specific communication resource.

6. The method according to claim 5, characterized in that After determining that the second type of transmission task does not belong to the specific task, the method further includes: The network card is prevented from creating new communication resources for carrying the second type of transmission tasks.

7. The method according to claim 5, characterized in that The specific communication resource includes a specific queue pair; The allocating the second type transmission task to a specific communication resource used to carry the first type transmission task, so as to transmit the second type transmission task through the specific communication resource, comprises: Sending the to-be-transmitted data packets associated with the second type of transmission task to the specific queue pair, and increasing the transmission priority of the to-be-transmitted data packets in the specific queue pair; A marking tag is set for the data packet to be transmitted so as to transmit the data packet to be transmitted through the specific queue pair; the marking tag is used to indicate that the data packet to be transmitted is associated with the second type of transmission task.

8. A resource management device, characterized in that: include: A monitoring module is used to monitor the activity of information exchange between the network card and the host node for resource information; The network card is configured on the host node, and the network card is used to provide communication resources, and the communication resources are associated with the resource information; The host node and the network card jointly store the resource information; An acquisition module, configured to acquire a set of communication resources to be scheduled by the network card when the information exchange activity exceeds an activity threshold; The replacement module is used for replacing the to-be-scheduled resource information associated with the communication resource set from the host node to the network card as a whole in response to the to-be-scheduled resource information being stored in the host node.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the resource management method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the resource management method according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Patent Citations

  • Message processing method and device

    CN115665073A

  • Message sending method, message receiving method, network card and computing device

    CN117176834A

  • Remote direct data access method and related equipment

    CN117891626A