Congestion control method, device, equipment, medium and product

By controlling the distribution of pre-credit packets by the receiving end network card and the data flow classification prediction of the sending end network card in RDMA technology, the First RTT problem in active transmission is solved and the network utilization rate and the reliability of data transmission are improved.

CN118368249BActive Publication Date: 2024-10-08CHINA TELECOM CORP LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410788606.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-08
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

In RDMA technology, the First RTT problem in the active transmission scheme causes the network to be underutilized. Small flows are preempted by large flows, resulting in increased delays and possible data packet loss.

Method used

By controlling the receiving end network card to allocate pre-credit packets to the sending end network card, and classifying and predicting the data flow to be transmitted on the sending end network card, scheduling data packet allocation according to the prediction results, counting the RTT gradient of the data packets, and adjusting the pre-credit scheduling strategy , to optimize data transmission.

Benefits of technology

It reduces the delay increase caused by small flows being preempted by large flows, reduces the congestion probability of sending and receiving data flows, and improves the efficiency and reliability of active transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368249B_ABST
    Figure CN118368249B_ABST
Patent Text Reader

Abstract

The present disclosure provides a congestion control method, device, equipment, medium and product, wherein the congestion control method includes: controlling the receiving end network card to allocate pre-credit packets to the sending end associated with the sending end network card; controlling the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and according to the results of the classification prediction, allocating the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams; controlling the sending end network card to count the change gradient of the RTT of the data packets, and adjusting the scheduling allocation strategy of the available pre-credit according to the change gradient. Through the embodiments of the present disclosure, the problem of First RTT is solved, the occurrence of increased delay caused by small streams being preempted by large streams is reduced, the probability of congestion of the sending and receiving data streams is reduced, and the efficiency and reliability of active transmission are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] At present, RDMA technology is widely used in intelligent computing center networks to meet the ultra-low latency and large bandwidth requirements of multiple key applications such as distributed storage, databases, deep learning training frameworks, and large models.

[0003] In the related art, an active transmission scheme is proposed, in which the link capacity is actively allocated by the receiver or a centralized controller as a credit to each active sender, so that the sender can send scheduled packets at an optimal rate to ensure high bandwidth utilization, low queuing delay and zero packet loss.

[0004] However, the First RTT (Round-Trip Time) problem in active transmission is always difficult to solve. If the sender does not send a data packet while waiting for credit, the network will not be fully utilized, and the new flow will be suspended for one RTT, which has a huge impact on small flows, because according to statistics, many small flows will end within one RTT. If it bursts data packets at a high rate, that is, unscheduled packets, it may cause sporadic traffic peaks, instantaneous queuing delays and other anomalies, and eventually lead to packet loss.

[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, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a congestion control method, apparatus, device, medium and product, which are used to overcome the First RTT problem caused by the limitations and defects of related technologies to at least a certain extent.

[0007] According to a first aspect of an embodiment of the present disclosure, a congestion control method is provided, comprising: controlling a receiving-end network card to allocate a pre-credit packet to a sending end associated with a sending-end network card; controlling the sending-end network card to classify and predict a sending / receiving data stream to be transmitted, and according to a result of the classification and prediction, allocating the pre-credit scheduling in the pre-credit packet to a data packet in the sending / receiving data stream; controlling the sending-end network card to count a change gradient of an RTT of the data packet, and adjusting an available pre-credit scheduling allocation strategy according to the change gradient.

[0008] In an exemplary embodiment of the present disclosure, before controlling the receiving end network card to allocate the pre-credit packet to the sending end network card, it also includes:

[0009] In response to the RDMA connection request generated by the RDMA software layer, a QP connection is established between the receiving end network card and the sending end network card, and data interaction between the sending end network card and the receiving end network card is implemented based on the QP connection.

[0010] In an exemplary embodiment of the present disclosure, controlling the transmitting end network card to perform classification prediction on the transmit / receive data stream to be transmitted, and allocating the pre-credit scheduling in the pre-credit packet to the data packet in the transmit / receive data stream according to the result of the classification prediction includes:

[0011] Inputting the characteristics of the transmit / receive data stream to be transmitted into the stream classifier to determine whether the transmit / receive data stream is a first type of stream or a second type of stream, wherein the characteristics include at least one of the total amount of the transmit / receive data stream, the transmission type, and the buffer size;

[0012] Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams, and sending them to the sending queue of the sending end network card;

[0013] The sending end network card is controlled to start the src_schdule_precredit process to allocate the pre-credit to the data packets in the sending queue.

[0014] In an exemplary embodiment of the present disclosure, the classification prediction result output by the flow classifier and the classified sending and receiving data flow are packaged and sent to the sending queue of the sending end network card, including:

[0015] Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams;

[0016] Arrange the sent and received data flows of the packets in descending order of priority according to the classification prediction result, the data packets of the first type of flow are smaller than the data packets of the second type of flow, and the priority of the first type of flow is higher than the priority of the second type of flow;

[0017] Pre-credit allocation is performed on the sending and receiving data streams of the packets arranged in descending order of priority;

[0018] In the pre-credit allocation process, the priority of the sending and receiving data stream of the packet not allocated with the pre-credit is increased according to a preset step value;

[0019] The packet allocated with the pre-credit is sent to the sending queue of the sending end network card.

[0020] In an exemplary embodiment of the present disclosure, inputting the characteristics of the send / receive data stream to be transmitted into the stream classifier includes:

[0021] Embedding hook functions in the user API layer, the Verb layer, and the OFED layer of the RDMA software layer to extract the features;

[0022] Controlling the hook function embedded in the user API layer to extract the total amount of transmission data flow of the sending and receiving data flow to be transmitted;

[0023] Controlling the hook function embedded in the Verb layer to extract the transmission type of the send and receive data stream to be transmitted;

[0024] Controlling the hook function embedded in the OFED layer to extract the buffer size of the send / receive data stream to be transmitted, wherein the buffer size is the size of the DMA area determined by the resource pointer of the RDMA software layer;

[0025] The total amount of the transmission data flow, the transmission type and the buffer size are normalized and input into the flow classifier.

[0026] In an exemplary embodiment of the present disclosure, controlling the sending end network card to count the change gradient of the RTT of the data packet, and adjusting the available pre-credit scheduling allocation strategy according to the change gradient includes:

[0027] Control the Dst_schdule_credit process of the receiving end network card to process the received data packet and return an ACK packet to the sending end network card, wherein the ACK packet includes the credit allocated to the current data packet;

[0028] Control the sending end network card to record the credit of the corresponding data packet according to the received ACK packet, and call the src_fix_precredit process to determine the change gradient of the RTT of the arrival of the ACK packet;

[0029] The available pre-credit scheduling allocation strategy is adjusted according to the change gradient.

[0030] In an exemplary embodiment of the present disclosure, it further includes:

[0031] Control the receiving end network card to add the data packets of the sending and receiving data stream into a polling queue and assign the same initial weight;

[0032] After the receiving end network card processes each iteration of the data packet, the weights of all the data packets in the polling queue are reduced.

[0033] In an exemplary embodiment of the present disclosure, controlling the receiving end network card to allocate the pre-credit packet to the sending end network card includes:

[0034] Controlling the receiving end network card to construct a pre-credit sorting linked list, wherein the sending end and the pre-credit corresponding to the sending end are arranged in descending order according to the total amount of allocated pre-credit;

[0035] In response to a request for creating a new send / receive data stream, determining whether a sender of the new send / receive data stream belongs to a sender in the pre-credit sorting linked list;

[0036] If it is determined that the sender of the newly created send / receive data flow belongs to a sender in the pre-credit sorting linked list, the corresponding pre-credit is allocated to the sender according to the pre-credit sorting linked list;

[0037] If it is determined that the sender of the newly created data flow does not belong to the senders in the pre-credit sorting linked list, then determining whether there is available pre-credit on the receiving end network card;

[0038] If it is determined that the receiving end network card does not have available pre-credit, the pre-credit at the head of the pre-credit sorting linked list is allocated to the sending end of the newly created sending / receiving data flow.

[0039] According to a second aspect of an embodiment of the present disclosure, there is provided a congestion control device, including:

[0040] A control module, configured to control the receiving end network card to distribute a pre-credit packet to a sending end associated with the sending end network card;

[0041] The control module is configured to control the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and allocate the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams according to the results of the classification prediction;

[0042] The control module is configured to control the sending end network card to count the change gradient of the RTT of the data packet, and adjust the scheduling allocation strategy of the available pre-credit according to the change gradient.

[0043] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the methods described above based on instructions stored in the memory.

[0044] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a program is stored, and when the program is executed by a processor, the congestion control method as described in any one of the above items is implemented.

[0045] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements any of the above-described congestion control methods when executed by a processor.

[0046] In the disclosed embodiment, a pre-credit packet is allocated to a sender associated with the sender network card by controlling the receiving-end network card, and a classification prediction is performed on the send-receive data stream to be transmitted by controlling the send-end network card, and the pre-credit scheduling in the pre-credit packet is allocated to the data packet in the send-receive data stream according to the result of the classification prediction, and then the sender network card is controlled to count the change gradient of the RTT of the data packet, and the scheduling allocation strategy of the available pre-credit is adjusted according to the change gradient, thereby solving the problem of First RTT, reducing the occurrence of increased delay caused by small streams being preempted by large streams, reducing the probability of congestion of the send-receive data stream, and improving the efficiency and reliability of active transmission.

[0047] 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

[0048] 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.

[0049] Figure 1 A schematic diagram showing an exemplary system architecture to which the congestion control solution of the embodiments of the present disclosure can be applied;

[0050] Figure 2 is a flow chart of a congestion control method in an exemplary embodiment of the present disclosure;

[0051] Figure 3 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0052] Figure 4 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0053] Figure 5 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0054] Figure 6 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0055] Figure 7 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0056] Figure 8is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0057] Fig. 9 is a flow chart of another congestion control method in an exemplary embodiment of the present disclosure;

[0058] Fig.10 is a schematic diagram of an architecture of a congestion control solution in an exemplary embodiment of the present disclosure;

[0059] Fig.11 is a schematic diagram of a feature extraction architecture of a congestion control scheme in an exemplary embodiment of the present disclosure;

[0060] Fig.12 is a schematic diagram of a scheduling architecture of a congestion control solution in an exemplary embodiment of the present disclosure;

[0061] Fig.13 is a block diagram of a congestion control device in an exemplary embodiment of the present disclosure;

[0062] Fig.14 is a block diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0063] 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.

[0064] In addition, the accompanying drawings are only schematic diagrams of the present disclosure, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0065] Figure 1A schematic diagram showing an exemplary system architecture to which the congestion control solution of the embodiments of the present disclosure can be applied.

[0066] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0067] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0068] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, etc.

[0069] In some embodiments, the congestion control method provided by the embodiments of the present disclosure is generally executed by the server 105. Accordingly, the congestion control device is generally arranged in the terminal device 103 (or the terminal device 101 or 102). In other embodiments, some terminals may have functions similar to those of the server device to execute the method.

[0070] The exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0071] Figure 2 is a flow chart of a congestion control method in an exemplary embodiment of the present disclosure.

[0072] refer to Figure 2 , congestion control methods may include:

[0073] Step S202: Control the receiving end network card to distribute the pre-credit packet to the sending end associated with the sending end network card.

[0074] In an exemplary embodiment of the present disclosure, in an RDMA communication scenario, pre-credit is a resource management mechanism for pre-allocating rights or credits for data transmission between communication nodes. This pre-credit packet is used to indicate to the receiver how many data packets the sender can send to the receiver without waiting for the receiver's confirmation. Based on this, a connection is established through the first packet transmission, and data transmission is further optimized through the pre-credit packet, so that RDMA can achieve efficient and reliable direct memory access, which is suitable for various high-performance computing and data transmission scenarios.

[0075] Step S204, controlling the transmitting end network card to classify and predict the transmit / receive data stream (referred to as QP stream) to be transmitted, and assigning the pre-credit scheduling in the pre-credit packet to the data packets in the transmit / receive data stream according to the result of the classification prediction.

[0076] In an exemplary embodiment of the present disclosure, in RDMA (Remote Direct Memory Access), QP (Queue Pair) is an important concept. A QP represents a pair of send queues (Send Queue) and receive queues (Receive Queue), which are used to send and receive data respectively. QP is the basic unit of RDMA communication and is used for direct memory access between two nodes.

[0077] In an exemplary embodiment of the present disclosure, the send / receive data traffic refers to data transmission through QP. In RDMA communication, data is transmitted through QP without CPU intervention, thereby enabling low-latency, high-bandwidth data transmission. The send / receive data traffic is usually initiated by an application, which sends data to the memory of a remote node or receives data from a remote node through RDMA operations.

[0078] Step S206: Control the sending end network card to count the change gradient of the RTT of the data packet, and adjust the scheduling allocation strategy of the available pre-credit according to the change gradient.

[0079] In the disclosed embodiment, a pre-credit packet is allocated to a sender associated with the sender network card by controlling the receiving-end network card, and a classification prediction is performed on the send-receive data stream to be transmitted by controlling the send-end network card, and the pre-credit scheduling in the pre-credit packet is allocated to the data packet in the send-receive data stream according to the result of the classification prediction, and then the sender network card is controlled to count the change gradient of the RTT of the data packet, and the scheduling allocation strategy of the available pre-credit is adjusted according to the change gradient, thereby solving the problem of First RTT, reducing the occurrence of increased delay caused by small streams being preempted by large streams, reducing the probability of congestion of the send-receive data stream, and improving the efficiency and reliability of active transmission.

[0080] Next, each step of the congestion control method is described in detail.

[0081] In an exemplary embodiment of the present disclosure, Figure 3 As shown, before controlling the receiving end network card to allocate the pre-credit packet to the sending end network card, it also includes:

[0082] Step S302, in response to the RDMA connection request generated by the RDMA software layer, a QP connection is established between the receiving end network card and the sending end network card, and data interaction between the sending end network card and the receiving end network card is implemented based on the QP connection.

[0083] In an exemplary embodiment of the present disclosure, Figure 4 As shown, controlling the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and allocating the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams according to the results of the classification prediction includes:

[0084] Step S402, inputting the characteristics of the transmit / receive data stream to be transmitted into the stream classifier to determine whether the transmit / receive data stream is a first-class stream or a second-class stream, wherein the characteristics include at least one of the total amount of the transmitted data stream, the transmission type and the buffer size.

[0085] Step S404: Packaging the classification prediction result output by the flow classifier and the classified sending and receiving data flow, and sending them to the sending queue of the sending end network card.

[0086] Step S406: Control the sending end network card to start the src_schdule_precredit process to allocate the pre-credit to the data packets in the sending queue.

[0087] In an exemplary embodiment of the present disclosure, the sending end network card starts the src_schdule_precredit process to allocate pre-credit, and the port's sending engine scans the sending queue, selects the items to be sent that have obtained pre-credit, and sends them to the uplink port of the next-hop switch until the sending queue is empty.

[0088] In an exemplary embodiment of the present disclosure, Figure 5 As shown, the classification prediction result output by the flow classifier and the classified sending and receiving data flow are packaged and sent to the sending queue of the sending end network card, including:

[0089] Step S502, encapsulating the classification prediction result output by the flow classifier and the classified sending and receiving data flow.

[0090] Step S504, arranging the packetized sending and receiving data flows in descending order of priority according to the classification prediction result, the data packets of the first type of flow are smaller than the data packets of the second type of flow, and the priority of the first type of flow is higher than that of the second type of flow.

[0091] Step S506, pre-credit allocation is performed on the sending and receiving data flows of the packets arranged in descending order of priority.

[0092] Step S508, during the pre-credit allocation process, increasing the priority of the sending and receiving data flow of the packet not allocated with the pre-credit according to a preset step value.

[0093] Step S510, sending the packet allocated with the pre-credit to the sending queue of the sending end network card.

[0094] In an exemplary embodiment of the present disclosure, the weights of all flows in the queue decrease for each iteration. It can be seen that the newly added small flow has a higher weight priority than the remaining large flow, and is first given credit for transmission. The longer the large flow is, the more time it stays in the queue, the more the priority decays, and it will not occupy the transmission bandwidth of the small flow. However, this will not bring fairness issues. The transmission opportunity of the large flow will not be completely deprived. On the one hand, the small flow will be completed quickly and leave the polling queue, and will no longer occupy credit. On the other hand, in our weight decay algorithm, after the weight is reduced to a certain extent, it will be cyclically reset to the initial value, and the large flow can be scheduled with high priority again.

[0095] In an exemplary embodiment of the present disclosure, Figure 6 As shown, inputting the characteristics of the send and receive data stream to be transmitted into the stream classifier includes:

[0096] Step S602: embedding hook functions in the user API layer, the Verb layer, and the OFED layer of the RDMA software layer to extract the features.

[0097] Step S604, controlling the hook function embedded in the user API layer to extract the total amount of transmission data flow of the sending and receiving data flow to be transmitted.

[0098] In an exemplary embodiment of the present disclosure, the user API layer is an interface for applications to communicate with RDMA, and it provides a set of APIs (Application Programming Interfaces) for applications to use in order to perform RDMA operations.

[0099] Step S606, controlling the hook function embedded in the Verb layer to extract the transmission type of the send / receive data stream to be transmitted.

[0100] In an exemplary embodiment of the present disclosure, the Verb layer is the core layer of RDMA communication, which defines a set of standard operation commands (verbs) for controlling RDMA hardware and performing RDMA operations.

[0101] In an exemplary embodiment of the present disclosure, these operation commands include sending data, receiving data, registering memory, creating QP, etc., which constitute the basic operations of RDMA communication.

[0102] Step S608, controlling the hook function embedded in the OFED layer to extract the buffer size of the send / receive data stream to be transmitted, wherein the buffer size is the size of the DMA area determined by the resource pointer of the RDMA software layer.

[0103] In an exemplary embodiment of the present disclosure, the OFED layer (OpenFabrics Enterprise Distribution Layer) is an open source RDMA software stack, which provides a set of standard RDMA drivers and libraries to support the development and use of RDMA hardware.

[0104] In an exemplary embodiment of the present disclosure, in an RDMA (Remote Direct Memory Access) application scenario, the DMA (Direct Memory Access) size refers to the amount of data transmitted in one RDMA operation. The DMA size is usually a parameter configured by the RDMA hardware and driver, which determines the size of a data transmission, thereby affecting the performance and efficiency of RDMA communication.

[0105] Step S610, normalizing the total amount of the transmission data flow, the transmission type and the buffer size, and inputting them into the flow classifier.

[0106] In an exemplary embodiment of the present disclosure, Figure 7 As shown, controlling the sending end network card to count the change gradient of the RTT of the data packet, and adjusting the available pre-credit scheduling allocation strategy according to the change gradient includes:

[0107] Step S702, controlling the Dst_schdule_credit process of the receiving end network card to process the received data packet and return an ACK packet to the sending end network card, wherein the ACK packet includes the credit allocated to the current data packet.

[0108] Step S704, controlling the sending end network card to record the credit of the corresponding data packet according to the received ACK packet, and calling the src_fix_precredit process to determine the change gradient of the RTT of the arrival of the ACK packet.

[0109] Step S706: adjusting the available pre-credit scheduling allocation strategy according to the change gradient.

[0110] In an exemplary embodiment of the present disclosure, when the RTT increases, that is, when the gradient is positive, it means that the queues of each switch on the transmission path begin to become deeper and the probability of congestion increases. At this time, current_avail_pre_credits (i.e., pre-credit) is appropriately reduced. Conversely, the gradient is negative, indicating that the congestion risk on the transmission path is decreasing, then current_avail_pre_credits is increased accordingly.

[0111] In an exemplary embodiment of the present disclosure, it is assumed that deRTT is the RTT gradient of two adjacent ACK packets, and the specific formula is as follows:

[0112] current_avail_pre_credits=current_avail_pre_credits / ((1+e+deRTT- e-deRTT) / (e+deRTT + e-deRTT)).

[0113] In an exemplary embodiment of the present disclosure, Figure 8 As shown, the congestion control method further includes:

[0114] Step S802: Control the receiving end network card to add the data packets of the sending and receiving data stream to a polling queue and assign the same initial weight.

[0115] Step S804: after the receiving end network card processes each iteration of a data packet, the weights of all data packets in the polling queue are reduced.

[0116] In an exemplary embodiment of the present disclosure, the receiving end does not have the flow prediction result of the sending end, that is, it does not know whether the current flow is a large flow or a small flow, so it adds it to the polling queue and assigns the same initial weight. After each iteration is processed, the weights of all flows in the polling queue decrease.

[0117] In an exemplary embodiment of the present disclosure, Fig. 9 As shown, controlling the receiving end network card to allocate the pre-credit packet to the sending end network card includes:

[0118] Step S902, controlling the receiving end network card to construct a pre-credit sorting linked list, in which the sending end and the pre-credit corresponding to the sending end are arranged in descending order according to the total amount of allocated pre-credit.

[0119] Step S904: in response to a request for creating a new send / receive data stream, determining whether the sender of the new send / receive data stream belongs to a sender in the pre-credit sorting linked list.

[0120] Step S906: If it is determined that the sender of the newly created send / receive data flow belongs to a sender in the pre-credit sorting linked list, the corresponding pre-credit is allocated to the sender according to the pre-credit sorting linked list.

[0121] Step S908: If it is determined that the sender of the newly created send / receive data flow does not belong to the senders in the pre-credit sorting linked list, it is determined whether the network card of the receiving end has available pre-credit.

[0122] Step S910: If it is determined that the receiving end network card does not have available pre-credit, the pre-credit at the head of the pre-credit sorting linked list is allocated to the sending end of the newly created sending / receiving data flow.

[0123] In an exemplary embodiment of the present disclosure, when a new sender stream request arrives, if there is no extra pre-credit, one is intercepted from the sender that currently has the most pre-credit, and the PC LIST (pre-credit sorted linked list) sorts the pre-credits, so the list head can be directly taken, and the pre-credit value is updated to each sender at the end of each large cycle.

[0124] In an exemplary embodiment of the present disclosure, small flows are given higher priorities at the beginning, and can start the first transmission immediately when there is a surplus of available pre-credit, thus avoiding the problem of First RTT waiting for credit. Although large flows have a lower priority at the beginning, their priority gradually increases during operation, thus avoiding the fairness problem of large flow starvation.

[0125] In an exemplary embodiment of the present disclosure, Fig.10 As shown, the present disclosure provides an architecture 1000 for implementing a congestion control solution for flow prediction and active transmission on a sending-end network card and software layer and a receiving-end network card, which is composed of three major functional bodies and three major functional modules. The three major functional bodies include: an RDMA software layer, a sending-end server network card and a receiving-end server network card. The sending-end server network card and the receiving-end server network card directly implement data interaction through a switch.

[0126] In an exemplary embodiment of the present disclosure, the RDMA software layer is used for transmission initiation and traffic prediction.

[0127] In an exemplary embodiment of the present disclosure, the network card of the sending end server is used for pre-credit allocation among flows and overall pre-credit adjustment.

[0128] In an exemplary embodiment of the present disclosure, the receiving-end server network card is used for scheduling between pre-credit sending ends and scheduling between credit flows.

[0129] In an exemplary embodiment of the present disclosure, congestion control of active transmission requires a certain prediction of the flow size to be more effective. The current prediction scheme is implemented on the switch, and features are extracted by analyzing real-time traffic. However, research work has proposed that the software layer has more transmission information. Therefore, the embodiment of the present disclosure chooses to extract transmission features on the software call stack before the transmission is initiated, and trains the flow predictor based on this information.

[0130] In an exemplary embodiment of the present disclosure, based on the analysis of the FirstRTT problem in the background technology, the credit demand required within the first RTT of the stream transmission and the credit demand for subsequent continuous transmission have different characteristics. If the former waits for the receiving end to send, the delay problem is inevitable, while the latter can be scheduled by the receiving end to avoid congestion.

[0131] In an exemplary embodiment of the present disclosure, credit is divided into pre-credit and credit. The former is used for sending packets within the first RTT during initial transmission of the stream and is scheduled by the sending end. The latter is consistent with the traditional active scheme and is scheduled by the receiving end.

[0132] In an exemplary embodiment of the present disclosure, Fig.11 As shown, the present disclosure proposes a feature extraction architecture 1100 for a congestion control solution, which implements scheduling credit based on the RDMA software layer's prediction of large and small flows, and the collaboration of senders and receivers. The feature extraction architecture 1100 adds a monitoring mechanism to the verb layer and driver layer of the RDMA transmission, extracts flow features, and trains large and small flow classifiers, thereby predicting large and small flows.

[0133] In an exemplary embodiment of the present disclosure, the transmitting end allocates pre-credits for the small stream in the first RTT, and the receiving end transmits subsequent credits.

[0134] In an exemplary embodiment of the present disclosure, in order to compensate for possible errors in the prediction scheme, the sending end adjusts the allocation of pre-credit according to the real-time status of network link congestion.

[0135] In an exemplary embodiment of the present disclosure, the First RTT problem can be solved by only requiring existing support from common switches without requiring special hardware modifications, thereby meeting the deployment requirements of large-scale heterogeneous networks in data centers.

[0136] In an exemplary embodiment of the present disclosure, Fig.11As shown, considering the error in flow prediction, the error may be misjudging a large flow as a small flow, or misjudging a small flow as a large flow. The former has the impact that the large flow has an unreasonably high priority when it starts to be sent, occupying more bandwidth. The latter is that the small flow has insufficient priority, resulting in increased transmission delay. Therefore, the embodiments of the present disclosure combine real-time network congestion information during credit scheduling at the sending and receiving ends to adjust the credit granting strategy to make up for the deficiency.

[0137] In an exemplary embodiment of the present disclosure, the flow prediction module is implemented on the sending end RDMA software layer, and the sending end RDMA software call stack is as follows: Fig.11 As shown, the feature extractor of the qp stream of the embodiment of the present disclosure embeds hook functions in the user API layer, the Verb layer, and the OFED layer of the RDMA software layer to extract the following stream features:

[0138] Stream feature 1: total amount of stream data, from the user API;

[0139] Stream feature 2: transmission type, from the Verb layer, Memory verbs: including RDMA read, write, and atomic operations, Messaging verbs: including RDMA send and receive operations.

[0140] Stream feature 3: The memory size registered by QPrdma, that is, the size of the pre-allocated buffer for transmission, comes from the DMA area size res.buf.size in the resource pointer res of qp when the OFEDrdma driver layer initializes QP.

[0141] In an exemplary embodiment of the present disclosure, the flow feature 2 is converted into a one hot vector and concatenated with the normalized flow feature 3 as the input of the predictor.

[0142] In an exemplary embodiment of the present disclosure, flow feature 1 is transformed into 0 and 1 by the 01 function "x>B*T?1:0", B is the switch bandwidth, T is the predicted RTT, 0 represents a small flow, and 1 represents a large flow, as the output of the predictor.

[0143] In an exemplary embodiment of the present disclosure, the flow predictor is a simple SVM support vector machine model, which is trained and inferred in the memory of the sending server. The predictor of the embodiment of the present disclosure can provide classification support with sufficient accuracy, with very little resource overhead and extremely low inference delay. When the qp is created, the flow size can be predicted in real time.

[0144] In an exemplary embodiment of the present disclosure, the credit scheduling module implemented on the receiving end network card is different from the current receiving end driven CC scheme. The receiving end of the embodiment of the present disclosure does not use the traditional WRR weighted polling credit allocation algorithm. The embodiment of the present disclosure redesigns the following weighted decay polling process Dst_schdule_credit to allocate credit.

[0145] In an exemplary embodiment of the present disclosure, the principle of small flow priority is adopted. The receiving end does not have the flow prediction result of the sending end, that is, the sending end does not know whether the current flow is a large flow or a small flow. It adds it to the polling queue and assigns the same initial weight. After each iteration is processed, the weights of all flows in the queue decrease.

[0146] Based on this, the newly added small flow has a higher weight priority than the remaining large flow, and is sent first. The longer the large flow stays in the polling queue, the more its priority decays, and it will not occupy the sending bandwidth of the small flow.

[0147] In an exemplary embodiment of the present disclosure, in order to ensure the fairness of sending and receiving data streams, the transmission opportunity of the large stream will not be completely deprived. On the one hand, the small stream is completed quickly and leaves the polling queue, and no longer occupies the credit. On the other hand, in the weight decay algorithm of the embodiment of the present disclosure, after the weight is reduced to a certain extent, it is cyclically reset to the initial value, and the large stream can be scheduled with high priority again. The above process can be formalized as the following pseudo code for credit scheduling within the iteration:

[0148] "dst_schdule_credit()

[0149] If a new qp connection request arrives:

[0150] Qp.priority=N / / N is the initial value of priority

[0151] Insert qp in qp_list

[0152] For qp in qp_list

[0153] Qp.priority = Qp.priority / 2+1

[0154] If Qp.priority= =0:

[0155] Qp.priority = N

[0156] Send credit to QP sourcewith max priority

[0157] If qp.srcIP not in PC_LIST:

[0158] avail_crdits=Total_credits-out_credits

[0159] if avail_crdits>1:

[0160] srcIP.credits= avail_crdits / 2

[0161] else:

[0162] srcIP.credits= 1

[0163] PC_LIST.head.credits—

[0164] Insert srIP into PC_LIST".

[0165] In an exemplary embodiment of the present disclosure, a pre-credit scheduling module is collaboratively implemented on the receiving end network card and the sending end network card. When the sending end has pre-credit, it can start the transmission of the stream without waiting for the credit of the receiving end to arrive. This is of great significance for reducing the delay of small streams and alleviating the FirstRTT problem. The pre-credit allocation of the embodiment of the present disclosure adopts a three-level scheduling strategy as follows.

[0166] 1. The first level is the pre-credit scheduling of multiple senders by the receiving end. The specific process is as follows:

[0167] Assuming that every large period T, the receiver performs an iteration and reschedules the pre-credit, each iteration can be expressed in pseudo code as follows:

[0168] "Dst_schedule_pre

[0169] Iteration begin:

[0170] Construct a pre-credit sorting list PC_list, / / PC_list saves each sender in descending order of pre-credit number

[0171] In iteration:

[0172] If a new qp request arrives:

[0173] If qp.srcIP not in PC_LIST:

[0174] avail_crdits=Total_credits-out_credits

[0175] if avail_crdits>1:

[0176] srcIP.credits= avail_crdits / 2

[0177] else:

[0178] srcIP.credits= 1

[0179] PC_LIST.head.credits—

[0180] Insert srIP into PC_LIST

[0181] Iteration end:

[0182] Return the pre-credit value to all senders according to PC LIST".

[0183] It can be seen that the receiving end adopts a uniform distribution strategy for scheduling pre-credits. When a new sender stream request arrives, if there is no extra pre-credit, one is intercepted from the sender with the most pre-credits. PC LIST sorts the pre-credits, so you can directly take the list head. The pre-credit value is updated to each sender at the end of each large cycle.

[0184] 2. The sender schedules between large and small flows. For the current QP qpi, it performs the following process for pre-credit allocation:

[0185] " If Predicate_QP_size(qpi)==1: / / Predicate_QP_size is the prediction function for the flow size provided by the flow prediction module. Returning 1 indicates that the prediction result is a large flow.

[0186] Qpi.priority = current_avail_pre_credits / / current_avail_pre_credits records the pre-credits that have not yet been allocated

[0187] current_avail_pre_credits=

[0188] current_avail_pre_credits +qpj.preority

[0189] Else: / / The prediction result is a large flow

[0190] Qpi.priority=0

[0191] Insert qpi into PC_list / / PC_list is the current qp list, sorted in descending order of priority

[0192] Qpj=max_priority(PC_list):

[0193] If qpj.priority>=0

[0194] current_avail_pre_credits=

[0195] current_avail_pre_credits +qpj.preority

[0196] Tx_enque(qpj) / / The QP that gets the pre-credit will be put into the send queue for initial transmission

[0197] For qpj in PC_list:

[0198] qpj.priority = qpj.priority + 1

[0199] if qpj.priority>current_avail_pre_credits

[0200] qpj.priority = 0".

[0201] In an exemplary embodiment of the present disclosure, small flows are given higher priorities at the beginning, and can start the first transmission immediately when there is a surplus of available pre-credit, thus avoiding the problem of First RTT waiting for credit. Although large flows have a lower priority at the beginning, their priority gradually increases during operation, thus avoiding the fairness problem of large flow starvation.

[0202] In an exemplary embodiment of the present disclosure, for a scenario in which a large number of small flows burst out, an embodiment of the present disclosure proposes adjusting the above-mentioned current_avail_pre_credits according to changes in RTT. When the RTT increases, that is, when the gradient is positive, it means that the queues of each switch on the transmission path begin to become deeper and the congestion probability increases. At this time, the current_avail_pre_credits is appropriately reduced. On the contrary, the gradient is negative, which means that the congestion risk on the transmission path is decreasing, then the current_avail_pre_credits is increased accordingly.

[0203] Assume that deRTT is the RTT gradient of two adjacent ACK packets, the specific formula is as follows:

[0204] "current_avail_pre_credits= current_avail_pre_credits / ((1+e+deRTT-e-deRTT) / (e+deRTT + e-deRTT))".

[0205] In an exemplary embodiment of the present disclosure, Fig.12 As shown, a scheduling architecture 1200 of a congestion control solution in an exemplary embodiment of the present disclosure includes the following key stages:

[0206] 1. Assume that two server network cards in a data center network are used as the source and destination of RDMA transmission, forming an RDMA transmission QP pair, and multiple switches are used for relay transmission in the middle. When the transmission starts, the source RDMA software layer, source network card, and destination network card have completed the initialization process, including the establishment of major data structures, such as PreCredit.

[0207] 2. The NIC on the sending and receiving end provides an FPGA chip, which is connected to the main memory through the PCIe module provided by the vendor, and connected to the Ethernet adapter through the MAC module provided by the vendor. In this algorithm, the credit scheduling and pre-credit function modules have been loaded into the FPGA, located between the PCIe and MAC modules, and the scheduling function of the response is initiated according to the arrival packet on the upper layer software or mac.

[0208] 3. When the user is ready to perform RDMA communication, the RDMA software layer initiates a new RDMA request to the sending network card, which sends a QP connection request to the receiving network card. The receiving network card continues to run the Dst_schdule_precredit process and returns the pre-credit PreCredit to the sending network card according to the current connection status. If the received PreCredit>0, the qp connection is successfully established, and the sending network card notifies the software layer that it can start sending.

[0209] 4. The RDMA software layer first predicts the size of the newly created send and receive data flow, encapsulates the prediction results and data, and puts them into the send queue of the source port of the sender network card. The sender network card starts the src_schdule_precredit process to allocate pre-credit. The port's send engine scans the send queue, selects the items to be sent that have obtained pre-credit, and sends them to the uplink port of the next-hop switch until the send queue is empty.

[0210] 5. The Dst_schdule_credit process of the receiving network card continues to run, responsible for processing the received data packets and returning ACK packets to the sender, containing the credit granted to the current QP.

[0211] 6. The sending network card receives the ACK packet, records the credit of the corresponding QP, and calls the src_fix_precredit process to correct the current total available precredit according to the RTT of the ACK arrival, to avoid sending a large number of small flows when the queue of the intermediate switch becomes deep.

[0212] 7. Subsequent transmissions of the current QP will be scheduled according to the credits received.

[0213] 8. When QP is sent and resources are released, relevant statistical information, such as the total amount sent, will be written into the traffic statistics file.

[0214] In an exemplary embodiment of the present disclosure, the flow predictor training process is continuously run, and the flow statistics file is used as training data to incrementally train the flow predictor.

[0215] In summary, the technical points and corresponding beneficial effects of the embodiments of the present disclosure include:

[0216] (1) Flexible and easy-to-deploy traffic prediction implementation.

[0217] (2) Predicting the large and small flows of sending and receiving data traffic to guide credit scheduling for active congestion control has been widely recognized by the industry. However, the implementation of traffic prediction is not satisfactory. The existing solutions perform prediction at the bottom layer of data transmission, which requires special support from switches.

[0218] (3) Since the prediction is made from the high level of RDMA transmission, that is, the software layer, the effect is better. Therefore, the embodiment of the present disclosure carefully analyzes the RDMA call software stack and selects features such as cache area as input to train the traffic classification predictor. This is a highly efficient and adaptable solution with very simple hardware requirements, which can be implemented on commodity-level NIC hardware and commodity switch hardware.

[0219] (4) A weight decay-based round-robin credit scheduling scheme at the receiving end.

[0220] (5) Without broadcasting the traffic prediction results, the receiving end of the embodiment of the present disclosure adopts weight decay round-robin scheduling to give priority to small flows. At the same time, fairness is guaranteed by resetting the weights, achieving the goal of taking into account the performance of both large and small flows.

[0221] (6) A three-level pre-credit scheduling scheme based on flow prediction. Although the pre-credit scheme has been introduced to control the first packet transmission of the flow to solve the FirstRTT problem of active transmission, the traditional speculative pre-credit allocation does not completely solve the problem of increased delay caused by small flows being preempted by large flows, which means that they do not fundamentally solve the FirstRTT problem. The scheme of the embodiment of the present disclosure solves this problem through three-level scheduling, that is, first, the receiving end allocates pre-credit packets among multiple sending ends, and then the sending end predicts the flow and schedules the pre-credit of large and small flows in a targeted manner. Finally, in order to avoid the situation of small flow bursts, the sending end adjusts the available pre-credit in combination with the RTT change gradient. It can be said that multiple aspects of the FirstRTT problem are taken into consideration and the optimal choice is achieved.

[0222] Based on the above, the beneficial effects of the embodiments of the present disclosure can be summarized as follows:

[0223] The current resource requirements for large language model training are enormous, and it is impossible to provide all of them by building a new data center and a new network. The congestion control of the RDMA network required for training must be implemented with a general and efficient solution. The embodiments of the present disclosure make up for the shortcomings of existing solutions both in terms of the universality of hardware requirements and the ability to handle exceptions, and are more suitable for the actual RDMA network congestion control solution of the intelligent computing center.

[0224] Corresponding to the above method embodiments, the present disclosure also provides a congestion control device, which can be used to execute the above method embodiments.

[0225] Fig.13 is a block diagram of a congestion control device in an exemplary embodiment of the present disclosure.

[0226] refer to Fig.13 , the congestion control device 1300 may include:

[0227] The control module 1302 is configured to control the receiving end network card to distribute the pre-credit packet to the sending end associated with the sending end network card.

[0228] The control module 1302 is further configured to control the transmitting end network card to perform classification prediction on the transmit / receive data stream to be transmitted, and allocate the pre-credit scheduling in the pre-credit packet to the data packets in the transmit / receive data stream according to the result of the classification prediction.

[0229] The control module 1302 is further configured to control the sending end network card to count the change gradient of the RTT of the data packet, and adjust the scheduling allocation strategy of the available pre-credit according to the change gradient.

[0230] In an exemplary embodiment of the present disclosure, before controlling the receiving end network card to allocate the pre-credit packet to the sending end network card, it also includes:

[0231] In response to the RDMA connection request generated by the RDMA software layer, a QP connection is established between the receiving end network card and the sending end network card, and data interaction between the sending end network card and the receiving end network card is implemented based on the QP connection.

[0232] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0233] Inputting the characteristics of the transmit / receive data stream to be transmitted into the stream classifier to determine whether the transmit / receive data stream is a first type of stream or a second type of stream, wherein the characteristics include at least one of the total amount of the transmit / receive data stream, the transmission type, and the buffer size;

[0234] Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams, and sending them to the sending queue of the sending end network card;

[0235] The sending end network card is controlled to start the src_schdule_precredit process to allocate the pre-credit to the data packets in the sending queue.

[0236] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0237] Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams;

[0238] Arrange the sent and received data flows of the packets in descending order of priority according to the classification prediction result, the data packets of the first type of flow are smaller than the data packets of the second type of flow, and the priority of the first type of flow is higher than the priority of the second type of flow;

[0239] Pre-credit allocation is performed on the sending and receiving data streams of the packets arranged in descending order of priority;

[0240] In the pre-credit allocation process, the priority of the sending and receiving data stream of the packet not allocated with the pre-credit is increased according to a preset step value;

[0241] The packet allocated with the pre-credit is sent to the sending queue of the sending end network card.

[0242] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0243] Embedding hook functions in the user API layer, the Verb layer, and the OFED layer of the RDMA software layer to extract the features;

[0244] Controlling the hook function embedded in the user API layer to extract the total amount of transmission data flow of the sending and receiving data flow to be transmitted;

[0245] Controlling the hook function embedded in the Verb layer to extract the transmission type of the send and receive data stream to be transmitted;

[0246] Controlling the hook function embedded in the OFED layer to extract the buffer size of the send / receive data stream to be transmitted, wherein the buffer size is the size of the DMA area determined by the resource pointer of the RDMA software layer;

[0247] The total amount of the transmission data flow, the transmission type and the buffer size are normalized and input into the flow classifier.

[0248] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0249] Control the Dst_schdule_credit process of the receiving end network card to process the received data packet and return an ACK packet to the sending end network card, wherein the ACK packet includes the credit allocated to the current data packet;

[0250] Control the sending end network card to record the credit of the corresponding data packet according to the received ACK packet, and call the src_fix_precredit process to determine the change gradient of the RTT of the arrival of the ACK packet;

[0251] The available pre-credit scheduling allocation strategy is adjusted according to the change gradient.

[0252] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0253] Control the receiving end network card to add the data packets of the sending and receiving data stream into a polling queue and assign the same initial weight;

[0254] After the receiving end network card processes each iteration of the data packet, the weights of all the data packets in the polling queue are reduced.

[0255] In an exemplary embodiment of the present disclosure, the control module 1302 is further configured to:

[0256] Controlling the receiving end network card to construct a pre-credit sorting linked list, wherein the sending end and the pre-credit corresponding to the sending end are arranged in descending order according to the total amount of allocated pre-credit;

[0257] In response to a request for creating a new send / receive data stream, determining whether a sender of the new send / receive data stream belongs to a sender in the pre-credit sorting linked list;

[0258] If it is determined that the sender of the newly created send / receive data flow belongs to a sender in the pre-credit sorting linked list, the corresponding pre-credit is allocated to the sender according to the pre-credit sorting linked list;

[0259] If it is determined that the sender of the newly created data flow does not belong to the senders in the pre-credit sorting linked list, then determining whether there is available pre-credit on the receiving end network card;

[0260] If it is determined that the receiving end network card does not have available pre-credit, the pre-credit at the head of the pre-credit sorting linked list is allocated to the sending end of the newly created sending / receiving data flow.

[0261] Since the functions of the device 1300 have been described in detail in the corresponding method embodiments, the present disclosure will not elaborate on them here.

[0262] 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.

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

[0264] 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".

[0265] Refer to the following Fig.14 1400 according to this embodiment of the present disclosure is described. Fig.14 The electronic device 1400 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.

[0266] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include but are not limited to: at least one processing unit 1410, at least one storage unit 1420, and a bus 1430 connecting different system components (including the storage unit 1420 and the processing unit 1410).

[0267] The storage unit stores a program code, which can be executed by the processing unit 1410, so that the processing unit 1410 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 processing unit 1410 can perform the method shown in the embodiment of the present disclosure.

[0268] The storage unit 1420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 14201 and / or a cache storage unit 14202 , and may further include a read-only storage unit (ROM) 14203 .

[0269] The storage unit 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 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.

[0270] Bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0271] The electronic device 1400 may also communicate with one or more external devices 1440 (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 1400, and / or may communicate with any device that enables the electronic device 1400 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 1450. In addition, the electronic device 1400 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 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via a bus 1430. 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 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0272] 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, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0273] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0274] The program product for implementing the above method according to the embodiment of the present disclosure can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0275] Among them, the readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 of the above.

[0276] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0277] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0278] In an exemplary embodiment of the present disclosure, a computer program product is also provided, which can be loaded or stored in any combination of one or more readable media, and can be written in any combination of one or more programming languages ​​to perform the program code of the present disclosure, wherein the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0279] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0280] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application 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 techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and concept of the present disclosure are indicated by the claims.

Claims

1. A congestion control method, characterized in that: include: Control the receiving end network card to distribute the pre-credit packet to the sending end associated with the sending end network card; Controlling the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and allocating the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams according to the classification and prediction results; Controlling the sending end network card to count the change gradient of the RTT of the data packet, and adjusting the available pre-credit scheduling allocation strategy according to the change gradient, including: Control the Dst_schdule_credit process of the receiving end network card to process the received data packet and return an ACK packet to the sending end network card, wherein the ACK packet includes the credit allocated to the current data packet; Control the sending end network card to record the credit of the corresponding data packet according to the received ACK packet, and call the src_fix_precredit process to determine the change gradient of the RTT of the arrival of the ACK packet; The available pre-credit scheduling allocation strategy is adjusted according to the change gradient.

2. The congestion control method according to claim 1, characterized in that: Before controlling the receiving end network card to distribute the pre-credit packet to the sending end network card, it also includes: In response to the RDMA connection request generated by the RDMA software layer, a QP connection is established between the receiving end network card and the sending end network card, and data interaction between the sending end network card and the receiving end network card is implemented based on the QP connection.

3. The congestion control method according to claim 1, characterized in that: Controlling the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and allocating the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams according to the classification prediction results includes: Inputting the characteristics of the transmit / receive data stream to be transmitted into the stream classifier to determine whether the transmit / receive data stream is a first type of stream or a second type of stream, wherein the characteristics include at least one of the total amount of the transmit / receive data stream, the transmission type, and the buffer size; Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams, and sending them to the sending queue of the sending end network card; The sending end network card is controlled to start the src_schdule_precredit process to allocate the pre-credit to the data packets in the sending queue.

4. The congestion control method according to claim 3, characterized in that: Packaging the classification prediction result output by the flow classifier and the classified sending and receiving data flow, and sending them to the sending queue of the sending end network card includes: Packaging the classification prediction results output by the flow classifier and the classified sending and receiving data streams; Arrange the sent and received data flows of the packets in descending order of priority according to the classification prediction result, the data packets of the first type of flow are smaller than the data packets of the second type of flow, and the priority of the first type of flow is higher than the priority of the second type of flow; Pre-credit allocation is performed on the sending and receiving data streams of the packets arranged in descending order of priority; In the pre-credit allocation process, the priority of the sending and receiving data stream of the packet not allocated with the pre-credit is increased according to a preset step value; The packet allocated with the pre-credit is sent to the sending queue of the sending end network card.

5. The congestion control method according to claim 2, characterized in that: Inputting the characteristics of the transmit and receive data stream to be transmitted into the stream classifier includes: Embedding hook functions in the user API layer, the Verb layer, and the OFED layer of the RDMA software layer to extract the features; Controlling the hook function embedded in the user API layer to extract the total amount of transmission data flow of the sending and receiving data flow to be transmitted; Controlling the hook function embedded in the Verb layer to extract the transmission type of the send and receive data stream to be transmitted; Controlling the hook function embedded in the OFED layer to extract the buffer size of the send / receive data stream to be transmitted, wherein the buffer size is the size of the DMA area determined by the resource pointer of the RDMA software layer; The total amount of the transmission data flow, the transmission type and the buffer size are normalized and input into the flow classifier.

6. The congestion control method according to claim 1, characterized in that: Also includes: Controlling the receiving end network card to add the data packets of the sending and receiving data stream into a polling queue and assigning the same initial weight; After the receiving end network card processes each iteration of the data packet, the weights of all the data packets in the polling queue are reduced.

7. The congestion control method according to claim 1, characterized in that: Controlling the receiving end network card to distribute the pre-credit packet to the sending end network card includes: Controlling the receiving end network card to construct a pre-credit sorting linked list, wherein the sending end and the pre-credit corresponding to the sending end are arranged in descending order according to the total amount of allocated pre-credit; In response to a request for creating a new send / receive data stream, determining whether a sender of the new send / receive data stream belongs to a sender in the pre-credit sorting linked list; If it is determined that the sender of the newly created send / receive data flow belongs to a sender in the pre-credit sorting linked list, the corresponding pre-credit is allocated to the sender according to the pre-credit sorting linked list; If it is determined that the sender of the newly created data flow does not belong to the senders in the pre-credit sorting linked list, then determining whether there is available pre-credit on the receiving end network card; If it is determined that the receiving end network card does not have available pre-credit, the pre-credit at the head of the pre-credit sorting linked list is allocated to the sending end of the newly created sending / receiving data flow.

8. A congestion control device, characterized in that: include: A control module, configured to control the receiving end network card to distribute a pre-credit packet to a sending end associated with the sending end network card; The control module is configured to control the sending end network card to classify and predict the sending and receiving data streams to be transmitted, and allocate the pre-credit scheduling in the pre-credit packet to the data packets in the sending and receiving data streams according to the results of the classification prediction; The control module is configured to control the sending end network card to count the change gradient of the RTT of the data packet, and adjust the scheduling allocation strategy of the available pre-credit according to the change gradient, including: Control the Dst_schdule_credit process of the receiving end network card to process the received data packet and return an ACK packet to the sending end network card, wherein the ACK packet includes the credit allocated to the current data packet; Control the sending end network card to record the credit of the corresponding data packet according to the received ACK packet, and call the src_fix_precredit process to determine the change gradient of the RTT of the arrival of the ACK packet; The available pre-credit scheduling allocation strategy is adjusted according to the change gradient.

9. An electronic device, characterized in that: include: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the congestion control method according to any one of claims 1 to 7 based on instructions stored in the memory.

10. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the congestion control method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the congestion control method according to any one of claims 1 to 7 is implemented.