Congestion control method and device, computer equipment and storage medium

By using multi-bit information to feedback the number of contention flows and congestion state in the data center network, efficient congestion control for the data center network is achieved, and the congestion response and slow recovery of the DCQCN algorithm under extremely low latency and ultra-high bandwidth is solved. Problem, improving network performance.

CN118984307APending Publication Date: 2024-11-19CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410975563.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing data center network congestion control algorithm DCQCN relies on single-bit ECN signals and cannot meet the needs of extremely low latency and ultra-high bandwidth, resulting in slow congestion response and slow rate recovery, affecting network performance.

Method used

By feedbacking the number of contention flows and congestion status of the port to the sending end, the sending end adjusts the message transmission rate based on the number of contention flows and congestion identification, and uses multi-bit information to perform precise congestion control to achieve rapid relief of congestion and recovery rates.

Benefits of technology

It reduces the delay of the data transmission network, improves bandwidth utilization, and improves the congestion response speed and rate recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984307A_ABST
    Figure CN118984307A_ABST
Patent Text Reader

Abstract

The invention relates to a congestion control method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: receiving a target message sent by a target sending end through a target port, wherein an instruction field of the target message carries a message attribute mark; if the message attribute mark represents that the target message is the first message, a congestion notification message is sent to the target sending end every preset time, and the congestion notification message carries the current competition flow number and the congestion mark of the target port; the congestion notification message is used for indicating the target sending end to adjust the message sending rate according to the competition flow number and the congestion identifier. By adopting the method, the network delay can be reduced, and the network bandwidth utilization rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a congestion control method, apparatus, computer equipment and storage medium. Background Art

[0002] In recent years, with the rapid growth of data center network link speeds and the rapid changes in traffic patterns, the requirements for network performance are increasing. Congestion control technology is an important means to improve network throughput, reduce latency, and ensure network stability.

[0003] The congestion control algorithm used in related technologies is DCQCN (Data Center Quantized Congestion Notification), which uses ECN (Explicit Congestion Notification) as a signal to identify and handle congestion. However, relying solely on single-bit ECN signals for congestion control is currently unable to meet the requirements for extremely low latency and ultra-high bandwidth in today's data center networks. Summary of the invention

[0004] The embodiments of the present application provide a congestion control method, apparatus, computer device, storage medium and computer program product, which can reduce network delay and improve network bandwidth utilization.

[0005] A congestion control method, applied to a receiving end, comprising:

[0006] Receiving a target message sent by a target sending end through a target port, wherein an instruction field of the target message carries a message attribute tag;

[0007] If the message attribute mark indicates that the target message is the first message, a congestion notification message is sent to the target sending end at a preset interval, and the congestion notification message carries the current number of competing flows and a congestion flag of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion flag.

[0008] In one embodiment, the congestion notification message includes a first congestion notification message, and the sending of the congestion notification message to the target sending end at intervals of a preset duration includes:

[0009] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time, if a message carrying a congestion indicator is received through the target port within the preset time, the first congestion notification message is sent to the target sending end,

[0010] The congestion flag in the first congestion notification message is set to a first flag, the first flag is used to indicate that the target port is currently in a congested state, and the first congestion notification message is used to instruct the target sending end to reduce a message sending rate based on the first flag and the number of competing flows.

[0011] In one embodiment, the congestion notification message includes a second congestion notification message, and the sending of the congestion notification message to the target sending end at intervals of a preset duration includes:

[0012] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time length, if no message carrying a congestion indicator is received through the target port within the preset time length, sending the second congestion notification message to the target sending end,

[0013] The congestion flag in the second congestion notification message is set to a second flag, the second flag is used to indicate that the target port is currently in a normal state, and the second congestion notification message is used to instruct the target sending end to increase the message sending rate based on the second flag and the number of competing flows.

[0014] In one embodiment, the method further comprises:

[0015] For any port, receive a message sent by any sending end through the port, and obtain a message attribute tag carried in the message;

[0016] The number of competing flows of the port is updated according to the message attribute tag.

[0017] In one embodiment, the updating the number of competing flows of the port according to the message attribute tag includes:

[0018] When the message attribute mark indicates that the message is the first message, the number of competing flows of the port is increased by 1;

[0019] When the message attribute flag indicates that the message is the last message, the number of competing flows of the port is reduced by 1.

[0020] A congestion control method, applied to a sending end, comprising:

[0021] Send the target message to the target port of the receiving end;

[0022] Receiving a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port;

[0023] A rate adjustment strategy is determined according to the congestion identifier, and a message sending rate is adjusted according to the rate adjustment strategy and the number of competing flows.

[0024] In one of the embodiments, determining a rate adjustment strategy according to the congestion indicator includes:

[0025] When the congestion indicator is the first indicator, determining that the rate adjustment strategy is a speed reduction adjustment strategy;

[0026] When the congestion identifier is the second identifier, the rate adjustment strategy is determined to be a speed increase adjustment strategy.

[0027] In one of the embodiments, when the rate adjustment strategy is the rate reduction adjustment strategy, adjusting the message sending rate according to the rate adjustment strategy and the number of competing flows includes:

[0028] Obtain the number of historical competing flows of the target port;

[0029] Determining a target speed reduction method according to a ratio relationship between the number of competing flows and the number of historical competing flows;

[0030] The target speed reduction method and the number of competing flows are used to determine an adjusted message sending rate.

[0031] In one embodiment, determining the target speed reduction method according to the ratio relationship between the number of competing flows and the number of historical competing flows includes:

[0032] When the ratio of the number of competing flows to the number of historical competing flows is less than a preset ratio, determining the target speed reduction mode to be the first speed reduction mode; or,

[0033] When the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, determining the target speed reduction mode to be the second speed reduction mode;

[0034] The speed reduction range of the first speed reduction method is lower than the speed reduction range of the second speed reduction method.

[0035] In one of the embodiments, when the target speed reduction mode is the first speed reduction mode, the step of using the target speed reduction mode and the number of competing flows to determine the adjusted message sending rate includes:

[0036] Obtaining the current message sending rate of the target port;

[0037] An adjusted message sending rate is determined according to the preset ratio and the current message sending rate, wherein the adjusted message sending rate is positively correlated with the current message sending rate, and the adjusted message sending rate is negatively correlated with the preset ratio.

[0038] In one of the embodiments, when the target speed reduction mode is the second speed reduction mode, the step of using the target speed reduction mode and the number of competing flows to determine the adjusted message sending rate includes:

[0039] Obtaining the current message sending rate of the target port;

[0040] The adjusted message sending rate is determined based on the current message sending rate, the number of historical competing flows and the number of competing flows, wherein the adjusted message sending rate is positively correlated with the current message sending rate and the number of historical competing flows, and the adjusted message sending rate is negatively correlated with the number of competing flows.

[0041] In one of the embodiments, when the rate adjustment strategy is the speed increase adjustment strategy, adjusting the message sending rate according to the rate adjustment strategy and the number of competing flows includes:

[0042] Obtain the historical number of competing flows and the current message sending rate of the target port;

[0043] Determining a target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate;

[0044] Determine the current number of consecutive speed-up times, and determine a target speed-up amplitude based on the current number of consecutive speed-up times;

[0045] An adjusted message sending rate is determined according to the target increasing speed, the target sending rate and the current message sending rate.

[0046] In one embodiment, determining the target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate includes:

[0047] Determine a candidate sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate;

[0048] The maximum value of the candidate sending rate and the current message sending rate is used as the target sending rate.

[0049] In one embodiment, determining the target speed-up amplitude based on the current number of consecutive speed-up times includes:

[0050] When the current number of consecutive acceleration times is less than a preset number, determining the target acceleration amplitude to be a first acceleration amplitude; or,

[0051] When the current number of consecutive acceleration times is greater than or equal to the preset number of times, determining the target acceleration amplitude to be a second acceleration amplitude,

[0052] Among them, the first growth rate is lower than the second growth rate.

[0053] In one embodiment, determining the adjusted message sending rate according to the target increase rate, the target sending rate and the current message sending rate includes:

[0054] Taking the sum of the target speed-up amplitude and the target sending rate as the first rate;

[0055] An average of the current message sending rate and the first rate is used as the adjusted message sending rate.

[0056] In one embodiment, the method further comprises:

[0057] The adjusted message sending rate is used as the current message sending rate, and the number of competing flows is used as the number of historical competing flows.

[0058] A congestion control device, applied to a receiving end, comprising:

[0059] A first receiving unit, configured to receive a target message sent by a target sending end through a target port, wherein an instruction field of the target message carries a message attribute tag;

[0060] A sending unit, used for sending a congestion notification message to the target sending end at a preset interval if the message attribute mark indicates that the target message is the first message, wherein the congestion notification message carries the current number of competing flows and a congestion identifier of the target port, and the congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion identifier.

[0061] In one of the embodiments, the congestion notification message includes a first congestion notification message, and the sending unit is further configured to:

[0062] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time, if a message carrying a congestion indicator is received through the target port within the preset time, the first congestion notification message is sent to the target sending end,

[0063] The congestion flag in the first congestion notification message is set to a first flag, the first flag is used to indicate that the target port is currently in a congested state, and the first congestion notification message is used to instruct the target sending end to reduce a message sending rate based on the first flag and the number of competing flows.

[0064] In one of the embodiments, the congestion notification message includes a second congestion notification message, and the sending unit is further configured to:

[0065] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time length, if no message carrying a congestion indicator is received through the target port within the preset time length, sending the second congestion notification message to the target sending end,

[0066] The congestion flag in the second congestion notification message is set to a second flag, the second flag is used to indicate that the target port is currently in a normal state, and the second congestion notification message is used to instruct the target sending end to increase the message sending rate based on the second flag and the number of competing flows.

[0067] In one embodiment, the device further comprises:

[0068] A second receiving unit is used to receive a message sent by any sending end through any port and obtain a message attribute tag carried in the message;

[0069] An updating unit is used to update the number of competing flows of the port according to the message attribute tag.

[0070] In one embodiment, the updating unit is further configured to:

[0071] When the message attribute mark indicates that the message is the first message, the number of competing flows of the port is increased by 1;

[0072] When the message attribute flag indicates that the message is the last message, the number of competing flows of the port is reduced by 1.

[0073] A congestion control device, applied to a sending end, comprising:

[0074] A sending unit, used for sending a target message to a target port of a receiving end;

[0075] A receiving unit, configured to receive a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port;

[0076] An adjustment unit is used to determine a rate adjustment strategy according to the congestion identifier, and adjust the message sending rate according to the rate adjustment strategy and the number of competing flows.

[0077] In one embodiment, the adjustment unit is further used for:

[0078] When the congestion indicator is the first indicator, determining that the rate adjustment strategy is a speed reduction adjustment strategy;

[0079] When the congestion identifier is the second identifier, the rate adjustment strategy is determined to be a speed increase adjustment strategy.

[0080] In one of the embodiments, when the rate adjustment strategy is the rate reduction adjustment strategy, the adjustment unit is further configured to:

[0081] Obtain the number of historical competing flows of the target port;

[0082] Determining a target speed reduction method according to a ratio relationship between the number of competing flows and the number of historical competing flows;

[0083] The target speed reduction method and the number of competing flows are used to determine an adjusted message sending rate.

[0084] In one embodiment, the adjustment unit is further configured to:

[0085] When the ratio of the number of competing flows to the number of historical competing flows is less than a preset ratio, determining the target speed reduction mode to be the first speed reduction mode; or,

[0086] When the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, determining the target speed reduction mode to be the second speed reduction mode;

[0087] The speed reduction range of the first speed reduction method is lower than the speed reduction range of the second speed reduction method.

[0088] In one embodiment, when the target speed reduction mode is the first speed reduction mode, the adjustment unit is further configured to:

[0089] Obtaining the current message sending rate of the target port;

[0090] An adjusted message sending rate is determined according to the preset ratio and the current message sending rate, wherein the adjusted message sending rate is positively correlated with the current message sending rate, and the adjusted message sending rate is negatively correlated with the preset ratio.

[0091] In one embodiment, when the target speed reduction mode is the second speed reduction mode, the adjustment unit is further configured to:

[0092] Obtaining the current message sending rate of the target port;

[0093] The adjusted message sending rate is determined based on the current message sending rate, the number of historical competing flows and the number of competing flows, wherein the adjusted message sending rate is positively correlated with the current message sending rate and the number of historical competing flows, and the adjusted message sending rate is negatively correlated with the number of competing flows.

[0094] In one of the embodiments, when the rate adjustment strategy is the speed increase adjustment strategy, the adjustment unit is further configured to:

[0095] Obtain the historical number of competing flows and the current message sending rate of the target port;

[0096] Determining a target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate;

[0097] Determine the current number of consecutive speed-up times, and determine a target speed-up amplitude based on the current number of consecutive speed-up times;

[0098] An adjusted message sending rate is determined according to the target increasing speed, the target sending rate and the current message sending rate.

[0099] In one embodiment, the adjustment unit is further configured to:

[0100] Determine a candidate sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate;

[0101] The maximum value of the candidate sending rate and the current message sending rate is used as the target sending rate.

[0102] In one embodiment, the adjustment unit is further configured to:

[0103] When the current number of consecutive acceleration times is less than a preset number, determining the target acceleration amplitude to be a first acceleration amplitude; or,

[0104] When the current number of consecutive acceleration times is greater than or equal to the preset number of times, determining the target acceleration amplitude to be a second acceleration amplitude,

[0105] Among them, the first growth rate is lower than the second growth rate.

[0106] In one embodiment, the adjustment unit is further configured to:

[0107] Taking the sum of the target speed-up amplitude and the target sending rate as the first rate;

[0108] An average of the current message sending rate and the first rate is used as the adjusted message sending rate.

[0109] In one embodiment, the device further comprises:

[0110] An updating unit is used to use the adjusted message sending rate as the current message sending rate and the number of competing flows as the number of historical competing flows.

[0111] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements any one of the above congestion control methods when executing the computer program.

[0112] A computer-readable storage medium stores a computer program, wherein the computer program implements any of the above congestion control methods when executed by a processor.

[0113] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above congestion control methods.

[0114] The above-mentioned congestion control method, device, computer equipment, storage medium and computer program product, the receiving end receives the target message sent by the target sending end through the target port, and the instruction field of the target message carries a message attribute mark. When the message attribute mark indicates that the target message is the first message, a congestion notification message is sent to the target sending end at each preset interval, and the congestion notification message carries the current number of competing flows and congestion mark of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion mark. Based on the congestion control method, device, computer equipment, storage medium and computer program product provided by the embodiments of the present disclosure, when adjusting the message sending rate, the sending end can fully consider the current number of competing flows of the port, so that the message sending rate can be adjusted efficiently and accurately, and the congestion can be quickly relieved during congestion, and the message sending rate can be quickly restored after the congestion is relieved, thereby reducing the data transmission network delay and improving the bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] FIG1 is a schematic flow chart of a congestion control method in one embodiment;

[0116] FIG2 is a schematic diagram of a process for determining the number of competing flows in one embodiment;

[0117] FIG3 is a schematic diagram of determining the number of competing flows in one embodiment;

[0118] FIG4 is a schematic flow chart of a congestion control method in another embodiment;

[0119] FIG5 is a flow chart of step 406 in a congestion control method according to an embodiment;

[0120] FIG6 is a flow chart of step 506 in a congestion control method according to an embodiment;

[0121] FIG7 is a flow chart of step 506 in a congestion control method according to an embodiment;

[0122] FIG8 is a flow chart of step 406 in a congestion control method according to an embodiment;

[0123] FIG9 is a schematic diagram of the framework structure of a congestion control system in one embodiment;

[0124] FIG10 is a schematic diagram of a message structure of a congestion notification message in one embodiment;

[0125] FIG11 is a schematic diagram of a process of generating a congestion notification message at a receiving end in one embodiment;

[0126] FIG12 is a schematic diagram of a process of adjusting a message sending rate at a transmitting end in one embodiment;

[0127] FIG13a is a schematic diagram showing the effect of using the DCQCN method in one embodiment;

[0128] FIG13b is a schematic diagram showing the effect of a congestion control method in one embodiment;

[0129] FIG14 is a block diagram of a congestion control device in one embodiment;

[0130] FIG15 is a block diagram of a congestion control device in another embodiment;

[0131] FIG. 16 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0132] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0133] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0134] In recent years, the speed of data center RDMA (Remote Direct Memory Access) network links has rapidly increased from 10G to over 100G, and traffic patterns have changed rapidly. As a result, the requirements for network performance are increasing. Congestion control technology is an important means to improve network throughput, reduce latency, and ensure network stability.

[0135] The congestion control algorithm DCQCN used in related technologies uses ECN as a signal to identify and process congestion. In view of the extremely low latency and ultra-high bandwidth requirements of today's data center networks (taking large model training as an example, the traffic model between nodes during large model training is complex, which places extremely high demands on the networking scale and network transmission performance of the intelligent computing center), relying solely on single-bit ECN signals for congestion control has already resulted in high latency and low bandwidth utilization, exposing the following problems:

[0136] 1. Slow response to congestion: DCQCN adjusts the speed based only on single-bit ECN signals. The rate of each received CNP (Congestion Notification Packets) is reduced to half of the original rate at most. In scenarios where a large amount of traffic bursts on the high-speed network of the intelligent computing center, congestion relief is slow.

[0137] 2. Slow rate recovery: DCQCN increases the rate through FR (Fast Recovery) and AI (Additive Increase) / HAI (High Additive Increase) mechanisms. After a large number of flows exit the link, the FR+AI / HAI mechanism takes a long time to restore the bottleneck link throughput to the bandwidth, resulting in throughput loss.

[0138] In order to solve the above problems, an embodiment of the present disclosure provides a congestion control method, in which the receiving end feeds back the number of competing flows of the port and the current congestion status (using a congestion flag to characterize the congestion status) to the sending end. In this way, when adjusting the message sending rate, the sending end can fully consider the current number of competing flows of the port, thereby efficiently adjusting the message sending rate, achieving rapid relief of congestion during congestion, and rapid recovery of the message sending rate after the congestion is relieved, thereby reducing the data transmission network delay and improving bandwidth utilization.

[0139] In order to facilitate understanding of the embodiments of the present disclosure, before introducing the embodiments of the present disclosure, the nouns involved in the embodiments of the present disclosure are explained first, specifically:

[0140] ECN (Explicit Congestion Notification): is a mechanism for network congestion control that allows network devices to notify other devices by setting a specific flag bit in the ECN field in the IP packet header when congestion is detected (the switch queue length exceeds the waterline).

[0141] CNP (Congestion Notification Packets): When the receiving network card receives a data packet with an ECN mark, it generates a CNP packet and returns it to the sender to notify the sender that there is congestion in the link.

[0142] PFC (Priority-based Flow Control): A flow control technology for achieving lossless networks. It is an enhancement of the Ethernet PAUSE (Pause Frame) mechanism. Its working principle is that when the receive buffer on the switch interface is filled to the threshold, a PAUSE frame is sent upstream to prevent the upstream device from sending more frames. PFC creates 8 virtual channels on an Ethernet link, allowing any of the virtual channels to be paused and restarted individually. PFC performs flow control based on ports and priorities, which can easily lead to victim flows, PFC deadlocks, PFC storms, and other problems, seriously affecting network performance. Therefore, it is necessary to avoid triggering PFC as much as possible through flow-level congestion control.

[0143] AI (Additive Increase): A commonly used speed regulation strategy in congestion control that additively increases the sending rate.

[0144] MD (Multiplicative Decrease): A common speed control strategy in congestion control that multiplicatively reduces the sending rate. AIMD (Additive Increase Multiplicative Decrease) is usually used in combination to make different flows converge to a fair rate.

[0145] FR (Fast Recovery): The fast speed-up strategy used in DCQCN. Before each speed reduction, the current speed is recorded as the target speed of the speed increase.

[0146] In one embodiment, as shown in FIG. 1 , a congestion control method is provided, which is applied to a receiving end and includes the following steps 102 to 104, wherein:

[0147] Step 102: receiving a target message sent by a target sending end through a target port, wherein the instruction field of the target message carries a message attribute tag.

[0148] In the disclosed embodiment, the target message includes a RoCEv2 (RDMA over Converged Ethernet version 2, RDMA version 2 based on converged Ethernet) message, and the RoCEv2 message sent by the sender has a destination port as the target port. The switch sends the RoCEv2 message to the target port of the receiver, and the receiver receives the RoCEv2 message through the target port. The instruction field of the RoCEv2 message (the Opcode field of the IB BTH (InfiniBand Base Transport Header, the header field of the InfiniBand transport layer) header) carries a message attribute tag, which is used to identify the message as the first message, the middle message, or the last message of the data stream.

[0149] Step 104, if the message attribute mark indicates that the target message is the first message, a congestion notification message is sent to the target sending end at a preset interval. The congestion notification message carries the current number of competing flows and a congestion flag of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion flag.

[0150] In an embodiment of the present disclosure, if the message attribute mark indicates that the target message is the first message, the receiving end sends a congestion notification message to the target sending end, and then sends a congestion notification message to the target sending end at every preset time interval T. The preset time T can be a preset value, and the specific value can be set by a technician in this field.

[0151] A congestion notification message will be generated after each preset time interval. When generating a congestion notification message, the receiving end can obtain the current number of competing flows and the current congestion status of the target port, and when generating a congestion notification message, the number of competing flows is recorded in the reserved bit of the congestion notification message, and the corresponding congestion identifier is set in the ECN field according to the congestion status. Among them, the number of competing flows is the number of competing flows in the last hop, which represents the number of data flows that are transmitting data in the current link. The congestion notification message is sent to the target sending end, and the target sending end will determine whether to increase the speed or decrease the speed of the target port based on the congestion identifier carried in the congestion notification message, and during the adjustment process, the adjustment range is determined based on the number of competing flows of the target port. The specific process will be described in detail in the embodiment corresponding to the sending end, and will not be described in detail in the embodiments of the present disclosure.

[0152] In the above congestion control method, the receiving end receives the target message sent by the target sending end through the target port, and the instruction field of the target message carries a message attribute mark. When the message attribute mark indicates that the target message is the first message, a congestion notification message is sent to the target sending end at each preset interval, and the congestion notification message carries the current number of competing flows and congestion mark of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion mark. Based on the congestion control method provided by the embodiment of the present disclosure, when adjusting the message sending rate, the sending end can fully consider the current number of competing flows of the port, so that the message sending rate can be efficiently adjusted, and congestion can be quickly relieved during congestion, and the message sending rate can be quickly restored after the congestion is relieved, thereby reducing the data transmission network delay and improving bandwidth utilization.

[0153] In an exemplary embodiment, as shown in FIG. 2 , the number of competing flows of a target port may be counted by the following steps, including:

[0154] Step 202: for any port, receive a message sent by any sending end through the port, and obtain a message attribute tag carried in the message;

[0155] Step 204: Update the number of competing flows of the port according to the message attribute tag.

[0156] Take the port as the target port as an example. After receiving a message sent by any sender through the target port, the message attribute tag carried by the message can be obtained from the message, and the number of competing flows of the target port can be updated according to the message attribute tag.

[0157] In an exemplary embodiment, as shown in FIG. 3 , the number of competing flows of the target port is updated according to the message attribute tag, including: when the message attribute tag indicates that the message is the first message, the number of competing flows of the target port is increased by 1; when the message attribute tag indicates that the message is the last message, the number of competing flows of the target port is decreased by 1.

[0158] When the message attribute mark indicates that the message is the first message, it means that the data flow corresponding to the message is a new data flow, so the number of competing flows of the target port will increase by 1; conversely, when the message attribute mark indicates that the message is the last message, it means that the data flow corresponding to the message has completed data transmission, so the number of competing flows of the target port will decrease by 1; when the message attribute mark indicates that the message is an intermediate message, it means that the data flow corresponding to the message has been counted in the current number of competing flows, so the number of competing flows of the target port remains unchanged.

[0159] In an exemplary embodiment, the congestion notification message includes a first congestion notification message, and the congestion notification message is sent to the target sending end at a preset time interval, including:

[0160] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time, if a message carrying a congestion indicator is received through the target port within the preset time interval, a first congestion notification message is sent to the target sending end.

[0161] The congestion flag in the first congestion notification message is set to the first flag, the first flag is used to indicate that the target port is currently in a congested state, and the first congestion notification message is used to instruct the target sending end to reduce the message sending rate based on the first flag and the number of competing flows.

[0162] In the embodiment of the present disclosure, when the switch finds congestion (for example, the switch queue length exceeds the waterline), it can notify the receiving end that the link is currently in a congested state by setting a specific flag bit (in the embodiment of the present disclosure, the flag bit is also called a congestion flag) in the ECN field of the IP packet header of the message. When the interval time since the last time the receiving end sent a congestion notification message to the target sending end reaches a preset time, the receiving end can determine whether a message with a congestion flag sent by the switch is received within the preset time interval.

[0163] After determining that a message with a congestion identifier is received within an interval of a preset time length, the real-time number of competing flows of the target port can be obtained, and a first congestion notification message can be generated. The first congestion notification message carries the number of competing flows and a first identifier (for example, the flag bit is set to 1) indicating that the target port is currently in a congested state is set in the ECN field. Then, after receiving the first congestion notification message, the target sending end reduces the message sending rate, and the adjustment range can be determined based on the real-time number of competing flows of the target port. The specific process will be described in detail in the embodiment of the sending end, and the embodiment of the present disclosure will not be described in detail here.

[0164] In an exemplary embodiment, the congestion notification message includes a second congestion notification message, and the congestion notification message is sent to the target sending end at a preset time interval, including:

[0165] When the interval from the last congestion notification message sent to the target sending end reaches the preset time, if no message carrying the congestion indicator is received through the target port within the preset time interval, a second congestion notification message is sent to the target sending end.

[0166] The congestion flag in the second congestion notification message is set to the second flag, the second flag is used to indicate that the target port is currently in a normal state, and the second congestion notification message is used to instruct the target sending end to increase the message sending rate based on the second flag and the number of competing flows.

[0167] In the embodiment of the present disclosure, after determining that no message with a congestion identifier is received within the preset time interval, the real-time number of competing flows of the target port can be obtained, and a second congestion notification message can be generated. The second congestion notification message carries the number of competing flows and a second identifier (for example, the flag bit is set to 0) indicating that the target port is currently in a normal state is set in the ECN field. Then, after receiving the second congestion notification message, the target sending end increases the message sending rate, and the adjustment range can be determined based on the real-time number of competing flows of the target port. The specific process will be described in detail in the embodiment of the sending end, and the embodiment of the present disclosure will not be described in detail here.

[0168] In one embodiment, as shown in FIG. 4 , a congestion control method is provided, which is applied to a transmitting end and includes the following steps 402 to 406, wherein:

[0169] Step 402, sending a target message to a target port of a receiving end;

[0170] Step 404, receiving a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port;

[0171] Step 406: Determine a rate adjustment strategy according to the congestion indicator, and adjust the message sending rate according to the rate adjustment strategy and the number of competing flows.

[0172] In the embodiment of the present disclosure, the sending end can send a target message to the receiving end, and the destination port of the target message is the target port. After receiving the target message, the receiving end sends a congestion notification message to the sending end at a preset interval, and the congestion notification message carries the current real-time number of competing flows of the target port and a congestion identifier representing its congestion state. The process of the receiving end generating the congestion notification message can refer to the relevant description of the aforementioned embodiment, and will not be repeated in the embodiment of the present disclosure.

[0173] After the sending end parses the current real-time number of competing flows and the congestion identifier of the target port from the congestion notification message, it can determine the rate adjustment strategy based on the congestion identifier, and adjust the message sending rate based on the rate adjustment strategy and the number of competing flows, including lowering the message sending rate based on the rate adjustment strategy, or increasing the message sending rate based on the rate adjustment strategy. The specific downward adjustment range or upward adjustment range can be determined based on the current real-time number of competing flows of the target port.

[0174] In an exemplary embodiment, determining a rate adjustment strategy according to a congestion indicator includes:

[0175] When the congestion flag is the first flag, the rate adjustment strategy is determined to be a speed reduction adjustment strategy; or, when the congestion flag is the second flag, the rate adjustment strategy is determined to be a speed increase adjustment strategy.

[0176] In the embodiment of the present disclosure, when the congestion identifier is the first identifier, since the first identifier is used to characterize that the target port is currently in a congested state, it can be determined that the rate adjustment strategy is a speed reduction adjustment strategy, and the speed reduction adjustment strategy is a strategy for adjusting the message sending rate at a speed reduction; or, when the congestion identifier is the second identifier, since the second identifier is used to characterize that the target port is currently in a normal state, it can be determined that the rate adjustment strategy is an increase speed adjustment strategy, and the increase speed adjustment strategy is a strategy for adjusting the message sending rate at a speed increase.

[0177] In the above congestion control method, the sending end sends a target message to the target port of the receiving end, and receives a congestion notification message fed back by the receiving end in response to the target message. The congestion notification message carries the current number of competing flows and congestion identifier of the target port, and then the sending end can determine the rate adjustment strategy according to the congestion identifier, and adjust the message sending rate according to the rate adjustment strategy and the number of competing flows. Based on the congestion control method provided by the embodiment of the present disclosure, when adjusting the message sending rate, the sending end can fully consider the current number of competing flows of the port, so that the message sending rate can be efficiently adjusted, and congestion can be quickly relieved during congestion, and the message sending rate can be quickly restored after the congestion is relieved, thereby reducing the data transmission network delay and improving bandwidth utilization.

[0178] In an exemplary embodiment, when the rate adjustment strategy is a speed reduction adjustment strategy, as shown in FIG. 5 , in step 406, the message sending rate is adjusted according to the rate adjustment strategy and the number of competing flows, including the following steps 502 to 506, wherein:

[0179] Step 502, obtaining the number of historical competing flows of the target port;

[0180] Step 504, determining a target speed reduction method according to a ratio relationship between the number of competing flows and the number of historical competing flows;

[0181] Step 506: Determine the adjusted message sending rate using the target speed reduction method and the number of competing flows.

[0182] In the disclosed embodiment, the speed reduction adjustment strategy includes a first speed reduction method and a second speed reduction method, wherein the speed reduction range of the first speed reduction method is lower than the speed reduction range of the second speed reduction method. The number of historical competing flows of the target port is the number of competing flows of the target port carried in the congestion notification message sent by the receiving end last received by the sending end, that is, when the Nth congestion notification message sent by the receiving end is currently received, the number of historical competing flows is the number of competing flows carried in the N-1th congestion notification message.

[0183] According to the ratio relationship between the current real-time number of competing flows and the historical number of competing flows of the target port, the change range of the number of competing flows of the target port can be determined, for example: the increase range or the decrease range. Then the sending end can determine the target speed reduction method from the first speed reduction method and the second speed reduction method based on the change range, and use the target speed reduction range and the number of competing flows to adjust the message sending rate of the target port to obtain the adjusted message sending rate.

[0184] By adopting the congestion control method provided in the embodiment of the present disclosure, a suitable target speed reduction method can be determined based on the change amplitude of the competition flow of the port, and fine rate control can be achieved. Congestion can be alleviated within a speed adjustment cycle, the congestion response speed can be greatly improved, and the number of PFC triggering times can be reduced.

[0185] In an exemplary embodiment, the target speed reduction method is determined according to the ratio relationship between the number of competing flows and the number of historical competing flows, including:

[0186] When the ratio of the number of competing flows to the number of historical competing flows is less than a preset ratio, the target speed reduction method is determined to be the first speed reduction method; or, when the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, the target speed reduction method is determined to be the second speed reduction method.

[0187] In the disclosed embodiment, the preset ratio may be a preset ratio, and its value may be determined by a person skilled in the art as needed, for example, the preset ratio may be set to 2. Exemplarily, when the ratio of the number of competing flows to the number of historical competing flows is less than the preset ratio, it indicates that the change in the number of competing flows is not large, and at this time, the target speed reduction method may be determined to be the first speed reduction method, that is, a small speed reduction; or, when the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, it indicates that the change in the number of competing flows is large, such as in the case of a traffic burst, and at this time, the target speed reduction method may be determined to be the second speed reduction method, that is, a large speed reduction.

[0188] In an exemplary embodiment, when the target speed reduction mode is the first speed reduction mode, as shown in FIG. 6 , in step 506, the target speed reduction mode and the number of competing flows are used to determine the adjusted message sending rate, including the following steps 602 to 604, wherein:

[0189] Step 602, obtaining the current message sending rate of the target port;

[0190] Step 604, determining an adjusted message sending rate according to the preset ratio and the current message sending rate, wherein the adjusted message sending rate is positively correlated with the current message sending rate and negatively correlated with the preset ratio.

[0191] In the disclosed embodiment, when the target speed reduction method is the first speed reduction method, the adjusted message sending rate can be determined based on the preset ratio and the current message sending rate. The first speed reduction method can directly determine the adjusted message sending rate, and the adjusted message sending rate is positively correlated with the current message sending rate and negatively correlated with the preset ratio.

[0192] Exemplarily, the first deceleration mode may be multiplicative deceleration (MD), and the adjustment factor may be determined based on the preset ratio, the adjustment factor = 1-deceleration factor / preset ratio, and then the product of the current message sending rate and the adjustment factor is used as the adjusted message sending rate. Exemplarily, taking the preset ratio as 2 as an example, the adjusted message sending rate is obtained by referring to the following formula (I).

[0193] Formula (I)

[0194] in, Indicates the adjusted message sending rate. is the current message sending rate, is the deceleration factor, is the speed regulation factor and 2 is the preset ratio.

[0195] In an exemplary embodiment, when the target speed reduction mode is the second speed reduction mode, as shown in FIG. 7, in step 506, the target speed reduction mode and the number of competing flows are used to determine the adjusted message sending rate, which may include the following steps 702 to 704, wherein:

[0196] Step 702, obtaining the current message sending rate of the target port;

[0197] Step 704, determine the adjusted message sending rate according to the current message sending rate, the number of historical competing flows and the number of competing flows, wherein the adjusted message sending rate is positively correlated with the current message sending rate and the number of historical competing flows, and the adjusted message sending rate is negatively correlated with the number of competing flows.

[0198] In the embodiments of the present disclosure, in the embodiments of the present disclosure, when the target speed reduction method is the second speed reduction method, the adjusted message sending rate can be determined according to the historical number of competing flows, the current number of competing flows and the current message sending rate of the target port. The second speed reduction method can directly determine the adjusted message sending rate. The adjusted message sending rate is positively correlated with the current message sending rate and the historical number of competing flows, and negatively correlated with the current number of competing flows.

[0199] Exemplarily, the second deceleration mode may be a fast deceleration mode, and the deceleration range of the second deceleration mode is greater than the deceleration range of the first deceleration mode. Still taking the preset ratio of 2 as an example, the adjusted message sending rate is obtained by referring to the following formula (II).

[0200] Formula (II)

[0201] in, Indicates the adjusted message sending rate. is the current message sending rate, is the number of historical competing flows, is the number of competing flows.

[0202] In this way, the disclosed embodiment can limit the message sending rate according to the real-time number of competing flows of the port. For example, when the number of competing flows of the port increases from 1 to 10, one speed adjustment will reduce the rate to 1 / 10 of the current rate, which can quickly alleviate congestion when traffic bursts occur.

[0203] In an exemplary embodiment, when the rate adjustment strategy is a speed increase adjustment strategy, as shown in FIG. 8, in step 406, adjusting the message sending rate according to the rate adjustment strategy and the number of competing flows may include the following steps 802 to 808, wherein:

[0204] Step 802, obtaining the number of historical competing flows and the current message sending rate of the target port;

[0205] Step 804, determining a target sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate;

[0206] In the disclosed embodiment, the number of historical competing flows and the current message sending rate of the target port can be obtained. According to the current real-time number of competing flows, the number of historical competing flows and the current message sending rate of the target port, the target sending rate can be determined, and the target sending rate is used as the fair rate after the traffic pattern changes. The fair rate refers to the ideal allocated bandwidth that the system fairly allocates to each flow when network resources are limited. Using this bandwidth as the target value of the speed increase can improve the stability of the algorithm.

[0207] In an exemplary embodiment, determining the target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate may include the following steps:

[0208] Determine the candidate sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate; take the maximum value of the candidate sending rate and the current message sending rate as the target sending rate, as shown in the following formula (III).

[0209] Formula (III)

[0210] in, Indicates the target sending rate.

[0211] In the disclosed embodiment, the ratio of the number of historical contention flows to the number of contention flows can be determined, and the product of the current message sending speed and the ratio can be used as the candidate sending rate. The maximum value between the candidate sending rate and the current message sending rate can be determined, and the maximum value can be used as the target sending rate.

[0212] Step 806, determining the current number of consecutive speed-up times, and determining a target speed-up amplitude based on the current number of consecutive speed-up times;

[0213] Exemplarily, when the sending end determines that the rate adjustment strategy is the speed-up adjustment strategy, the number of continuous speed-up increases + 1 will be used as the current number of continuous speed-up increases, and when the rate adjustment strategy is determined to be the speed-down adjustment strategy, the number of continuous speed-up increases will be cleared to zero. When the sending end determines that the rate adjustment strategy is the speed-up adjustment strategy, the current number of continuous speed-up increases can be obtained, that is, if the previous speed-up adjustment strategy was also adopted, the current number of continuous speed-up increases inc_cnt+=1, if the previous speed-down adjustment strategy was adopted, the current number of continuous speed-up increases inc_cnt is 1.

[0214] After determining the current number of consecutive speed-up times, the target speed-up amplitude can be determined based on the current number of consecutive speed-up times. For example, when the current number of consecutive speed-up times is small, it indicates that the speed-up adjustment has just begun. Therefore, a small speed-up rate can be used at this time to slowly restore the message sending rate while avoiding congestion again. On the contrary, when the number of consecutive speed-up times is large, it indicates that the speed-up has been increased for many times in a row. Therefore, a large speed-up rate can be used to increase the speed of the increase and speed up the recovery of the message sending rate.

[0215] In an exemplary embodiment, determining the target acceleration amplitude based on the current number of continuous acceleration times may include the following steps: when the current number of continuous acceleration times is less than a preset number (the preset number can be represented as F in the embodiment of the present disclosure), determining the target acceleration amplitude to be a first acceleration amplitude; or, when the current number of continuous acceleration times is greater than or equal to the preset number, determining the target acceleration amplitude to be a second acceleration amplitude, wherein the first acceleration amplitude is lower than the second acceleration amplitude.

[0216] In an exemplary embodiment, a first hyperparameter AI0 and a second hyperparameter HAI0 may be preset, and the first hyperparameter AI0 is smaller than the second hyperparameter HAI0. The first speed increase amplitude AI may be , the second acceleration amplitude HAI can be .

[0217] In another exemplary embodiment, the first speed increase amplitude and the second speed increase amplitude can be determined by the number of competing flows, for example: according to the numerical range to which the number of competing flows belongs, the corresponding first speed increase amplitude or second speed increase amplitude is determined, assuming that the first speed increase amplitude includes AI1 corresponding to the first numerical range, AI2 corresponding to the second numerical range, and AI3 corresponding to the third numerical range, wherein the tail endpoint of the first numerical range is smaller than the head endpoint of the second numerical range, and the tail endpoint of the second numerical range is smaller than the head endpoint of the third numerical range, then AI1> AI2> AI3. Then, when the current number of continuous speed increases is smaller than the preset number, and the current real-time number of competing flows of the target port is within the second numerical range, the first speed increase amplitude can be determined to be AI2.

[0218] Similarly, assuming that the second speed increase range includes HAI1 corresponding to the first numerical range, HAI2 corresponding to the second numerical range, and HAI3 corresponding to the third numerical range, wherein the tail endpoint of the first numerical range is smaller than the head endpoint of the second numerical range, and the tail endpoint of the second numerical range is smaller than the head endpoint of the third numerical range, then HAI1>HAI2>HAI3. Then, when the current number of consecutive speed increase times is greater than the preset number, and the current real-time number of competing flows of the target port is within the second numerical range, the second speed increase range can be determined to be HAI2.

[0219] Step 808, determining an adjusted message sending rate according to the target increase rate, the target sending rate and the current message sending rate.

[0220] In the embodiment of the present disclosure, when the target increase amplitude is obtained, the first rate can be determined according to the target increase amplitude and the target sending rate. For example, the sum of the target increase amplitude and the target sending rate is taken as the first rate (refer to formula (IV) and formula (V)). The first rate can be considered as the adjusted target sending speed, which can be expressed in formula (IV), formula (V) and formula (VI) as: , and the adjusted message sending rate can be determined based on the first rate and the current message sending rate. For example, the adjusted message sending rate can be obtained by weighted summing the first rate and the current message sending rate (refer to formula (six)).

[0221] Formula (IV)

[0222] Formula (V)

[0223] Formula (VI)

[0224] In an exemplary embodiment, determining an adjusted message sending rate based on a target growth rate, a target sending rate, and a current message sending rate may include: taking the sum of the target growth rate and the target sending rate as the first rate; and taking the average of the current message sending rate and the first rate as the adjusted message sending rate.

[0225] By adopting the congestion control method provided in the embodiment of the present disclosure, a suitable target growth rate can be determined based on the change range of the competing flows of the port. Regardless of the number of competing flows, the expected value of the bottleneck link throughput increase within a single growth rate cycle can be guaranteed, thereby improving throughput stability.

[0226] In an exemplary embodiment, the method further comprises:

[0227] The adjusted message sending rate is used as the current message sending rate, and the number of competing flows is used as the number of historical competing flows, so as to guide the adjustment of the message sending rate next time.

[0228] In order to enable those skilled in the art to better understand the embodiments of the present disclosure, the embodiments of the present disclosure are described below through specific examples.

[0229] As shown in Figure 9, an embodiment of the present disclosure provides a congestion control method, which performs congestion control through the collaboration of a sending end and a receiving end. Exemplarily, the sending end includes a rate calculation module, a parameter update module, and the receiving end includes a CNP generation module, the CNP generation module sends a CNP packet (congestion notification message) to the sending end at a preset time interval, and the rate calculation module and the parameter update module adjust the network card message sending rate and update the relevant algorithm hyperparameters according to the information carried in the CNP packet.

[0230] Specifically, the CNP generation module of the receiving end can carry the number of last-hop competing flows in the CNP message. The CNP generation module monitors the number N of competing flows received by each port of the receiving end network card, records it in the reserved field of the CNP message and feeds it back to the sending end, and uses a 1-bit mark bit in the CNP message as a congestion indicator to mark whether the port is congested. For example, the structure of the CNP message can be shown in FIG. 10. In the structure shown in FIG. 10, the reserved bit in the CNP message feeds back the number N of last-hop competing flows.

[0231] The receiving end receives the RoCEv2 message (target message) from the sending end through the target port. The Opcode field of the IBBTH header of the RoCEv2 message includes a message attribute tag, which indicates the type and operation of the message. For example, when performing an RDMA Send operation, the message attribute of the first data packet is marked as Send First, the message attribute of the last data packet is marked as Send Last, and the message attribute of the middle data packet is marked as Send Middle. The receiving end monitors the number of active flows at the receiving port, that is, the number of competing flows at the last hop, by identifying the Opcode field in the data packet header. The calculation method is shown in Figure 3.

[0232] The workflow of the CNP generation module at the receiving end is shown in Figure 11. After receiving the first data packet of the flow, the receiving end returns the first CNP message, and then generates a CNP message every interval Tus and returns it to the sending end, where T is a pre-set hyperparameter that affects the control speed frequency. Each CNP message carries the number of competing flows (N) at the last hop; if a data packet with CE (congestion) is received within the interval between two CNP messages, the congestion flag position is set to 1 to notify the sending end that there is congestion in the link.

[0233] Referring to Figure 12, the process of adjusting the message sending rate at the sending end according to the information carried in the CNP message is shown. After each CNP message is received, the rate calculation module can adjust the message sending rate according to the information carried in the CNP message; the initial speed limit is sent, and the number of competing flows N is set to 1; based on the congestion flag in the CNP message, choose to enter the speed reduction mode or the speed increase mode. Among them, when a CNP message with a congestion flag of 1 is received, the speed reduction mode is implemented, and a fast speed reduction strategy based on N can be used to alleviate congestion as soon as possible to avoid triggering PFC; when a CNP message with a congestion flag of 0 is received, the target sending rate is calculated based on N to increase the rate recovery speed, thereby achieving rapid convergence.

[0234] In view of the problem that DCQCN needs multiple speed adjustments to alleviate severe congestion caused by a high number of concurrent flows, which is easy to trigger PFC. In the disclosed embodiment, when the sender detects that the number of competing flows in the last hop has doubled, it can enter the fast speed reduction module, and limit the sending rate according to the number of competing flows. For example, when N increases from 1 to 10, one speed adjustment will reduce the rate to 1 / 10 of the current rate. Most current data centers use 1:1 non-convergence networking, and congestion rarely occurs inside the fabric. Most of the congestion caused by many-to-one or all-to-all traffic modes occurs in the last hop. This strategy can quickly alleviate congestion when traffic bursts.

[0235] When the number of competing flows on the bottleneck link suddenly decreases significantly, the DCQCN FR+AI-based speed-up strategy requires multiple iterations to restore the sending rate to the fair rate, resulting in throughput loss. The speed-up module that calculates the target rate based on the number of competing flows in the disclosed embodiment improves the rate recovery speed. Assuming that the algorithm has converged and a large number of flows suddenly exit, the idle bandwidth should be allocated to the remaining flows in proportion.

[0236] In the disclosed embodiment, the parameter update module at the transmitting end adaptively adjusts the speed-up step size according to the number of competing flows N carried in the CNP message, thereby achieving rapid recovery while avoiding packet loss caused by the synchronous speed-up of a large number of flows, taking into account both high throughput and stability. Exemplarily, the same AI and HAI parameters can be set for all scenarios. When the number of competing flows is small, the throughput recovery is slow. When the number of competing flows is high, it is easy to cause increased congestion and bandwidth loss. The disclosed embodiment designs a speed-up step size that is inversely proportional to the number of competing flows N, that is, AI=AI0 / N, HAI=HAI0 / N, where AI0 and HAI0 are fixed hyperparameters. By adaptively adjusting the additive speed-up step size through the above design, regardless of the number of competing flows, the expected value of the bottleneck link throughput increase within a single speed-up cycle can be guaranteed, thereby improving throughput stability.

[0237] Referring to Figures 13a and 13b, a schematic diagram of the recovery of the message sending rate of the traditional DCQCN network card and a schematic diagram of the recovery of the sending rate of the network card in the embodiment of the present application are shown when a flow suddenly exits the link (N:10->2). It is assumed that the current network topology is a 1:1 non-convergent fat-tree topology, and the link bandwidth between the server and the edge switch is 100Gbps. In this example, 10 sending nodes simultaneously send 10 1M-sized flows to the same receiving end, forming a typical incast scenario, and the initial sending rate of each flow is 100Gbps. At this time, the bottleneck link is the link from the edge switch to the receiving end. Since the total inlet bandwidth of the switch is greater than the outlet bandwidth, congestion will occur in the bottleneck link.

[0238] The specific manifestation of congestion is that the queue length in the switch gradually increases. When the queue length exceeds the preset ECN mark threshold, the switch will add an ECN mark to the forwarded packet. For the DCQCN algorithm, the sending rate is halved when a CNP data packet is received. It takes multiple speed reductions to reduce the sending rate to the fair rate (10Gbps) to alleviate network congestion. Based on the method proposed in the embodiment of the present disclosure, the sending end can reduce the rate to the fair rate when it receives the first CNP with an ECN mark, and the congestion relief speed is greatly improved.

[0239] Assume that after a period of time, 8 of the transmitters stop sending, and only two flows are left in the link to share the bottleneck link. The sending rate of these two flows should be restored to 50 Gbps. At this time, the target rate of the DCQCN algorithm has reached a relatively low level. Even through the combination of FR and AI / HAI, multiple speed-up cycles are required to increase the sending rate to the expected level (in actual use, this problem can be avoided by not updating the target rate during continuous speed reduction, but it is easy to introduce serious throughput fluctuations and prolong the algorithm convergence time). The method proposed in the embodiment of the present disclosure can quickly adjust the target rate after the flow exits. Assuming that the current rate is 10 Gbps, the number of competing flows is reduced from 10 to 2. According to the calculation formula of the target sending rate, the target rate can be obtained as 50 Gbps, which is close to the fair rate after the traffic pattern changes. Combined with the AI / HAI strategy, the rate recovery speed after congestion relief can be greatly improved.

[0240] By adopting the congestion control method provided by the embodiment of the present disclosure, the receiving end monitors and feeds back the number of competing flows in the last hop of the link, and the sending end can achieve more accurate congestion control based on multi-bit information; the congestion control method provided by the embodiment of the present disclosure designs a fast speed reduction strategy to quickly relieve congestion in traffic burst scenarios; data centers generally adopt non-blocking networking, and congestion caused by many-to-one or all-to-all traffic modes often occurs in the last hop. Through the fast speed reduction strategy, congestion can be relieved within a single speed reduction cycle, reducing the number of PFC triggering times; the congestion control method provided by the embodiment of the present disclosure calculates the target speed increase rate based on the number of competing flows in the last hop and adjusts the speed increase step size. The speed increase module quickly allocates idle bandwidth after the traffic exits congestion relief, thereby improving bandwidth utilization and throughput stability. The congestion control method provided by the embodiment of the present disclosure proposes a method in which the receiving end carries additional information through a CNP packet, without modifying the message format, and only adds an additional load of 2Bytes, achieving more accurate control with extremely low overhead.

[0241] It should be understood that, although the various steps in the flowcharts of Figures 1-12 are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in Figures 1-12 may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0242] In one embodiment, as shown in FIG. 14 , a congestion control device 1400 is provided, which is applied to a receiving end and includes: a first receiving unit 1402 and a sending unit 1404, wherein:

[0243] The first receiving unit 1402 is used to receive a target message sent by a target sending end through a target port, wherein the instruction field of the target message carries a message attribute tag;

[0244] The sending unit 1404 is used to send a congestion notification message to the target sending end at a preset interval if the message attribute mark indicates that the target message is the first message. The congestion notification message carries the current number of competing flows and a congestion identifier of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion identifier.

[0245] Based on the congestion control device provided by the embodiment of the present disclosure, the sending end can fully consider the current number of competing flows of the port when adjusting the message sending rate, so that the message sending rate can be efficiently adjusted to quickly relieve congestion during congestion and quickly restore the message sending rate after the congestion is relieved, thereby reducing the data transmission network delay and improving bandwidth utilization.

[0246] In one embodiment, the congestion notification message includes a first congestion notification message, and the sending unit 1404 is further configured to:

[0247] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time, if a message carrying a congestion indicator is received through the target port within the preset time, the first congestion notification message is sent to the target sending end,

[0248] The congestion flag in the first congestion notification message is set to a first flag, the first flag is used to indicate that the target port is currently in a congested state, and the first congestion notification message is used to instruct the target sending end to reduce a message sending rate based on the first flag and the number of competing flows.

[0249] In one embodiment, the congestion notification message includes a second congestion notification message, and the sending unit 1404 is further configured to:

[0250] When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time length, if no message carrying a congestion indicator is received through the target port within the preset time length, sending the second congestion notification message to the target sending end,

[0251] The congestion flag in the second congestion notification message is set to a second flag, the second flag is used to indicate that the target port is currently in a normal state, and the second congestion notification message is used to instruct the target sending end to increase the message sending rate based on the second flag and the number of competing flows.

[0252] In one embodiment, the device further comprises:

[0253] A second receiving unit is used to receive a message sent by any sending end through any port and obtain a message attribute tag carried in the message;

[0254] An updating unit is used to update the number of competing flows of the port according to the message attribute mark.

[0255] In one embodiment, the updating unit is further configured to:

[0256] When the message attribute mark indicates that the message is the first message, the number of competing flows of the port is increased by 1;

[0257] When the message attribute flag indicates that the message is the last message, the number of competing flows of the port is reduced by 1.

[0258] In one embodiment, as shown in FIG. 15 , a congestion control device 1500 is provided, which is applied to a sending end and includes: a sending unit 1502, a receiving unit 1504 and an adjusting unit 1506, wherein:

[0259] The sending unit 1502 is used to send a target message to a target port of a receiving end;

[0260] The receiving unit 1504 is configured to receive a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port;

[0261] The adjusting unit 1506 is configured to determine a rate adjustment strategy according to the congestion identifier, and adjust a message sending rate according to the rate adjustment strategy and the number of competing flows.

[0262] Based on the congestion control device provided by the embodiment of the present disclosure, the sending end can fully consider the current number of competing flows of the port when adjusting the message sending rate, so that the message sending rate can be efficiently adjusted to quickly relieve congestion during congestion and quickly restore the message sending rate after the congestion is relieved, thereby reducing the data transmission network delay and improving bandwidth utilization.

[0263] In one embodiment, the adjusting unit 1506 is further configured to:

[0264] When the congestion indicator is the first indicator, determining that the rate adjustment strategy is a speed reduction adjustment strategy;

[0265] When the congestion identifier is the second identifier, the rate adjustment strategy is determined to be a speed increase adjustment strategy.

[0266] In one embodiment, when the rate adjustment strategy is the rate reduction adjustment strategy, the adjustment unit 1506 is further configured to:

[0267] Obtain the number of historical competing flows of the target port;

[0268] Determining a target speed reduction method according to a ratio relationship between the number of competing flows and the number of historical competing flows;

[0269] The target speed reduction method and the number of competing flows are used to determine an adjusted message sending rate.

[0270] In one embodiment, the adjusting unit 1506 is further configured to:

[0271] When the ratio of the number of competing flows to the number of historical competing flows is less than a preset ratio, the target speed reduction method is determined to be the first speed reduction method; or, when the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, the target speed reduction method is determined to be the second speed reduction method; wherein the speed reduction amplitude of the first speed reduction method is lower than the speed reduction amplitude of the second speed reduction method.

[0272] In one embodiment, when the target speed reduction mode is the first speed reduction mode, the adjusting unit 1506 is further configured to:

[0273] Obtaining the current message sending rate of the target port;

[0274] An adjusted message sending rate is determined according to the preset ratio and the current message sending rate, wherein the adjusted message sending rate is positively correlated with the current message sending rate, and the adjusted message sending rate is negatively correlated with the preset ratio.

[0275] In one embodiment, when the target speed reduction mode is the second speed reduction mode, the adjusting unit 1506 is further configured to:

[0276] Obtaining the current message sending rate of the target port;

[0277] The adjusted message sending rate is determined based on the current message sending rate, the number of historical competing flows and the number of competing flows, wherein the adjusted message sending rate is positively correlated with the current message sending rate and the number of historical competing flows, and the adjusted message sending rate is negatively correlated with the number of competing flows.

[0278] In one of the embodiments, when the rate adjustment strategy is the speed increase adjustment strategy, the adjustment unit 1506 is further configured to:

[0279] Obtain the historical number of competing flows and the current message sending rate of the target port;

[0280] Determining a target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate;

[0281] Determine the current number of consecutive speed-up times, and determine a target speed-up amplitude based on the current number of consecutive speed-up times;

[0282] An adjusted message sending rate is determined according to the target increasing speed, the target sending rate and the current message sending rate.

[0283] In one embodiment, the adjusting unit 1506 is further configured to:

[0284] Determine a candidate sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate;

[0285] The maximum value of the candidate sending rate and the current message sending rate is used as the target sending rate.

[0286] In one embodiment, the adjusting unit 1506 is further configured to:

[0287] When the current number of consecutive acceleration times is less than the preset number, the target acceleration amplitude is determined to be the first acceleration amplitude; or, when the current number of consecutive acceleration times is greater than or equal to the preset number, the target acceleration amplitude is determined to be the second acceleration amplitude, wherein the first acceleration amplitude is lower than the second acceleration amplitude.

[0288] In one embodiment, the adjusting unit 1506 is further configured to:

[0289] Taking the sum of the target speed-up amplitude and the target sending rate as the first rate;

[0290] An average of the current message sending rate and the first rate is used as the adjusted message sending rate.

[0291] In one embodiment, the device further comprises:

[0292] An updating unit is used to use the adjusted message sending rate as the current message sending rate and the number of competing flows as the number of historical competing flows.

[0293] For the specific definition of the congestion control device, please refer to the definition of the communication method above, which will not be repeated here. Each module in the above communication device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0294] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG16. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a congestion control method is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0295] Those skilled in the art will understand that the structure shown in FIG. 16 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0296] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0297] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0298] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

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

[0300] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0301] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0302] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A congestion control method, characterized in that: Applied to the receiving end, the method comprises: Receiving a target message sent by a target sending end through a target port, wherein an instruction field of the target message carries a message attribute tag; If the message attribute mark indicates that the target message is the first message, a congestion notification message is sent to the target sending end at a preset interval, and the congestion notification message carries the current number of competing flows and a congestion flag of the target port. The congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion flag.

2. The method according to claim 1, characterized in that The congestion notification message includes a first congestion notification message, and the sending of the congestion notification message to the target sending end at each preset interval includes: When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time, if a message carrying a congestion indicator is received through the target port within the preset time, the first congestion notification message is sent to the target sending end, The congestion flag in the first congestion notification message is set to a first flag, the first flag is used to indicate that the target port is currently in a congested state, and the first congestion notification message is used to instruct the target sending end to reduce a message sending rate based on the first flag and the number of competing flows.

3. The method according to claim 1, characterized in that The congestion notification message includes a second congestion notification message, and the sending of the congestion notification message to the target sending end at each preset time interval includes: When the interval from the last time a congestion notification message was sent to the target sending end reaches a preset time length, if no message carrying a congestion indicator is received through the target port within the preset time length, sending the second congestion notification message to the target sending end, The congestion flag in the second congestion notification message is set to a second flag, the second flag is used to indicate that the target port is currently in a normal state, and the second congestion notification message is used to instruct the target sending end to increase the message sending rate based on the second flag and the number of competing flows.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: For any port, receive a message sent by any sending end through the port, and obtain a message attribute tag carried in the message; The number of competing flows of the port is updated according to the message attribute tag.

5. The method according to claim 4, characterized in that The updating of the number of competing flows of the port according to the message attribute mark comprises: When the message attribute mark indicates that the message is the first message, the number of competing flows of the port is increased by 1; When the message attribute flag indicates that the message is the last message, the number of competing flows of the port is reduced by 1.

6. A congestion control method, characterized in that: Applied to the sending end, the method includes: Send the target message to the target port of the receiving end; Receiving a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port; A rate adjustment strategy is determined according to the congestion identifier, and a message sending rate is adjusted according to the rate adjustment strategy and the number of competing flows.

7. The method according to claim 6, characterized in that The determining of the rate adjustment strategy according to the congestion indicator includes: When the congestion indicator is the first indicator, determining that the rate adjustment strategy is a speed reduction adjustment strategy; When the congestion identifier is the second identifier, the rate adjustment strategy is determined to be a speed increase adjustment strategy.

8. The method according to claim 7, characterized in that In the case where the rate adjustment strategy is the rate reduction adjustment strategy, adjusting the message sending rate according to the rate adjustment strategy and the number of competing flows includes: Obtain the number of historical competing flows of the target port; Determining a target speed reduction method according to a ratio relationship between the number of competing flows and the number of historical competing flows; The target speed reduction method and the number of competing flows are used to determine an adjusted message sending rate.

9. The method according to claim 8, characterized in that The determining of the target speed reduction method according to the ratio relationship between the number of competing flows and the number of historical competing flows includes: When the ratio of the number of competing flows to the number of historical competing flows is less than a preset ratio, determining the target speed reduction mode to be the first speed reduction mode; or, When the ratio of the number of competing flows to the number of historical competing flows is greater than or equal to the preset ratio, determining the target speed reduction mode to be the second speed reduction mode; The speed reduction range of the first speed reduction method is lower than the speed reduction range of the second speed reduction method.

10. The method according to claim 9, characterized in that When the target speed reduction mode is the first speed reduction mode, the step of adopting the target speed reduction mode and the number of competing flows to determine the adjusted message sending rate includes: Obtaining the current message sending rate of the target port; An adjusted message sending rate is determined according to the preset ratio and the current message sending rate, wherein the adjusted message sending rate is positively correlated with the current message sending rate, and the adjusted message sending rate is negatively correlated with the preset ratio.

11. The method according to claim 9, characterized in that When the target speed reduction mode is the second speed reduction mode, the step of adopting the target speed reduction mode and the number of competing flows to determine the adjusted message sending rate includes: Obtaining the current message sending rate of the target port; The adjusted message sending rate is determined based on the current message sending rate, the number of historical competing flows and the number of competing flows, wherein the adjusted message sending rate is positively correlated with the current message sending rate and the number of historical competing flows, and the adjusted message sending rate is negatively correlated with the number of competing flows.

12. The method according to claim 7, characterized in that In the case where the rate adjustment strategy is the speed increase adjustment strategy, adjusting the message sending rate according to the rate adjustment strategy and the number of competing flows includes: Obtain the historical number of competing flows and the current message sending rate of the target port; Determining a target sending rate according to the number of historical competing flows, the number of competing flows, and the current message sending rate; Determine the current number of consecutive speed-up times, and determine a target speed-up amplitude based on the current number of consecutive speed-up times; An adjusted message sending rate is determined according to the target increasing speed, the target sending rate and the current message sending rate.

13. The method according to claim 12, characterized in that The determining the target sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate includes: Determine a candidate sending rate according to the number of historical competing flows, the number of competing flows and the current message sending rate; The maximum value of the candidate sending rate and the current message sending rate is used as the target sending rate.

14. The method according to claim 12 or 13, characterized in that The determining of the target speed-up amplitude based on the current number of consecutive speed-up times includes: When the current number of consecutive acceleration times is less than a preset number, determining the target acceleration amplitude to be a first acceleration amplitude; or, When the current number of consecutive acceleration times is greater than or equal to the preset number of times, determining the target acceleration amplitude to be a second acceleration amplitude, Among them, the first growth rate is lower than the second growth rate.

15. The method according to claim 12, characterized in that The step of determining the adjusted message sending rate according to the target increase rate, the target sending rate, and the current message sending rate includes: Taking the sum of the target speed-up amplitude and the target sending rate as the first rate; An average of the current message sending rate and the first rate is used as the adjusted message sending rate.

16. The method according to claim 8 or 12, characterized in that: The method further comprises: The adjusted message sending rate is used as the current message sending rate, and the number of competing flows is used as the number of historical competing flows.

17. A congestion control device, characterized in that: Applied to a receiving end, the device comprises: A first receiving unit, configured to receive a target message sent by a target sending end through a target port, wherein an instruction field of the target message carries a message attribute tag; A sending unit, used for sending a congestion notification message to the target sending end at a preset interval if the message attribute mark indicates that the target message is the first message, wherein the congestion notification message carries the current number of competing flows and a congestion identifier of the target port, and the congestion notification message is used to instruct the target sending end to adjust the message sending rate according to the number of competing flows and the congestion identifier.

18. A congestion control device, characterized in that: Applied to a transmitting end, the device comprises: A sending unit, used for sending a target message to a target port of a receiving end; A receiving unit, configured to receive a congestion notification message fed back by the receiving end in response to the target message, wherein the congestion notification message carries the current number of competing flows and a congestion indicator of the target port; An adjustment unit is used to determine a rate adjustment strategy according to the congestion identifier, and adjust the message sending rate according to the rate adjustment strategy and the number of competing flows.

19. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 or 6 to 16 are implemented.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or 6 to 16 are implemented.

21. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or 6 to 16 are implemented.

Citation Information

Cited By

  • Network rate control method and device, chip, network interface card, computer equipment, readable storage medium and program product

    CN120186091A

  • Cooperative congestion control method based on INCAST life cycle state perception

    CN122621540A

  • A collaborative congestion control method based on INCAST lifecycle state awareness

    CN122621540B