Congestion control method, network card device, storage medium and program product
By using network status detection messages and historical bottleneck bandwidth occupancy in RDMA networks to adjust congestion control parameters, the problems of high packet loss rate and slow congestion control delay in RDMA networks are solved, and fast and accurate congestion control effects are achieved.
Patent Information
- Application Number
- CN202410362684.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-09-30
AI Technical Summary
In existing RDMA networks, high packet loss rates lead to performance degradation. Existing congestion control methods such as PFC and DCQCN have problems such as large delays and slow speed convergence, and cannot effectively alleviate the unfairness between data flows.
The network status information of nodes on the data path is detected through network status detection messages. Combined with the historical bottleneck bandwidth occupancy rate, the current bottleneck bandwidth occupancy rate is generated, and the congestion control parameters are directly adjusted to perform congestion control. The low latency and high parallelism advantages achieved by hardware are used to improve the accuracy and speed of parameter adjustment.
It achieves fast and accurate congestion control, reduces processing delays, and improves network performance and data flow fairness.
Smart Images

Figure CN120729791A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a congestion control method, a network card device, a storage medium, and a program product. Background Art
[0002] RDMA (Remote Direct Memory Access) enables the Network Interface Card (NIC) to directly read and write memory data through the memory region mechanism, bypassing the kernel to avoid data copying. It has now become the mainstream network solution in data centers.
[0003] RDMA uses a packet loss retransmission mechanism, so packet loss can degrade RDMA network performance. To reduce the packet loss rate, some solutions use PFC (Priority-based Flow Control) to perform flow control at the port level, reducing the packet loss rate.
[0004] PFC cannot limit data flows, so congestion control methods for data flows have emerged, such as DCQCN (Data Center Quantized Congestion Notification). DCQCN uses explicit congestion control flags to determine whether a data flow with that flag is congested. If congestion is determined, the congestion control algorithm is further scheduled to perform congestion control. However, this method suffers from long congestion control delays and slow speed convergence. Summary of the Invention
[0005] Multiple aspects of the present application provide a congestion control method, a network card device, a storage medium, and a program product for better performing congestion control.
[0006] An embodiment of the present application provides a congestion control method, applied to a network interface card (NIC) device of a sending node. The method includes: detecting current network status information of at least one other node on a data path where the sending node is located based on a network status detection message; generating a current bottleneck bandwidth occupancy rate used in current congestion control based on the current network status information of the at least one other node and a historical bottleneck bandwidth occupancy rate used in historical congestion control; if congestion is determined to have occurred based on the current bottleneck bandwidth occupancy rate, adjusting congestion control parameters currently used by the NIC device based on the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters; and performing congestion control on data traffic to be sent by the NIC device based on the new congestion control parameters.
[0007] An embodiment of the present application further provides a network card device, which is a sending node and includes: a hardware-implemented congestion control module, a scheduling module, a sending module, and a receiving module; the scheduling module is configured to detect current network status information of other nodes on a data path where the sending node is located based on a network status detection message, and provide the information to the congestion control module; there is at least one other node, the network status detection message is sent by the sending module, and the current network status information is received by the receiving module; the congestion control module is configured to generate a current bottleneck bandwidth occupancy rate used in current congestion control based on the current network status information of the at least one other node and a historical bottleneck bandwidth occupancy rate used in historical congestion control; and adjust congestion control parameters currently used by the network card device based on the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters, and provide the new congestion control parameters to the scheduling module, so that the scheduling module can perform congestion control on data traffic to be sent by the network card device based on the new congestion control parameters.
[0008] An embodiment of the present application also provides a computer device, which includes the network card device provided in the embodiment of the present application.
[0009] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the congestion control method.
[0010] An embodiment of the present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in the congestion control method.
[0011] In an embodiment of the present application, a congestion control method for a network card device is provided. In this congestion control method, the current network status information of other nodes on the data path of a sending node is detected using a network status detection message. Based on the current network status information of these nodes and taking into account the historical bottleneck bandwidth occupancy used in historical congestion control, a current bottleneck bandwidth occupancy is generated. Whether congestion has occurred is determined based on the current bottleneck bandwidth occupancy. If congestion has occurred, the congestion control parameters currently used by the network card device are adjusted directly based on the current bottleneck bandwidth occupancy, and congestion control is performed based on the adjusted congestion control parameters. In this process, the current bottleneck bandwidth occupancy used to determine whether congestion has occurred can be directly used to adjust the congestion control parameters when congestion is determined, without invoking a separate congestion parameter adjustment algorithm, thereby accelerating congestion control convergence. Furthermore, based on the network status detection technology, more accurate network status information can be obtained. The bottleneck bandwidth occupancy generated based on the network status information can then be used to determine congestion and adjust the congestion control parameters, thereby improving the accuracy of parameter adjustment and the effectiveness of congestion control.
[0012] Furthermore, the congestion control method provided in the embodiment of the present application can be applied to network card devices based on hardware implementation, such as network card devices based on FPGA, CPLD or ASIC implementation. It can fully utilize the advantages of low latency and high parallelism of hardware implementation, reduce congestion control processing delay, and improve the throughput capacity of messages carrying network status information through multi-stage pipelines. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0014] Figure 1 A schematic diagram of the structure of a congestion control network system provided in an embodiment of the present application;
[0015] Figure 2 A flowchart of a congestion control method provided in an embodiment of the present application;
[0016] Figure 3 Flowchart of another congestion control method provided by an embodiment of the present application
[0017] Figure 4 A schematic diagram of the structure of a network card device provided in an embodiment of the present application;
[0018] Figure 5 A schematic diagram of the structure of a congestion control module provided in an embodiment of the present application;
[0019] Figure 6 A schematic diagram of the structure of a scheduling module provided in an embodiment of the present application;
[0020] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) are in compliance with relevant laws and standards.
[0023] High bandwidth, low latency, and high reliability are fundamental requirements for current data center applications. Remote Direct Memory Access (RDMA), through its Memory Region mechanism, enables network interface cards (NICs) to directly read and write memory data, eliminating data copies. It has become a mainstream network solution for data centers. Due to RDMA's retransmission mechanism, packet loss can degrade RDMA network performance. Existing solutions often rely on priority-based flow control (PFC) to achieve low packet loss rates. PFC controls flow based on ports and their priorities without distinguishing between data flows, which can lead to unfairness between data flows and even PFC storms. Consequently, the industry has proposed using data flow-specific congestion control methods to mitigate PFC's shortcomings. DCQCN, a mainstream congestion control algorithm, uses displayed congestion marking signals to infer congestion levels and implement debugging. However, its response to congestion is delayed, and congestion markings cannot guide speed regulation, resulting in slow convergence. Swift, another mainstream congestion control algorithm, adjusts the speed based on the delay of each hop in the data path and RTT (Round-Trip Time). It relies on self-developed network cards and sending machines, and has large processing delays. The processing delay is only adapted to 100Gbps networks and is incompatible with the delay caused by data flow priority. The related functions are only supported on its self-developed switches. The method is generally applicable and has low performance.
[0024] To this end, a congestion control method for a network card device is provided. In this congestion control method, the current network status information of other nodes on the data path of a sending node is detected using a network status detection message. Based on the current network status information of these nodes and taking into account the historical bottleneck bandwidth occupancy used in historical congestion control, a current bottleneck bandwidth occupancy is generated. Whether congestion has occurred is determined based on the current bottleneck bandwidth occupancy. If congestion is determined to have occurred, the congestion control parameters currently used by the network card device are adjusted directly based on the current bottleneck bandwidth occupancy, and congestion control is performed based on the adjusted congestion control parameters. In this process, the current bottleneck bandwidth occupancy used to determine whether congestion has occurred can be directly used to adjust the congestion control parameters when congestion is determined, eliminating the need to invoke a separate congestion parameter adjustment algorithm. Consequently, congestion control converges quickly. Furthermore, the network status detection technology can obtain more accurate network status information, and the bottleneck bandwidth occupancy generated based on the network status information can be used to determine congestion and adjust the congestion control parameters, thereby improving parameter adjustment accuracy and congestion control effectiveness.
[0025] Furthermore, the congestion control method provided in the embodiments of the present application can be applied to network card devices based on hardware implementation, such as network card devices based on FPGA (Field Programmable Gate Array), CPLD (Complex Programmable Logic Device) or ASIC (Application Specific Integrated Circuit). It can fully utilize the advantages of low latency and high parallelism of hardware implementation, reduce congestion control processing delay, and improve the throughput of messages carrying network status information through multi-stage pipelines.
[0026] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0027] Figure 1 This is a structural diagram of a congestion control network system provided in an embodiment of the present application. Figure 1As shown, the system may include: a sending node 10 and a receiving node 30, and one or more intermediate hop nodes 20 may be included between the sending node 10 and the receiving node 30. The sending node (Sender) or the receiving node (Receiver) may be any network device with network communication capabilities, and the network interface card (NIC) device in the sending node or the receiving node is not limited. NIC devices include, but are not limited to, smart NICs and onboard NICs. The intermediate hop nodes 20 may be any network device with forwarding capabilities, including, but not limited to, switches, routers, or bridges.
[0028] In practical applications, various messages, such as data packets and control messages, sent from sending node 10 are forwarded by intermediate hop node 20 and transmitted to receiving node 30. During data transmission, sending node 10 periodically or irregularly detects congestion on the link and performs congestion control (CC) based on the congestion detection results. Control messages sent by sending node 10 during congestion control are referred to as network status detection messages. Network status detection messages are used to detect the current network status of intermediate hop nodes or receiving nodes. This current network status information includes, but is not limited to, INT (in-band network telemetry) information. Accordingly, network status detection messages may also be referred to as INT messages.
[0029] See also Figure 1 , the sending node 10 sends a network status detection message (such as an INT message). When the intermediate hop node 20 receives the network status detection message, it detects its own current network status information and adds its own current network status information to the received network status detection message to form a new network status detection message. It then sends the new network status detection message to the next intermediate hop node 20 or the receiving node 30. After receiving the network status detection message, the receiving node 30 returns a network status response message to the sending node 10. The network status response message includes the current network status information of each intermediate hop node 20 and the current network status information of the receiving node 30. The sending node 10 obtains the current network status information of each other node (including the intermediate hop node and the receiving node) on its data path from the network status response message and performs congestion control based on the current network status information of each other node.
[0030] In the embodiments of the present application, the manner in which the receiving node 30 generates the network status response message is not limited. In an optional embodiment, after receiving the network status detection message, the receiving node 30 parses the network status detection message to obtain the current network status information of each intermediate hop node 20, and detects the current network status information of the receiving node 30 itself. According to the format of the network status response message, the current network status information of each intermediate hop node 20 and the current network status information of the receiving node 30 itself are encapsulated to obtain a network status response message, and the network status response message is sent to the sending node 10 via one or more intermediate hop nodes 20. In another optional embodiment, after receiving the network status detection message, the receiving node 30 detects its own current network status information, adds the detected current network status information to the received network status detection message, and modifies the type field value of the network status detection message from the first value indicating the network status detection message to the second value indicating the network status response message, to obtain a network status response message. The type field is used to indicate the type of the message. If it takes a first value, such as 0, it indicates a network status detection message. If it takes a second value, such as 1, it indicates a network status response message.
[0031] Here, it is explained that Figure 1 In the illustrated network system, an example is given in which the data path from the sending node 10 to the receiving node 30 includes an intermediate hop node 20, but the present invention is not limited thereto. In some special scenarios, there may not be an intermediate hop node 20 between the sending node 10 and the receiving node 30.
[0032] For the data path from the sending node 10 to the receiving node 30, the embodiment of the present application provides a high-precision, low-latency and fast-convergence congestion control method. The method is a congestion control method based on network detection technology (such as in-band network telemetry technology). The sending node detects the network status information of each hop on the data path through a network status detection message, and calculates the bandwidth occupancy of each hop on the data path based on this. The bandwidth occupancy of each hop is related to the congestion situation of the hop, and then judges the congestion situation and adjusts the congestion control parameters (such as the sending rate) according to the bottleneck bandwidth occupancy on the data path to achieve congestion control. In addition, because the network detection technology can more accurately detect various types of network status information, and the bottleneck bandwidth occupancy for judging whether congestion occurs on the data path is not only more accurate, but also when it is judged that congestion occurs, the bottleneck bandwidth occupancy can directly participate in the adjustment of congestion control parameters (such as the sending rate and the sending window length), without the need for heuristic speed regulation, the speed regulation is more accurate and the convergence is faster.
[0033] The following describes the process of congestion control performed by the sending node. Figure 2The present invention provides a flowchart of a congestion control method, which can be applied to a network card device of a sending node. Figure 2 , the method may include the following steps:
[0034] 201. Detect current network status information of other nodes on a data path where a sending node is located based on a network status detection message, where the other node is at least one.
[0035] 202. Generate a current bottleneck bandwidth occupancy rate used in current congestion control according to current network status information of at least one other node and historical bottleneck bandwidth occupancy rates used in historical congestion control.
[0036] 203. When congestion is determined to have occurred according to the current bottleneck bandwidth occupancy rate, adjust the congestion control parameters currently used by the network card device according to the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters.
[0037] 204. Perform congestion control on the data traffic to be sent by the network card device according to the new congestion control parameters.
[0038] In this embodiment, the network status detection message sent by the sending node can be a detection message using any network detection technology, including but not limited to INT messages and ONT (Out-band Network Telemetry) messages. The network status detection message sent by the sending node is transmitted to the receiving node via a data path. In addition to the sending node, the data path also includes one or more other nodes. If the number of other nodes is one, the data path includes the sending node and the receiving node; if the number of other nodes is multiple, the data path may include the sending node, one or more intermediate hop nodes, and the receiving node.
[0039] For the intermediate hop nodes on the data path, when the intermediate hop node receives the network status detection message, it detects its own current network status information, adds its own current network status information to the received network status detection message to form a new network status detection message, and sends the new network status detection message to the next intermediate hop node or the receiving node.
[0040] After receiving the network status probe message, the receiving node on the data node returns a network probe response message to the sending node. If the data path does not include any intermediate hops, the network probe response message includes the current network status information of the receiving node. If the data path does include intermediate hops, the network probe response message includes the current network status information of each intermediate hop and the receiving node. The method for generating the network probe response message can be found in the description above and will not be repeated here.
[0041] In this embodiment, the network card of the sending node can initiate network status detection on the data path where it is located at a certain time interval or irregularly according to various protocols such as network protocols or congestion control protocols. In the embodiment of the present application, the implementation method of the network status detection message is not limited. The network status detection message can be implemented as an independent message, that is, different from the data message or data packet transmitted on the data path; or, the network status detection message can also be integrated into the data message or data packet for implementation. Regardless of the implementation method, the network status detection message includes a message header and a message body. The message header is used to indicate that the message is a message for detecting network status information or is used to indicate that the message has a network status information detection function. The message body in the network status detection message is used to carry the current network status information of other nodes. Optionally, according to the functions of the message header and the message body, the message header can be called a probe header, and the current network status information of other nodes carried in the message body is called metadata (MD) information.
[0042] The probe header includes at least a probe identifier, which indicates that the message is a network status probe message. It may also include a sender identifier for identifying the sending node, a hop limit (i.e., the maximum number of hops allowed for the message transmission), and the current hop count. Upon receiving the network status probe message, the node automatically determines whether the current hop count has reached the hop limit. If not, it increments the current hop count by 1 and continues to send the network status probe message to the next hop. Upon receiving the network status probe message, each hop on the data path other than the sending node writes its own current network status information as MD information.
[0043] by Figure 1 For example, the red part of the network status detection message represents the detection header, and the white part represents the message body; after the network status detection message passes through the first intermediate hop node 20, a yellow part is added, and the yellow part represents the current network status information of the first intermediate hop node 20, which serves as the MD information in the network status detection message; after the network status detection message passes through the second intermediate hop node 20, a green part is added, and the green part represents the current network status information of the second intermediate hop node 20, which also serves as the MD information in the network status detection message; and so on, after passing through several intermediate hop nodes 20, the network status detection message arrives at the receiving node 30. At this time, the network status detection message includes the current network status information of multiple intermediate hop nodes 20, and the current network status information of different intermediate hop nodes 20 is distinguished by different colors. The receiving node 30 generates a network status response message based on the received network status detection message, such as Figure 1The network status response message shown in FIG. 1 includes the current network status information of each intermediate hop node 20 in the detection header and message body of the network status detection message. Figure 1 The network status response message does not show the current network status information of the receiving node itself, but it does not mean that Figure 1 The network status response message does not carry the current network status information of the receiving node 30 itself.
[0044] In this embodiment, the specific current network status information of each intermediate hop node and receiving node detected by the network status detection message is not limited. Considering that the bandwidth occupancy rate of each intermediate hop node and receiving node is used for congestion control in the embodiment of the present application, the current network status information can include any status information that can assist in calculating the bandwidth occupancy rate, such as but not limited to: device number (device D), buffer queue length (denoted as qlen), the amount of data sent by the egress queue, and the sending timestamp (denoted as txTimestamp); further optionally, it can also include a rate code (denoted as PT), a congestion identifier, etc.
[0045] For any node device in an intermediate hop node or receiving node, the device number is the identifier of these node devices and is used to uniquely identify the node device. The buffer queue length refers to the number of data tasks cached in the buffer queue corresponding to the node device. The buffer queue is also the queue for cached data tasks. The amount of data sent by the egress queue represents the amount of data sent by the egress queue each time, including but not limited to: the number of bytes sent (denoted as txBytes) and the number of bits sent. The number of bytes sent by the egress queue represents the number of bytes sent by the egress queue each time; the number of bits sent by the egress queue represents the number of bits sent by the egress queue each time. The sending timestamp records the timestamp of the egress queue sending data outward. The rate code can identify the network bandwidth type. Different rate codes correspond to different network bandwidths, such as 40Gbps, 100Gbps, and 200Gbps. There is a certain relationship between congestion processing delay and network bandwidth. The smaller the congestion processing delay, the larger the network bandwidth can be supported. In the embodiment of the present application, carrying the rate code in the network status detection message can reflect the requirements of each node for congestion processing delay to a certain extent. The congestion identifier is used to indicate whether congestion has occurred on the current data path. It should be noted that the purpose of this case is to avoid congestion. If congestion does not occur, the congestion identifier will not be marked as valid. However, if congestion still occurs after the congestion control in this case, the congestion identifier will be marked as invalid so that other control algorithms can intervene to quickly resolve the congestion control.
[0046] When the current network status information of at least one other node on the data path where the sending node is located is detected, referring to step 202, the current bottleneck bandwidth occupancy used in the current congestion control can be generated based on the current network status information of the at least one other node and the historical bottleneck bandwidth occupancy used in the historical congestion control.
[0047] In this embodiment, the sending node can continuously perform congestion control. Each time congestion control is performed, the bottleneck bandwidth occupancy rate is determined. The bottleneck bandwidth occupancy rate can be understood as the maximum bandwidth occupancy rate allowed on the data path where the sending node is located. For details on how to calculate the bottleneck bandwidth occupancy rate, please refer to the subsequent embodiments.
[0048] For ease of understanding and distinction, the congestion control initiated by the sending node in the past time period is referred to as historical congestion control, and the bottleneck bandwidth occupancy determined by the historical congestion control is referred to as the historical bottleneck bandwidth occupancy. The congestion control initiated at the current time is referred to as current congestion control, and the bottleneck bandwidth occupancy determined in this congestion control is referred to as current bottleneck bandwidth occupancy. In this embodiment, when calculating the current bottleneck bandwidth occupancy used in this congestion control, not only the current network status information of at least one other node is considered, but also the historical bottleneck bandwidth occupancy used in the historical congestion control is considered. Introducing the historical bottleneck bandwidth occupancy to iterate the bottleneck bandwidth occupancy can play a smoothing role and prevent sudden changes in bandwidth occupancy. The embodiment of the present application does not limit the number of historical bottleneck bandwidth occupancies used. The historical bottleneck bandwidth occupancies in the previous congestion control can be used to participate in the iteration, or the historical bottleneck bandwidth occupancies in the previous M congestion controls can be used to participate in the iteration, where M is a positive integer greater than or equal to 2.
[0049] Optionally, an implementation method of step 202 includes: generating the current bandwidth occupancy of at least one other node based on the current network status information and historical network status information of at least one other node; determining the target bandwidth occupancy corresponding to the data path where the sending node is located based on the current bandwidth occupancy of at least one other node; and generating the current bottleneck bandwidth occupancy based on the target bandwidth occupancy and the historical bottleneck bandwidth occupancy.
[0050] This embodiment does not limit the implementation method of generating the current bandwidth occupancy rate of at least one other node based on the current network status information and historical network status information of at least one other node. Several exemplary methods are described below.
[0051] Method 1: For any other node, a first bandwidth occupancy is predicted based on the buffer queue length in the current network status information of the other node, the buffer queue length in the historical network status information, and the maximum transmission bandwidth of the other node. For any other node, its current bandwidth occupancy can be determined based on its first bandwidth occupancy.
[0052] In practical applications, when predicting the first bandwidth occupancy, one of the buffer queue lengths in the current network status information of other nodes and the buffer queue lengths in the historical network status information can be selected, either the largest or the smallest, and the selected buffer queue length can be used to calculate the first bandwidth occupancy. The selected buffer queue length is divided by the maximum transmission bandwidth of the other node, and the first bandwidth occupancy is obtained based on the division result. For example, a fixed value can be added to or subtracted from the division result to obtain the first bandwidth occupancy.
[0053] Preferably, for any other node, its first bandwidth occupancy rate can be calculated according to formula (1).
[0054]
[0055] In formula (1), U qlen Indicates the first bandwidth occupancy of any other node (taking the i-th node as an example), which is the predicted bandwidth occupancy; qlen i Indicates the buffer queue length in the current network status information of any other node (i.e., the i-th node); pre-qlen i represents the buffer queue length in the historical network status information of any other node (i.e., the i-th node). In formula (1), the queue buffer length in the historical network status information during the previous congestion control process is taken as an example; B i Indicates the maximum transmission bandwidth of any other node (i.e., the i-th node); uint len It represents the number of data tasks in the buffer queue of any other node (i.e., the i-th node), which can also be called the number of bytes of the egress queue unit. T represents the preset RTT, and max() represents the function of taking the maximum value.
[0056] After obtaining the first bandwidth occupancy rate, the first bandwidth occupancy rate may be used as the current bandwidth occupancy rate; or a fixed value may be added to or subtracted from the first bandwidth occupancy rate to obtain the current bandwidth occupancy rate; or the first bandwidth occupancy rate may be divided or multiplied by a constant coefficient to obtain the current bandwidth occupancy rate; however, the present invention is not limited to the above examples.
[0057] Method 2: Calculate the second bandwidth occupancy rate based on the send timestamp and sent data volume in the current network status information of any other node, the send timestamp and sent data volume in the historical network status information, and the maximum transmission bandwidth of any other node. For any other node, its current bandwidth occupancy rate can be determined based on its second bandwidth occupancy rate.
[0058] In actual applications, when predicting the second bandwidth occupancy rate, various operations such as addition and subtraction can be performed on the "number of bytes sent by the egress queue in the current network status information of other nodes" and the "number of bytes sent by the egress queue in the historical network status information of other nodes" to obtain a first operation result; various operations such as addition and subtraction can be performed on the "sending timestamp in the current network status information of other nodes" and the "sending timestamp in the historical network status information of other nodes" to obtain a second operation result; various operations can be performed on the first operation result, the second operation result and the maximum transmission bandwidth of other nodes to obtain a second bandwidth occupancy rate.
[0059] Preferably, for any other node, its second bandwidth occupancy rate can be calculated according to formulas (2) and (3).
[0060]
[0061]
[0062] Among them, txBytes i Indicates the number of bytes sent by the egress queue in the current network status information of any other node (i.e., the i-th node); pre_txBytes i Indicates the number of bytes sent by the egress queue in the historical network status information of any other node (i.e., the i-th node). In formula (2), the number of bytes sent in the historical network status information during the previous congestion control process is used as an example. i Indicates the sending timestamp of the egress queue in the current network status information of any other node (i.e., the i-th node); pre_txTimestamp i Indicates the sending timestamp of the egress queue in the historical network status information of any other node (i.e., the i-th node). In formula (2), the sending timestamp in the historical network status information during the previous congestion control process is used as an example. i Indicates the predicted bandwidth; B i represents the maximum transmission bandwidth of any other node (i.e., the i-th node); U txRate represents the second bandwidth occupancy of any other node (ie, the i-th node).
[0063] After obtaining the second bandwidth occupancy rate, the second bandwidth occupancy rate may be used as the current bandwidth occupancy rate; or a fixed value may be added to or subtracted from the second bandwidth occupancy rate to obtain the current bandwidth occupancy rate; or the second bandwidth occupancy rate may be divided or multiplied by a constant coefficient to obtain the current bandwidth occupancy rate; however, the present invention is not limited to the above examples.
[0064] Method 3: For any other node, a first bandwidth occupancy rate is predicted based on the buffer queue length in the current network status information of any other node, the buffer queue length in the historical network status information, and the maximum transmission bandwidth of any other node; a second bandwidth occupancy rate is calculated based on the sending timestamp and sent data volume in the current network status information of any other node, the sending timestamp and sent data volume in the historical network status information, and the maximum transmission bandwidth of any other node; and a current bandwidth occupancy rate of any other node is generated based on the first bandwidth occupancy rate and the second bandwidth occupancy rate of any other node.
[0065] For any other node, after predicting the first bandwidth occupancy and the second bandwidth occupancy of the any other node, various operations such as weighted summation, averaging, maximum value or minimum value are performed on the first bandwidth occupancy and the second bandwidth occupancy to obtain the current bandwidth occupancy.
[0066] Alternatively, assuming that the i-th node is taken as an example, the bandwidth occupancy rate is recorded as U i , calculate the bandwidth occupancy rate according to formula (4).
[0067] U i =U qlen +U txRate ......(4)
[0068] In this embodiment, after determining the current bandwidth occupancy of at least one other node, a target bandwidth occupancy can be determined based on the current bandwidth occupancy of at least one other node. The target bandwidth occupancy is the initial bottleneck bandwidth occupancy of the data path where the sending node is located; the current bottleneck bandwidth occupancy is generated based on the target bandwidth occupancy and the historical bottleneck bandwidth occupancy.
[0069] Optionally, the current bandwidth occupancy with the largest or smallest value can be selected from the current bandwidth occupancy of at least one other node as the target bandwidth occupancy; or, the current bandwidth occupancy of at least one other node can be weighted summed or averaged to obtain the target bandwidth occupancy, but is not limited to this.
[0070] Optionally, the maximum or minimum value of the target bandwidth occupancy rate and the historical bottleneck bandwidth occupancy rate may be selected as the current bottleneck bandwidth occupancy rate. Alternatively, the target bandwidth occupancy rate and the historical bottleneck bandwidth occupancy rate may be weighted summed or averaged to obtain the current bottleneck bandwidth occupancy rate, but the present invention is not limited thereto.
[0071] For example, suppose there are N other nodes on a data path, where N is a positive integer. The bandwidth occupancy rate with the largest value is selected from the current bandwidth occupancy rates of the N other nodes as the target bandwidth occupancy rate. Assume that the target bandwidth occupancy rate is recorded as U 1 The current bottleneck bandwidth occupancy rate is recorded as U, the historical bottleneck bandwidth occupancy rate is recorded as pre_U, and the preset update rate is recorded as α. The preset update rate is a constant coefficient greater than 0 and less than 1, which can be flexibly set as needed.
[0072] Preferably, for the bottleneck bandwidth occupancy rate of the data path where the sending node is located in the current congestion control, the bottleneck bandwidth occupancy rate can be calculated according to formula (5):
[0073] U=αU 1 +(1-α)pre_U......(5)
[0074] Regardless of which of the above methods is used to obtain the current bottleneck bandwidth occupancy rate, when the current bottleneck bandwidth occupancy rate is obtained, referring to step 203, first, it is determined based on the current bottleneck bandwidth occupancy rate whether congestion occurs on the data path where the sending node is located; further, when it is determined based on the current bottleneck bandwidth occupancy rate that congestion occurs, the congestion control parameters currently used by the network card device are adjusted based on the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters.
[0075] This embodiment does not limit the implementation method of determining whether congestion occurs on the data path where the sending node is located based on the current bottleneck bandwidth occupancy. For example, the current bottleneck bandwidth occupancy can be compared with the set bandwidth occupancy; when the current bottleneck bandwidth occupancy is greater than the set bandwidth occupancy, it is determined that congestion occurs; when the current bottleneck bandwidth occupancy is less than or equal to the set bandwidth occupancy, it is determined that no congestion occurs. The set bandwidth occupancy can be flexibly set as needed. Of course, the ratio of the current bottleneck bandwidth occupancy to the set bandwidth occupancy can also be calculated. When the ratio is greater than the set ratio threshold, it is determined that congestion occurs; when the ratio is less than or equal to the set ratio threshold, it is determined that no congestion occurs. The set bandwidth occupancy and the set ratio threshold can be flexibly set as needed, and the ratio threshold can be but not limited to 90%, 95%, etc.
[0076] In this embodiment, when congestion is determined to have occurred based on the bottleneck bandwidth occupancy rate, the congestion control parameters currently used by the network card device can be directly adjusted using the bottleneck bandwidth occupancy rate, without invoking other congestion control algorithms. This has the advantages of low congestion control delay and fast convergence. The congestion control parameters currently used by the network card device include, but are not limited to, the current send window length and the current send rate. The current send window length can be understood as the size of the currently used send window, and the current send rate is the currently used send rate. In this embodiment, the send window is used to limit the transmission of data packets to achieve congestion control purposes, and therefore it can also be referred to as the congestion window.
[0077] Optionally, when the bottleneck bandwidth occupancy rate is greater than the set bandwidth occupancy rate, the congestion control parameter currently used by the network card device can be adjusted downward, that is, the congestion control parameter currently used can be adjusted in a decreasing direction. The reduction range can be flexibly set as needed and there is no restriction on this.
[0078] Further, optionally, when the current bottleneck bandwidth occupancy is greater than the set bandwidth occupancy, the congestion control parameter currently used by the network card device is adjusted downward according to the ratio of the set bandwidth occupancy to the current bottleneck bandwidth occupancy to obtain a new congestion control parameter. Assume that the set bandwidth occupancy is denoted as U target , the bottleneck bandwidth occupancy rate is recorded as U; the ratio of bandwidth occupancy rate to the bottleneck bandwidth occupancy rate is set as U target / U, the current sending rate is recorded as rate, and the adjusted sending rate is recorded as rate 1 . Will U target / U is multiplied by rate to obtain the result, and the adjusted sending rate is obtained based on the multiplication result. Alternatively, a configurable constant is added or subtracted from the multiplication result to obtain the adjusted sending rate. The adjusted sending rate is multiplied by the preset RTT to obtain the adjusted sending window size.
[0079] Further optionally, based on the ratio of the current bottleneck bandwidth occupancy rate to the set bandwidth occupancy rate, the congestion control parameter currently used by the network card device is adjusted downward to obtain a new congestion control parameter, including: generating a basic multiplication coefficient based on the ratio of the current bottleneck bandwidth occupancy rate to the set bandwidth occupancy rate and a preset update coefficient, the basic multiplication coefficient being greater than 0 and less than 1; selecting the larger one from the basic multiplication coefficient and the protection multiplication coefficient as the target multiplication coefficient, the protection multiplication coefficient being greater than 0 and less than 1; and multiplicatively adjusting the congestion control parameter currently used by the network card device based on the target multiplication coefficient to obtain the new congestion control parameter.
[0080] Optionally, based on the target multiplicative coefficient, the congestion control parameters currently used by the network card device are multiplicatively adjusted downward to obtain new congestion control parameters, including: multiplying the target multiplicative coefficient by the current sending rate in the congestion control parameters currently used by the network card device to obtain a new sending rate; and multiplying the new sending rate by a preset sending time period to obtain a new sending window length; wherein the new congestion control parameters include the new sending window length and the new sending rate. The preset sending time period can be implemented as a preset round-trip time (RTT), which is not limited to this.
[0081] The preset update coefficient and the protection multiplication coefficient are flexibly set as needed, and the preset update coefficient is greater than 0 and less than 1. The protection multiplication coefficient can prevent the transmission rate from decreasing too quickly.
[0082] Assume that the preset update coefficient is denoted as β and the protection multiplication coefficient is denoted as ratio min , then the adjusted sending rate (i.e., the new sending rate) is calculated according to formula (6) and recorded as rate 1 .
[0083] rate 1 =max(β×(U target / U), ratio min )×rate......(6)
[0084] Among them, β×(U target / U) represents the basic multiplication coefficient, max() represents the function with the larger value, inax(β×(U target / U), ratio min ) represents the target multiplicative coefficient.
[0085] Assuming that the length of the adjusted sending window is recorded as cwnd, the preset RTT is recorded as T, and T also represents the preset sending time period, the adjusted sending window length (that is, the new sending window length) is calculated according to formula (7).
[0086] cwnd=rate 1 ×T......(7)
[0087] It can be understood that in the event of congestion, a multiplicative decrease in the sending rate can better control congestion.
[0088] Further optionally, when the bottleneck bandwidth occupancy rate is less than or equal to the set bandwidth occupancy rate, it indicates that no congestion has occurred. In this case, the congestion control parameter currently used by the network card device can be adjusted upward, that is, the congestion control parameter currently used can be adjusted in an increasing direction. The increase range can be flexibly set as needed and there is no restriction on this.
[0089] Further optionally, when the current bottleneck bandwidth occupancy is less than or equal to the set bandwidth occupancy, the congestion control parameter currently used by the network card device is adjusted upward according to a preset parameter adjustment threshold to obtain a new congestion control parameter.
[0090] Optionally, according to a preset parameter adjustment threshold, the congestion control parameter currently used by the network card device is adjusted upward to obtain a new congestion control parameter. The implementation method is as follows: according to the size relationship between the congestion control parameter currently used by the network card device and the preset parameter adjustment threshold, a target additive step size is determined; according to the target additive step size and the preset step size weight, the congestion control parameter currently used by the network card device is additively adjusted upward to obtain a new congestion control parameter.
[0091] Optionally, the preset parameter adjustment threshold includes a sending rate threshold and an adjustment number threshold, and the target additive step size is determined based on the size relationship between the congestion control parameter currently used by the network card device and the preset parameter adjustment threshold, including: if the current sending rate in the congestion control parameter currently used by the network card device is less than the sending rate threshold, determining the first step size as the target additive step size; if the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is greater than or equal to the adjustment number threshold, determining the second step size as the target additive step size; if the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is less than the adjustment number threshold, determining the third step size as the target additive step size; wherein, the third step size is smaller than the second step size, and the second step size is smaller than the first step size.
[0092] The number of consecutive upward adjustments increments by 1 for each upward adjustment and resets to 0 for a downward adjustment. The count restarts when an upward adjustment begins again. Using the first step size allows for significant adjustments to the send rate, facilitating the transmission of more data and improving bandwidth utilization. Using the second step size allows for significant and timely adjustments to the send rate. Using the third step size allows for normal send rate adjustments. The first, second, and third step sizes can be flexibly configured as needed.
[0093] Optionally, based on the target additive step size and the preset step size weight, the congestion control parameters currently used by the network card device are additively adjusted upward to obtain new congestion control parameters, including: determining a rate increment based on the target additive step size and the preset step size weight, adding the rate increment to the current sending rate in the congestion control parameters currently used by the network card device to obtain a new sending rate; and multiplying the new sending rate by a preset sending time period to obtain a new sending window length; wherein the new congestion control parameters include the new sending window length and the new sending rate. The rate increment can be obtained by performing various operations such as multiplication, addition, or subtraction on the target additive step size and the preset step size weight.
[0094] Assume that the sending rate threshold is recorded as rate thresh The adjustment threshold is recorded as A, the number of continuous upward adjustments is recorded as B, the first step length is recorded as uai, the second step length is recorded as hai, the third step length is recorded as ai, and w is the preset step weight that can be flexibly set. The bandwidth usage is recorded as U target , the bottleneck bandwidth occupancy rate is recorded as U; the current sending rate is recorded as rate, and the adjusted sending rate is recorded as rate 1 .
[0095] See also Figure 3 , the congestion control process includes:
[0096] S1. Obtain the current bottleneck bandwidth occupancy rate U and set the bandwidth occupancy rate U target ;
[0097] S2. Determine whether U>U target ; If the judgment result is yes, execute step S3; if the judgment result is no, execute step S4;
[0098] S3: Confirm that congestion has occurred and reduce the sending rate multiplicatively; then go to step S5;
[0099] Among them, according to rate 1 =max(β×(U target / U), ratio min )×rate formula to calculate the new sending rate rate 1 .
[0100] S4. Determine that no congestion has occurred, and increase the sending rate additively; then proceed to step S5.
[0101] S5. Update the currently used sending window length according to the new sending rate to obtain a new sending window length.
[0102] Among them, according to cwnd = rate 1 ×T formula to calculate the new sending window length cwnd.
[0103] S6. Control data transmission according to the new transmission rate and the new transmission window length.
[0104] The specific process of step S4 includes:
[0105] S41, determine whether rate is less than rate thresh ; If the judgment result is yes, execute step S42; if the judgment result is no, execute step S43;
[0106] S42, according to rate 1=rate+w×uai formula to calculate the sending rate rate 1 , to additively increase the sending rate.
[0107] S43, determine whether B>A; if the judgment result is yes, execute step S44; if the judgment result is no, execute step S45;
[0108] S44, according to the formula rate 1 =rate+w×hai formula to calculate the sending rate rate 1 , to additively increase the sending rate.
[0109] S45, according to the formula rate 1 =rate+w×ai formula to calculate the sending rate rate 1 , to additively increase the sending rate.
[0110] When the new congestion control parameters are obtained, referring to step 204 , congestion control may be performed on the data traffic to be sent by the network card device according to the new congestion control parameters.
[0111] In actual applications, the data flow sent by the network card device is controlled according to the sending rate and the new sending window length in the new congestion control parameters to perform congestion control.
[0112] Further optionally, in order to better perform congestion control, step 204 is implemented as follows: converting the new sending rate into the number of tokens, and adding the number of tokens and the new sending window length to the congestion parameter buffer, wherein the number of tokens and the sending window length are continuously consumed as the data packets are sent, for example, each time a data packet is sent, one token and one sending window are consumed, and accordingly, the remaining number of tokens and the remaining sending window length are both reduced by 1; judging whether the sending of the data packet is allowed based on the remaining number of tokens and the remaining sending window length, as well as the data sending status information corresponding to the data path; if the sending of the data packet is allowed, providing the information of the data packet to be sent and the data path to the sending module, so that the sending module can send the data packet to be sent according to the information of the data path.
[0113] Specifically, if the number of remaining tokens is 0 or the remaining sending window length is 0, data packets are prohibited from being sent; otherwise, data packets can continue to be sent. The data sending status information indicates whether the data packets in the egress queue have been sent out.
[0114] The congestion control method provided in the embodiment of the present application detects the current network status information of other nodes on the data path where the sending node is located through a network status detection message. Based on the current network status information of these nodes and taking into account the historical bottleneck bandwidth occupancy used in historical congestion control, the current bottleneck bandwidth occupancy is generated. Whether congestion occurs is determined based on the current bottleneck bandwidth occupancy. If congestion is determined to occur, the congestion control parameters currently used by the network card device are directly adjusted based on the current bottleneck bandwidth occupancy, and congestion control is performed based on the adjusted congestion control parameters. In this process, the current bottleneck bandwidth occupancy used to determine whether congestion occurs can be directly used to adjust the congestion control parameters when congestion is determined, without calling another congestion parameter adjustment algorithm, so the congestion control convergence speed is fast. Furthermore, based on the network status detection technology, more accurate network status information can be obtained, and then the bottleneck bandwidth occupancy generated based on the network status information is used to determine congestion and adjust the congestion control parameters, which can improve the parameter adjustment accuracy and improve the congestion control effect.
[0115] It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 201 to 204 can be device A; for another example, the execution entity of steps 201 and 202 can be device A, and the execution entity of steps 203 to 204 can be device B; and so on.
[0116] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The serial numbers of the operations, such as 201, 202, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0117] It is noted that the congestion control method provided in the embodiment of the present application can be implemented by the network card device of the sending node. In the embodiment of the present application, the manner in which the network card device implements the above congestion control method is not limited, and can be implemented in hardware or software.
[0118] In the case where a network card device implements the above-mentioned congestion control method using software, an embodiment of the present application provides a network card device, which includes a processor and a memory, wherein the memory stores a computer program / instructions. The processor is coupled to the memory and is configured to execute the computer program / instructions stored in the memory to implement each step of the above-mentioned method embodiment. The detailed implementation process of the processor executing each action can be found in the relevant description of the above-mentioned method embodiment or device embodiment, and will not be repeated here.
[0119] In the case where a network card device implements the above-mentioned congestion control method using software, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement each step of the above-mentioned method embodiment. Furthermore, an embodiment of the present application further provides a computer program product, including a computer program / instructions, which, when executed by a processor, causes the processor to implement each step of the above-mentioned method embodiment that can be performed by a computer device.
[0120] In the case where the network card device uses hardware to implement the above-mentioned congestion control method, the network card device can be implemented on programmable hardware such as FPGA (Field Programmable Gate Array), CPLD (Complex Programming Logic Device), or on chips such as ASIC (Application Specific Integrated Circuit), without limitation. In addition, there is no limitation on the hardware implementation structure of the network card device. Any hardware implementation structure that can implement the above-mentioned congestion control method is applicable to the embodiments of the present application. In the following embodiments, a hardware implementation structure of a network card device for implementing the above-mentioned congestion control method is provided.
[0121] Figure 4 This is a schematic diagram of the structure of a network card device provided in an embodiment of the present application. The network card device belongs to a sending node, such as Figure 4 As shown, the network card device includes: a congestion control module 10, a scheduling module 20, a sending module 30 and a receiving module 40 based on hardware implementation;
[0122] The scheduling module 20 is configured to detect the current network status information of other nodes on the data path of the sending node based on the network status detection message and provide the information to the congestion control module 10. There is at least one other node. The network status detection message is sent by the sending module 30, and the current network status information is received by the receiving module 40.
[0123] The congestion control module 10 is configured to generate a current bottleneck bandwidth occupancy rate used in current congestion control based on current network status information of at least one other node and historical bottleneck bandwidth occupancy rates used in historical congestion control; adjust the congestion control parameters currently used by the network card device based on the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters, and provide the new congestion control parameters to the scheduling module 20.
[0124] The scheduling module 20 is further configured to perform congestion control on the data traffic to be sent by the network card device according to the new congestion control parameters.
[0125] In actual applications, the sending module in the network card device of the sending node sends a network status detection message, and the receiving module in the network card device of the sending node sends the current network status information of other nodes on the data path where the sending node is located. Each other node can directly return a response message to the sending node, so that the sending node can obtain the current network status information of other nodes from the response message. Alternatively, the response message returned by the receiving node is transmitted via the data path to the receiving module in the network card device of the sending node, so that the receiving module can parse the current network status information of other nodes on the data path where the sending node is located, and there is no restriction on this.
[0126] In practical applications, the receiving node can modify the message type field in the received network status detection message to the response message type to obtain a response message. Alternatively, the receiving node can parse the received network status detection message to obtain the current network status information of each other node and encapsulate the current network status information of each other node and the receiving node's own current network status information into a response message.
[0127] Optional, see Figure 5 The congestion control module 10 includes: a data buffer area 11 based on hardware implementation, a calculation module 12 and a status buffer area 13.
[0128] The scheduling module 20 is specifically configured to write the current network status information of at least one other node into a data buffer area; the status buffer area stores historical bottleneck bandwidth occupancy rates used in historical congestion control.
[0129] The calculation module 12 is used to: read the current network status information and historical bottleneck bandwidth occupancy of at least one other node from the data cache and the status cache respectively, generate the current bottleneck bandwidth occupancy based on the current network status information of at least one other node and the historical bottleneck bandwidth occupancy, and adjust the congestion control parameters currently used by the network card device based on the current bottleneck bandwidth occupancy to obtain new congestion control parameters, and output them to the scheduling module 20.
[0130] Optional, see Figure 5The calculation module 12 includes multiple calculation units and an adjustment unit. The multiple calculation units execute in parallel and are configured to generate the current bandwidth occupancy rate of at least one other node based on the current network status information and historical network status information of at least one other node stored in the data cache and the status cache, and provide the information to the adjustment unit. Each calculation unit generates the current bandwidth occupancy rate of one other node at a time.
[0131] The adjustment unit is configured to determine a target bandwidth occupancy rate based on the current bandwidth occupancy rate of at least one other node; generate a current bottleneck bandwidth occupancy rate based on the target bandwidth occupancy rate and a historical bottleneck bandwidth occupancy rate read from a status buffer; and write the current bottleneck bandwidth occupancy rate into the status buffer area to update the historical bottleneck bandwidth occupancy rate.
[0132] In actual applications, any computing unit in the multi-way computing unit reads the current network status information and historical network status information of at least one other node from the data cache area and the status cache area, and performs subsequent processing based on the current network status information and historical network status information of at least one other node read.
[0133] Optionally, each calculation unit is specifically used to: for any other node, predict a first bandwidth occupancy rate based on the buffer queue length in the current network status information of any other node, the buffer queue length in the historical network status information, and the maximum transmission bandwidth of any other node; calculate a second bandwidth occupancy rate based on the sending timestamp and sending data volume in the current network status information of any other node, the sending timestamp and sending data volume in the historical network status information, and the maximum transmission bandwidth of any other node; generate the current bandwidth occupancy rate of any other node based on the first bandwidth occupancy rate and the second bandwidth occupancy rate of any other node.
[0134] Optional, see Figure 5 , the adjustment unit includes: a comparison subunit, a first adjustment subunit and a second adjustment subunit;
[0135] a comparing subunit, configured to compare the current bottleneck bandwidth occupancy with the set bandwidth occupancy, and triggering the first adjusting subunit if the current bottleneck bandwidth occupancy is greater than the set bandwidth occupancy, and triggering the second adjusting subunit if the current bottleneck bandwidth occupancy is less than or equal to the set bandwidth occupancy;
[0136] The first adjustment subunit, triggered by the comparison subunit, adjusts downward the congestion control parameter currently used by the network card device according to the ratio of the set bandwidth occupancy rate to the current bottleneck bandwidth occupancy rate to obtain a new congestion control parameter;
[0137] The second adjusting subunit, triggered by the comparing subunit, adjusts upward the congestion control parameter currently used by the network card device according to a preset parameter adjustment threshold to obtain a new congestion control parameter.
[0138] Optionally, the first adjustment subunit is specifically used to: generate a basic multiplication coefficient based on the ratio of the current bottleneck bandwidth occupancy rate to the set bandwidth occupancy rate and a preset update system, where the basic multiplication coefficient is greater than 0 and less than 1; select the larger one from the basic multiplication coefficient and the protection multiplication coefficient as the target multiplication coefficient, where the protection multiplication coefficient is greater than 0 and less than 1; and multiply downward adjust the congestion control parameters currently used by the network card device based on the target multiplication coefficient to obtain new congestion control parameters.
[0139] Optionally, when the first adjustment subunit multiplicatively reduces the congestion control parameters currently used by the network card device, it is specifically used to: multiply the target multiplication coefficient by the current sending rate in the congestion control parameters currently used by the network card device to obtain a new sending rate; multiply the new sending rate by the preset sending time period to obtain a new sending window length; wherein the new congestion control parameters include a new sending window length and a new sending rate.
[0140] Optionally, the second adjustment subunit is specifically used to: determine the target additive step size based on the size relationship between the congestion control parameter currently used by the network card device and the preset parameter adjustment threshold; and additively increase the congestion control parameter currently used by the network card device based on the target additive step size and the preset step size weight to obtain a new congestion control parameter.
[0141] Optionally, the preset parameter adjustment threshold includes a sending rate threshold and an adjustment number threshold, and the second adjustment subunit, when determining the target additive step size, is specifically used to: if the current sending rate in the congestion control parameter currently used by the network card device is less than the sending rate threshold, determine the first step size as the target additive step size; if the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is greater than or equal to the adjustment number threshold, determine the second step size as the target additive step size; if the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is less than the adjustment number threshold, determine the third step size as the target additive step size;
[0142] The third step length is smaller than the second step length, and the second step length is smaller than the first step length.
[0143] Optionally, when the second adjustment subunit additively increases the congestion control parameters currently used by the network card device, it is specifically used to: determine the rate increment based on the target additive step size and the preset step size weight, add the rate increment to the current sending rate in the congestion control parameters currently used by the network card device to obtain a new sending rate; multiply the new sending rate and the preset sending time period to obtain a new sending window length; wherein the new congestion control parameters include a new sending window length and a new sending rate.
[0144] Optional, see Figure 6 The scheduling module 20 includes: a congestion parameter buffer 21, a connection status buffer 22, a token conversion unit 23, a permission judgment unit 24 and a processing unit 25 based on hardware implementation;
[0145] a token conversion unit 23, configured to convert the new sending rate into a token number, and add the token number and the new sending window length to the congestion parameter buffer 21, wherein the token number and the sending window length are continuously consumed as data packets are sent;
[0146] The connection status buffer 22 stores data transmission status information corresponding to the data path;
[0147] a permission determination unit 24 for, upon determining that sending of a data packet is permitted based on the number of remaining tokens and the remaining sending window length, as well as the data sending status information corresponding to the data path, providing information about the data packet to be sent and the data path to the processing unit, and updating the number of remaining tokens and the remaining sending window length;
[0148] The processing unit 25 is configured to generate a sending request according to the data packet to be sent and the information of the data path, and provide the sending request to the sending module so that the sending module can send the data packet to be sent according to the information of the data path.
[0149] In actual applications, the permission judgment unit reads the remaining token quantity and the remaining sending window length from the congestion parameter buffer, and reads the data sending status information corresponding to the data path from the connection status buffer, and performs subsequent processing based on the read data.
[0150] It should be noted that the network card device in the embodiment of the present application can be a network card that supports the RDMA protocol or a network card that supports the TCP / IP protocol, without limitation. In the case where the network device is implemented as a network card that supports the RDMA protocol, the scheduling module 20 can also include functional units related to RDMA network transmission, such as various queues such as CQ, SQ, and RQ. Accordingly, the processing unit 25 can also be implemented as a CQE unit. When generating a send request and providing the send request to the send module, a CQE can also be generated to feedback a send completion message to the upper-level host or application, etc.
[0151] The detailed implementation and beneficial effects of each module in the network card device have been described in detail in the aforementioned embodiments and will not be elaborated here.
[0152] In an embodiment of the present application, a low-latency, high-precision, and fast-convergence congestion control method based on network detection technology (such as INT) is implemented on a hardware network card based on FPGA, CPLD, or ASIC. Without the intervention of software and CPU, on the basis of obtaining accurate network status information on the data path, the advantages of low latency and high parallelism of hardware implementation can be fully utilized to reduce congestion control processing delay, and the throughput of messages carrying network status information can be improved through a multi-stage pipeline. Through speed regulation based on sending rate and sending window and token-based sending control, network bandwidth can be fully utilized while avoiding excessive network congestion. In addition, in the congestion control method provided by this embodiment, the current bottleneck bandwidth occupancy rate used to determine whether congestion occurs can be directly used to adjust the congestion control parameters when congestion is determined, without calling another congestion parameter adjustment algorithm, so the congestion control convergence speed is fast; further, based on the network status detection technology, more accurate network status information can be obtained, and then the bottleneck bandwidth occupancy rate generated based on the network status information is used to perform congestion judgment and congestion control parameter adjustment, which can improve the parameter adjustment accuracy and improve the congestion control effect.
[0153] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the computer device includes: a memory 71 , a processor 72 and a communication component 73 , and the communication component 73 includes at least a network card device 731 .
[0154] The memory 71 is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0155] The memory 71 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0156] The processor 72 is coupled to the memory 71 and is used to execute the computer program in the memory 71 to implement various functions of the computer device. In this embodiment, the network card device 731 is used to execute the steps of the congestion control method provided in the above method embodiment. The network card device 731 can execute the congestion control method in a software manner or a hardware manner. When the hardware manner is adopted, the implementation structure of the network card device 731 can be referred to. Figure 4-Figure 6 As shown, no further details are given here.
[0157] Further optional, such as Figure 7 As shown, the computer device also includes: a display 74, a power supply component 75, an audio component 76 and other components. Figure 7 Only some components are shown schematically, which does not mean that the computer equipment only includes Figure 7 In addition, Figure 7 The components in the dotted box are optional components, not mandatory components, and the specific components may depend on the product form of the computer device. The computer device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone or an IOT (Internet of Things) device, or a server device such as a conventional server, a cloud server or a server array. If the computer device of this embodiment is implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc., it may include Figure 7 If the computer device of this embodiment is implemented as a server device such as a conventional server, a cloud server or a server array, it may not include the components in the dotted box; Figure 7 Components within the dotted box.
[0158] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi (Wireless Fidelity), 2G (2 Generation, 2 Generation), 3G (3 Generation, 3 Generation), 4G (4 Generation, 4 Generation) / LTE (Long Term Evolution), 5G (5 Generation, 5 Generation) and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies.
[0159] The above-mentioned display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundary of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0160] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.
[0161] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as call mode, recording mode, and voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0162] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0163] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0164] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0166] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.
[0167] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0168] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Phase Change RAM (PRAM), Static Random-Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0169] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0170] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A network card device, characterized in that: The network card device belongs to a sending node, and the network card device includes: a congestion control module, a scheduling module, a sending module and a receiving module implemented based on hardware; The scheduling module is configured to detect current network status information of other nodes on the data path of the sending node based on the network status detection message, and provide the information to the congestion control module; the other node is at least one, the network status detection message is sent by the sending module, and the current network status information is received by the receiving module; The congestion control module is configured to generate a current bottleneck bandwidth occupancy rate used in current congestion control based on the current network status information of the at least one other node and the historical bottleneck bandwidth occupancy rate used in historical congestion control; adjust the congestion control parameters currently used by the network card device based on the current bottleneck bandwidth occupancy rate to obtain new congestion control parameters, and provide the new congestion control parameters to the scheduling module, so that the scheduling module can perform congestion control on the data traffic to be sent by the network card device based on the new congestion control parameters.
2. The network card device according to claim 1, wherein: The congestion control module includes: a data buffer area, a calculation module and a status buffer area based on hardware implementation; The scheduling module is specifically configured to: write the current network status information of the at least one other node into the data buffer; the status buffer stores the historical bottleneck bandwidth occupancy rate used in historical congestion control; The calculation module is used to: read the current network status information and the historical bottleneck bandwidth occupancy of the at least one other node from the data cache area and the status cache area respectively, generate the current bottleneck bandwidth occupancy based on the current network status information of the at least one other node and the historical bottleneck bandwidth occupancy, and adjust the congestion control parameters currently used by the network card device based on the current bottleneck bandwidth occupancy to obtain new congestion control parameters, and output them to the scheduling module.
3. The network card device according to claim 2, wherein: The calculation module includes: a multi-channel calculation unit and an adjustment unit; wherein the multiple computing units are executed in parallel, and are configured to generate the current bandwidth occupancy rate of the at least one other node based on the current network status information and historical network status information of the at least one other node stored in the data cache and the status cache, and provide the generated bandwidth occupancy rate to the adjustment unit; wherein each computing unit is responsible for generating the current bandwidth occupancy rate of one other node at a time; The adjustment unit is configured to determine a target bandwidth occupancy rate based on the current bandwidth occupancy rate of the at least one other node; generate a current bottleneck bandwidth occupancy rate based on the target bandwidth occupancy rate and a historical bottleneck bandwidth occupancy rate read from the status cache area; and write the current bottleneck bandwidth occupancy rate into the status cache area to update the historical bottleneck bandwidth occupancy rate.
4. The network card device according to claim 3, wherein: Each computing unit is specifically used for: For any other node, predict a first bandwidth occupancy rate based on a buffer queue length in current network status information of the any other node, a buffer queue length in historical network status information, and a maximum transmission bandwidth of the any other node; Calculating a second bandwidth occupancy rate based on a sending timestamp and a sending data volume in the current network status information of any other node, a sending timestamp and a sending data volume in the historical network status information, and a maximum transmission bandwidth of any other node; The current bandwidth occupancy of any other node is generated according to the first bandwidth occupancy and the second bandwidth occupancy of any other node.
5. The network card device according to claim 3, wherein: The adjustment unit includes: a comparison subunit and a first adjustment subunit; The comparing subunit is configured to compare the current bottleneck bandwidth occupancy with the set bandwidth occupancy, and trigger the first adjusting subunit if the current bottleneck bandwidth occupancy is greater than the set bandwidth occupancy; The first adjusting subunit, triggered by the comparing subunit, adjusts downward the congestion control parameter currently used by the network card device according to the ratio of the set bandwidth occupancy rate to the current bottleneck bandwidth occupancy rate to obtain a new congestion control parameter.
6. The network card device according to claim 5, characterized in that: The first adjustment subunit is specifically configured to: Generate a basic multiplication coefficient based on the ratio of the current bottleneck bandwidth occupancy rate to the set bandwidth occupancy rate and a preset update system, wherein the basic multiplication coefficient is greater than 0 and less than 1; Selecting a larger one from the basic multiplication coefficient and the protection multiplication coefficient as the target multiplication coefficient, wherein the protection multiplication coefficient is greater than 0 and less than 1; According to the target multiplicative coefficient, the congestion control parameter currently used by the network card device is multiplicatively adjusted downward to obtain a new congestion control parameter.
7. The network card device according to claim 5, characterized in that: The adjustment unit further includes: a second adjustment subunit; The second adjusting subunit, triggered by the comparing subunit, adjusts upward the congestion control parameter currently used by the network card device according to a preset parameter adjustment threshold to obtain a new congestion control parameter.
8. The network card device according to claim 7, wherein: The second adjustment subunit is specifically configured to: Determine the target additive step size based on the relationship between the congestion control parameters currently used by the network card device and the preset parameter adjustment threshold; According to the target additive step size and the preset step size weight, the congestion control parameter currently used by the network card device is additively adjusted upward to obtain a new congestion control parameter.
9. The network card device according to claim 8, characterized in that: The preset parameter adjustment threshold includes a sending rate threshold and an adjustment number threshold. When determining the target additive step size, the second adjustment subunit is specifically configured to: If the current sending rate in the congestion control parameter currently used by the network card device is less than the sending rate threshold, determining the first step length as the target additive step length; If the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is greater than or equal to the adjustment number threshold, determine the second step size as the target additive step size; If the current sending rate is greater than or equal to the sending rate threshold, and the number of consecutive upward adjustments is less than the adjustment number threshold, determine the third step size as the target additive step size; The third step length is smaller than the second step length, and the second step length is smaller than the first step length.
10. The network card device according to any one of claims 1 to 9, characterized in that: The new congestion control parameters include a new sending window length and a new sending rate; The scheduling module includes: a congestion parameter buffer area, a connection status buffer area, a token conversion unit, a permission judgment unit and a processing unit based on hardware implementation; The token conversion unit is configured to convert the new sending rate into a token number, and add the token number and the new sending window length to the congestion parameter buffer, wherein the token number and the sending window length are continuously consumed as data packets are sent; The connection status buffer stores data sending status information corresponding to the data path; The permission judgment unit is configured to, when determining that sending of the data packet is permitted based on the number of remaining tokens and the remaining sending window length, and the data sending state information corresponding to the data path, provide information about the data packet to be sent and the data path to the processing unit, and update the number of remaining tokens and the remaining sending window length; The processing unit is configured to generate a sending request based on the data packet to be sent and the information of the data path, and provide the sending request to the sending module so that the sending module can send the data packet to be sent based on the information of the data path.
11. A congestion control method, characterized in that: The method is applied to a network card device of a sending node, and includes: Detecting current network status information of other nodes on the data path where the sending node is located based on the network status detection message, wherein the other node is at least one; generating a current bottleneck bandwidth occupancy rate used in current congestion control according to the current network status information of the at least one other node and the historical bottleneck bandwidth occupancy rate used in historical congestion control; When congestion is determined to have occurred based on the bottleneck bandwidth occupancy rate, the congestion control parameters currently used by the network card device are adjusted based on the bottleneck bandwidth occupancy rate to obtain new congestion control parameters. Congestion control is performed on the data traffic to be sent by the network card device according to the new congestion control parameter.
12. The method according to claim 11, characterized in that Generating a current bottleneck bandwidth occupancy rate used in current congestion control according to the current network status information of the at least one other node and the historical bottleneck bandwidth occupancy rate used in historical congestion control includes: Generating a current bandwidth occupancy rate of the at least one other node according to the current network status information and the historical network status information of the at least one other node; Determining a target bandwidth occupancy rate according to the current bandwidth occupancy rate of the at least one other node; A current bottleneck bandwidth occupancy rate is generated according to the target bandwidth occupancy rate and the historical bottleneck bandwidth occupancy rate.
13. The method according to claim 12, characterized in that Generating a current bandwidth occupancy rate of the at least one other node according to the current network status information and the historical network status information of the at least one other node, including: For any other node, predict a first bandwidth occupancy rate based on a buffer queue length in current network status information of the any other node, a buffer queue length in historical network status information, and a maximum transmission bandwidth of the any other node; Calculating a second bandwidth occupancy rate based on a sending timestamp and a sending data volume in the current network status information of any other node, a sending timestamp and a sending data volume in the historical network status information, and a maximum transmission bandwidth of any other node; The current bandwidth occupancy of any other node is generated according to the first bandwidth occupancy and the second bandwidth occupancy of any other node.
14. The method according to claim 11, characterized in that Based on the bottleneck bandwidth usage, adjust the congestion control parameters currently used by the network card to obtain new congestion control parameters, including: When the current bottleneck bandwidth occupancy is greater than the set bandwidth occupancy, the congestion control parameter currently used by the network card device is adjusted downward according to the ratio of the set bandwidth occupancy to the current bottleneck bandwidth occupancy to obtain a new congestion control parameter.
15. The method according to claim 14, characterized in that Also includes: When the bottleneck bandwidth occupancy rate is less than or equal to the set bandwidth occupancy rate, the congestion control parameter currently used by the network card device is adjusted upward according to the preset parameter adjustment threshold to obtain a new congestion control parameter.
16. The method according to any one of claims 11 to 15, characterized in that Performing congestion control on the data flow to be sent by the network card device according to the new congestion control parameter includes: Converting the new sending rate into a token number, and adding the token number and the new sending window length to a congestion parameter buffer, wherein the token number and the sending window length are continuously consumed as data packets are sent; Determining whether to allow sending of a data packet based on the number of remaining tokens and the remaining sending window length, as well as the data sending status information corresponding to the data path; In the case where sending of the data packet is allowed, the data packet to be sent and the information of the data path are provided to the sending module, so that the sending module can send the data packet to be sent according to the information of the data path.
17. A computer device, characterized in that: The network card device comprises the network card device according to any one of claims 1 to 10.
18. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 11 to 16.
19. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 11 to 16.
