Congestion window adjustment method and system based on latency variation
By adjusting the congestion window using the delay gradient in the BBR congestion control algorithm, the problem of poor throughput when BBR competes with Cubic is solved, achieving more efficient data transmission and bandwidth fairness.
Patent Information
- Application Number
- CN202411757464.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-12-03
AI Technical Summary
When competing with Cubic traffic, the BBR congestion control algorithm suffers from poor throughput and an inability to respond in a timely manner, leading to increased latency and a decrease in bandwidth estimation, thus failing to compete fairly for bandwidth with Cubic traffic.
The delay gradient change of the current window is obtained every round-trip time (RTT), the congestion window compensation value ExtraGain is calculated, and the size of the congestion window is adjusted using ExtraGain, which is then dynamically adjusted in combination with packet loss.
It improves the throughput of the algorithm when coexisting with Cubic streams, enhances the efficiency of wide area network data transmission, shares bandwidth fairly with Cubic, and has a fast response and convergence speed.
Smart Images

Figure CN119449718B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a congestion window adjustment method and system based on latency variation. Background Technology
[0002] Commonly used congestion control algorithms in the current Internet include CUBIC and BBR. CUBIC is a traditional congestion control algorithm that determines congestion based on packet loss and then performs congestion control. BBR is a new congestion control algorithm that is based on congestion itself rather than on packet loss or delay. It requires measuring bottleneck bandwidth and round-trip time to determine congestion and then perform congestion control.
[0003] Cubic has the following problems:
[0004] (1) The overreaction to packet loss severely affects Cubic throughput in the presence of random packet loss;
[0005] (2) It can easily cause the buffer of the forwarding device to expand, increasing the latency.
[0006] Before the advent of BBR, mainstream TCP congestion control algorithms were designed based on packet loss. This assumption can be traced back to the 1980s and 1990s, when link bandwidth and memory capacity were measured in Mbps and KB respectively, and link quality (by today's standards) was also very poor.
[0007] More than thirty years later, both physical capacities have increased by at least six orders of magnitude, and the link quality is vastly different. In particular, in modern infrastructure, packet loss and latency do not necessarily indicate network congestion, so the original assumptions no longer hold. Starting from this fundamental problem, Google's network team (building on previous work) designed and implemented a new congestion control algorithm based on congestion itself rather than on packet loss or latency, abbreviated as BBR.
[0008] In simple terms, BBR calculates the actual delivery rate using the RTT information and the number of bytes sent in the ACK packet, and then adjusts the client's subsequent sending rate accordingly. By maintaining a reasonable amount of inflight data, it maximizes transmission bandwidth and minimizes transmission latency. Furthermore, it operates entirely on the sending end, requiring no changes to the protocol, receiving end, or network, making it relatively easy to implement.
[0009] BBR throughput is not affected by random packet loss, but it is easily squeezed when competing with Cubic traffic when the buffer of the forwarding device (switch or router) is large. We believe this is mainly because BBR does not respond to the increase in latency in a timely manner, making it difficult for it to compete with Cubic traffic for bandwidth.
[0010] The BBR congestion window is calculated as follows, where bw is the maximum bandwidth sample value within 10 RTTs, and rtt is the minimum latency sample value within 10 seconds (this rtt is also called RT). Prop This refers to the minimum delay of the optical / electrical signal from end A (transmitter) to end B (receiver) (actually twice the delay because it's a round trip), which depends on the physical distance.
[0011] cwnd=2 * bw * rtt
[0012] The way RTT is estimated causes BBR to be unable to react to the increase in latency in a timely manner. In the worst case, it needs to wait 10 seconds for the current RTT estimate to expire.
[0013] When BBR traffic competes with Cubic traffic, Cubic traffic gradually fills the switch / router's buffer, causing increased latency. BBR cannot react promptly, resulting in its congestion window being much smaller than Cubic's, and throughput is gradually squeezed. This squeezed throughput further reduces the BBR's bandwidth sample value, and the decrease in bw further reduces the BBR's congestion window.
[0014] Figure 1 The diagram illustrates how the congestion window and throughput change over time when a BBR and a Cubic flow are competing for resources.
[0015] When latency increases, BBR can only wait 10 seconds for the current latency estimate to expire before obtaining a more accurate latency estimate. Furthermore, although waiting 10 seconds allows for a more accurate latency value, the earlier time frame puts BBR at a disadvantage in competition with Cubic, leading to a decrease in its bandwidth sample value and bandwidth estimate (bw). Consequently, the congestion window size remains significantly smaller than that of Cubic.
[0016] Therefore, how to solve the problem of poor throughput of BBR when competing with Cubic, without squeezing the flow of Cubic, is the problem that this application needs to solve. Summary of the Invention
[0017] Purpose of the invention: To propose a congestion window adjustment method based on time delay variation, and further to propose a system for implementing the method, so as to solve the above-mentioned problems existing in the prior art.
[0018] The present invention proposes a congestion window adjustment method based on time delay variation, the main idea of which is as follows:
[0019] Every round-trip time (RTT), the delay gradient change of the current window is obtained, and the compensation value ExtraGain of the congestion window is calculated based on the delay gradient change. The size of the congestion window is then adjusted using the compensation value ExtraGain.
[0020] As an alternative approach, the congestion window compensation value ExtraGain can be calculated based on the change in time delay gradient, as shown in the following formula:
[0021]
[0022] In the formula, , , These are the maximum latency within the current RTT, the maximum latency within the previous RTT, and the current estimated RTT, respectively.
[0023] As an optional approach, the compensation value ExtraGain is halved when packet loss is detected;
[0024] When the time delay gradient is positive, it means that the time delay is increasing, and ExtraGain becomes larger at this time;
[0025] When the time delay gradient is negative, it means that the time delay is decreasing. At this time, ExtraGain decreases until it becomes 0, and the congestion window should decrease accordingly.
[0026] As an alternative, the congestion window size can be adjusted using the compensation value ExtraGain as (2 + ExtraGain) * BDP; where BDP represents the sum of bits of data that can be stored on the entire physical link without router buffers.
[0027]
[0028] In the formula, BtlBw is the bottleneck bandwidth in the link. Among the several links from A to B, the bandwidth of the slowest link is taken as the bottleneck bandwidth; RTprop is the time required for a packet to travel back and forth in the link when there is no queuing and no packet loss, that is, the minimum value of the round-trip time (RTT).
[0029] As an alternative approach, this congestion window adjustment method can be used to improve the BBRv1 version, with the following steps:
[0030] For the target monitoring link, after receiving the ACK message, the sending time and receiving time of the message are recorded, and the round-trip time (RTT) is calculated based on the sending time and receiving time.
[0031] If the buffer of the forwarding device on the link is greater than the first predetermined value and there is contention of cubic streams, the round-trip time (RTT) will increase. At this time, the transmission will be carried out according to the previous RTprop, and the update will be performed after the first predetermined duration.
[0032] As the round-trip time (RTT) increases, the compensation value ExtraGain increases synchronously, and the congestion window increases synchronously, thereby allowing the BBR flow to seize more bandwidth.
[0033] As an alternative approach: when the Cubic stream exits, the data in the switch buffer is gradually emptied, and the RTT decreases. At this time, the compensation value ExtraGain first decreases to 1, and then decreases to 0.
[0034] After the Cubic stream exits, it reverts to standard BBR mode.
[0035] Furthermore, this invention proposes a congestion window adjustment system based on time delay variation. The system includes at least one execution module. The execution module acquires the time delay gradient change of the current window every round-trip time (RTT), calculates the compensation value ExtraGain of the congestion window based on the time delay gradient change, and adjusts the size of the congestion window using the compensation value ExtraGain. The execution module can automatically execute the above-mentioned congestion window adjustment method based on time delay variation.
[0036] Furthermore, the present invention also proposes an electronic device comprising:
[0037] One or more processors;
[0038] Memory used to store processor-executable program code;
[0039] The processor is configured to execute program code to implement the congestion window adjustment method based on latency changes.
[0040] Furthermore, the present invention also proposes a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described congestion window adjustment method based on latency variation.
[0041] The congestion window adjustment method based on latency variation disclosed above can be embedded in end-side devices, such as user terminals and servers, in the form of software.
[0042] Compared to the traditional BBR algorithm, the congestion window adjustment method based on time delay variation proposed in this application has at least the following advantages:
[0043] (1) It significantly improves the throughput of the algorithm when coexisting with Cubic streams, thereby improving the data transmission efficiency in wide area networks.
[0044] (2) Fairness is taken into consideration, and bandwidth can be shared fairly with Cubic.
[0045] (3) Using time delay gradient for window adjustment results in fast response and fast convergence. Attached Figure Description
[0046] Figure 1 This is a graph showing the changes in congestion window and throughput over time when a traditional BBR algorithm and a Cubic flow compete for resources.
[0047] Figure 2 The graph shows the performance of the improved algorithm dBBR and related technologies tested on a real machine.
[0048] Figure 3 This is a graph showing the throughput over time when an improved algorithm dBBR competes with a Cubic flow. Detailed Implementation
[0049] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0050] This embodiment discloses a congestion control algorithm for improving data transmission throughput over a wide area network (WAN), applicable to WAN data express services to enhance transmission efficiency. This invention is based on the BBR congestion control algorithm and optimizes it to address the difficulty of BBR competing with Cubic in large buffer conditions. The invention utilizes delay gradients to adjust the congestion window size of BBR in a timely manner, considering fairness in coexistence with Cubic, and adjusts it promptly when packet loss occurs to avoid squeezing the throughput of the Cubic flow. Every RTT (Round-Trip Time), the current delay gradient value is calculated, and the congestion window size is adjusted using this value. Whenever packet loss occurs, the window size is reduced. This reduction considers both fairness in coexistence with Cubic and the impact of random packet loss on throughput. To reduce the impact of delay jitter on the congestion window size, the window size is initially kept unchanged when a smaller delay is detected.
[0051] The following examples illustrate the specific details of this congestion window adjustment method based on time delay variation. Before proceeding with the detailed explanation, to avoid ambiguity, some technical terms appearing in the examples will be explained first:
[0052] BBR (Bottleneck Bandwidth and Round-trip propagation time).
[0053] RTT (round-trip time);
[0054] Bw (Bandwidth);
[0055] Cwnd (Congestion Window);
[0056] BDP (Bandwidth Delay Product).
[0057] There are currently three versions of BBR, and we will mainly describe the improvements made to BBRv1. Similar mechanisms can also be applied to BBRv2 and BBRv3.
[0058] In the mechanism of this invention, a compensation value for a window is calculated based on the change in the time delay gradient, specifically:
[0059] , , These are the maximum latency within the current RTT, the maximum latency within the previous RTT, and the current estimated RTT. ExtraGain is calculated using the following formula:
[0060] (1)
[0061] The original BBR congestion window calculation method was 2 * BDP; this has been modified to...
[0062] (2+ExtraGain)∗BDP (2)
[0063] When packet loss is detected, ExtraGain is halved to correspond with the halving of the window when Cubic encounters packet loss, thus avoiding being too aggressive.
[0064] When the time delay gradient is positive, it means that the time delay is increasing, and ExtraGain increases; when the time delay gradient is negative, it means that the time delay is decreasing, and ExtraGain decreases.
[0065] Note: BDP is the sum of bits of data that can be stored on the entire physical link (excluding router caches), BDP = BtlBw * RTprop, i.e., bw * rtt as mentioned above. Here, BtlBw is the bottleneck bandwidth; in a link from A to B, its bandwidth depends on the bandwidth of the slowest segment of the link.
[0066] The traditional BBR process is as follows, when RTT increases:
[0067] (1) Continuously measure bandwidth and RTT. After receiving the ACK message, calculate the RTT of the message. For example, record the sending time and receiving time of the message. Calculate the RTT based on the sending time and receiving time. The BBR takes the minimum RTT value measured in 10 seconds as the estimated value. At the same time, calculate the bandwidth in the past period. Take the maximum bandwidth value measured in 10 RTTs as the estimated value of the bandwidth. Use the product of the bandwidth estimate and the delay estimate as the estimated value of the link BDP.
[0068] (2) If there are many buffers in the forwarding devices along the path and there is contention in the cubic flow, the latency will increase. However, the standard BBR flow uses the minimum RTT value of the past 10 seconds as the RTT estimate. Therefore, the BBR will not react to the received large latency samples for the time being, and will still calculate the congestion window according to the previous RTT estimate. It can only be updated after 10 seconds when it enters the ProbeRTT stage, which is a relatively slow response. At the same time, since the congestion window is much smaller than the cubic flow, the throughput of the BBR is affected, which leads to a smaller measured bandwidth value, further reducing the congestion window.
[0069] The BBR process in this invention is as follows, when RTT increases:
[0070] (1) Continuously measure bandwidth and RTT. After receiving the ACK message, calculate the RTT of the message. For example, record the sending time and receiving time of the message. Calculate the RTT based on the sending time and receiving time. The minimum value of the measured RTT will be recorded. At the same time, calculate the bandwidth. The maximum measured bandwidth will also be recorded (standard BBR process).
[0071] (2) If there are many buffers of forwarding devices on the path and there is contention of cubic flow, the latency will increase. The BBR flow of the present invention will still be sent according to the previously estimated RTprop, and it will be updated after 10 seconds. However, the change of RTT will lead to the increase of ExtraGain (refer to Equation 1 above).
[0072] (3) A larger ExtraGain will lead to a larger congestion window (refer to Equation 2 above). A larger congestion window will benefit the bandwidth preemption of BBR streams.
[0073] (4) In addition, when packet loss is detected, ExtraGain is halved to correspond with the window being halved when Cubic encounters packet loss, so as to avoid being too aggressive.
[0074] (5) When RTT decreases, ExtraGain will decrease until it becomes 0, and the window will decrease accordingly to avoid being too aggressive.
[0075] For example, suppose a link's round-trip time (RTT) is 30 milliseconds. When only one BBR flow is running, the RTT samples obtained by the BBR are generally 30 milliseconds, and the BBR's RTT estimate is 30 milliseconds. When a cubic flow joins, it starts accumulating packets in the switch's buffer, causing an increase in RTT. Suppose that after one RTT, the link latency rises to 120 milliseconds (meaning there is 3 * BDP data accumulating in the switch's buffer).
[0076] The standard BBR will still use 2 * BDP as the current congestion window size. At this time, at most 1 * BDP of data in the switch buffer is sent by the BBR flow, and the remaining 2 * BDP of data is sent by the Cubic flow. Therefore, the throughput ratio of the BBR flow and the Cubic flow is theoretically 1:2.
[0077] In this invention, BBR calculates ExtraGain = (120 - 30) / 30 = 3 according to formula (1), and then calculates the size of the congestion window as 5 * BDP according to formula (2). Since the data accumulation in the switch is 3 * BDP, the size of this congestion window ensures that the throughput will not be squeezed by Cubic.
[0078] When the Cubic stream exits, the data in the switch buffer is gradually emptied, and the latency decreases. Assuming the latency decreases to 60 milliseconds in the first RTT after the Cubic stream exits and to 30 milliseconds in the second RTT, then according to formula (1), the ExtraGain value will first decrease to 1, and then to 0. After the Cubic stream exits, the system reverts to standard BBR mode.
[0079] The performance of this invention (the improved algorithm is called dBBR) and related technologies was tested on a real machine, such as... Figure 2 As shown. By Figure 2 It can be seen that, compared with the BBR algorithm and the latest technology, the present invention improves throughput by about 2 to 5 times.
[0080] Figure 3 This demonstrates how throughput changes over time when a dBBR and a Cubic stream compete.
[0081] This improved algorithm, dBBR, adjusts the size of the congestion window more quickly based on changes in the delay gradient, enabling it to achieve a throughput close to that of Cubic and converge quickly. Furthermore, this invention considers fairness with Cubic by promptly slowing down when packet loss occurs, ensuring good fairness.
[0082] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0083] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0085] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0086] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0087] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0088] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A method for adjusting congestion window based on latency variation, the method comprising: Every other round-trip time RTT, the delay gradient change of the current window is obtained, and a compensation value ExtraGain of the congestion window is calculated according to the delay gradient change, and the size of the congestion window is adjusted by using the compensation value ExtraGain; The compensation value ExtraGain of the congestion window is calculated according to the delay gradient change, and the calculation formula is as follows: In the formula, , , are respectively the maximum delay in the current RTT time, the maximum delay in the last RTT time, and the current RTT estimation value. The size of the congestion window is adjusted by using the compensation value ExtraGain, which is (2+ExtraGain)*BDP; Wherein, BDP represents the sum of bit data that can be stored in the whole physical link without router cache: In the formula, BtlBw is the bottleneck bandwidth in the link, and the bandwidth of the slowest link is taken as the bottleneck bandwidth in the several links from A to B; RTprop is the time required for a packet to go back and forth in the link without queuing and packet loss, that is, the minimum value of the round-trip time RTT; The congestion window adjustment method is used to improve the BBRv1 version, and the steps are as follows: For the target monitoring link, after receiving the ACK packet, the sending time and the receiving time of the packet are recorded, and the round-trip time RTT is calculated according to the sending time and the receiving time; If the cache of the forwarding device on the link is greater than the first predetermined value and there is a cubic flow competition, the round-trip time RTT increases at this time, and the previous RTprop is sent at this time, and the first predetermined time is experienced to update; After the round-trip time RTT increases, the compensation value ExtraGain increases synchronously, and the congestion window increases synchronously, so as to occupy more bandwidth for the BBR flow; When the Cubic flow exits, the data in the switch buffer is gradually emptied, the RTT decreases, the compensation value ExtraGain is first reduced to 1, and then reduced to 0; After the Cubic flow exits, the standard BBR mode is restored.
2. The method of claim 1, wherein: When a packet loss is detected, the compensation value ExtraGain is halved.
3. The method of claim 1, wherein: When the delay gradient is positive, it means that the delay is increasing, and at this time, the ExtraGain increases; When the delay gradient is negative, it means that the delay is decreasing, and at this time, the ExtraGain decreases until 0, and the corresponding congestion window decreases.
4. A system for adjusting a congestion window based on a change in latency, the system comprising: The execution module comprises at least one execution module; The execution module obtains the delay gradient change of the current window every other round-trip time RTT, and calculates a compensation value ExtraGain of the congestion window according to the delay gradient change, and adjusts the size of the congestion window by using the compensation value ExtraGain; The execution module can automatically execute the congestion window adjustment method based on the delay change as claimed in any one of claims 1 to 3.
5. An electronic device, comprising: The electronic device comprises: One or more processors; A memory for storing program codes executable by the processor; The processor is configured to execute the program codes to implement the congestion window adjustment method based on the delay change as claimed in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, When the instructions in the computer readable storage medium are executed by the processor of the electronic device, the electronic device can execute the congestion window adjustment method based on the delay change as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Configurable low-delay congestion control method and system for mobile cellular network
CN113747498A
Congestion control method, device and equipment
CN117749710A