Internet-Draft | TCP CUBIC | May 2022 |
Xu, et al. | Expires 1 December 2022 | [Page] |
CUBIC is a standard TCP congestion control algorithm that uses a cubic function instead of a linear congestion window increase function to improve scalability and stability over fast and long-distance networks. CUBIC has been adopted as the default TCP congestion control algorithm by the Linux, Windows, and Apple stacks.¶
This document updates the specification of CUBIC to include algorithmic improvements based on these implementations and recent academic work. Based on the extensive deployment experience with CUBIC, it also moves the specification to the Standards Track, obsoleting RFC 8312. This also requires updating RFC 5681, to allow for CUBIC's occasionally more aggressive sending behavior.¶
This note is to be removed before publishing as an RFC.¶
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-ietf-tcpm-rfc8312bis/.¶
Discussion of this document takes place on the TCPM Working Group mailing list (mailto:tcpm@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/tcpm/.¶
Source for this draft and an issue tracker can be found at https://github.com/NTAP/rfc8312bis.¶
xml2rfc currently renders <em></em>
in the XML by surrounding the
corresponding text with underscores. This is highly distracting;
please manually remove the underscores when doing the final edits to
the text version of this document.¶
(There is an issue open against xml2rfc to stop doing this in the future: https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/596)¶
Also, please manually change "Figure" to "Equation" for all artwork with anchors beginning with "eq" - xml2rfc doesn't seem to be able to do this.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 1 December 2022.¶
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
CUBIC has been adopted as the default TCP congestion control algorithm in the Linux, Windows, and Apple stacks, and has been used and deployed globally. Extensive, decade-long deployment experience in vastly different Internet scenarios has convincingly demonstrated that CUBIC is safe for deployment on the global Internet and delivers substantial benefits over classical Reno congestion control [RFC5681]. It is therefore to be regarded as the currently most widely deployed standard for TCP congestion control. CUBIC can also be used for other transport protocols such as QUIC [RFC9000] and SCTP [RFC4960] as a default congestion controller.¶
The design of CUBIC was motivated by the well-documented problem classical Reno TCP has with low utilization over fast and long-distance networks [K03][RFC3649]. This problem arises from a slow increase of the congestion window following a congestion event in a network with a large bandwidth-delay product (BDP). [HLRX07] indicates that this problem is frequently observed even in the range of congestion window sizes over several hundreds of packets. This problem is equally applicable to all Reno-style standards and their variants, including TCP-Reno [RFC5681], TCP-NewReno [RFC6582][RFC6675], SCTP [RFC4960], TFRC [RFC5348], and QUIC congestion control [RFC9002], which use the same linear increase function for window growth. We refer to all Reno-style standards and their variants collectively as "Reno" below.¶
CUBIC, originally proposed in [HRX08], is a modification to the congestion control algorithm of classical Reno to remedy this problem. Specifically, CUBIC uses a cubic function instead of the linear window increase function of Reno to improve scalability and stability under fast and long-distance networks.¶
This document updates the specification of CUBIC to include algorithmic improvements based on the Linux, Windows, and Apple implementations and recent academic work. Based on the extensive deployment experience with CUBIC, it also moves the specification to the Standards Track, obsoleting [RFC8312]. This requires an update to [RFC5681], which limits the aggressiveness of Reno TCP implementations in its Section 3. Since CUBIC is occasionally more aggressive than the [RFC5681] algorithms, this document updates [RFC5681] to allow for CUBIC's behavior.¶
Binary Increase Congestion Control (BIC-TCP) [XHR04], a predecessor of CUBIC, was selected as the default TCP congestion control algorithm by Linux in the year 2005 and had been used for several years by the Internet community at large.¶
CUBIC uses a similar window increase function as BIC-TCP and is designed to be less aggressive and fairer to Reno in bandwidth usage than BIC-TCP while maintaining the strengths of BIC-TCP such as stability, window scalability, and round-trip time (RTT) fairness.¶
[RFC5033] documents the IETF's best current practices for specifying new congestion control algorithms, specifically, ones that differ from the general congestion control principles outlined in [RFC2914]. It describes what type of evaluation is expected by the IETF to understand the suitability of a new congestion control algorithm and the process to enable a specification to be approved for widespread deployment in the global Internet.¶
There are areas in which CUBIC differs from the congestion control algorithms previously published in standards-track RFCs; those changes are specified in this document. However, it is not obvious that these changes go beyond the general congestion control principles outlined in [RFC2914], so the process in [RFC5033] may not apply.¶
Also, the wide deployment of CUBIC on the Internet was driven by direct adoption in most of the popular operating systems, and did not follow the practices documented in [RFC5033]. However, due to the resulting Internet-scale deployment experience over a long period of time, the IETF has determined that CUBIC may be published as a standards-track specification. This decision by the IETF does not alter the general guidance in [RFC2914].¶
In the following sections, we first briefly explain the design principles of CUBIC, then provide the exact specification of CUBIC, and finally discuss the safety features of CUBIC following the guidelines specified in [RFC5033].¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
CUBIC is designed according to the following design principles:¶
For better network utilization and stability, CUBIC uses both the concave and convex profiles of a cubic function to increase the congestion window size, instead of using just a convex function.¶
To be Reno-friendly, CUBIC is designed to behave like Reno in networks with short RTTs and small bandwidth where Reno performs well.¶
For RTT-fairness, CUBIC is designed to achieve linear bandwidth sharing among flows with different RTTs.¶
CUBIC appropriately sets its multiplicative window decrease factor in order to balance between the scalability and convergence speed.¶
For better network utilization and stability, CUBIC [HRX08] uses a cubic window increase function in terms of the elapsed time from the last congestion event. While most alternative congestion control algorithms to Reno increase the congestion window using convex functions, CUBIC uses both the concave and convex profiles of a cubic function for window growth.¶
After a window reduction in response to a congestion event detected by duplicate ACKs, Explicit Congestion Notification-Echo (ECN-Echo, ECE) ACKs [RFC3168], TCP RACK [RFC8985] or QUIC loss detection [RFC9002], CUBIC remembers the congestion window size at which it received the congestion event and performs a multiplicative decrease of the congestion window. When CUBIC enters into congestion avoidance, it starts to increase the congestion window using the concave profile of the cubic function. The cubic function is set to have its plateau at the remembered congestion window size, so that the concave window increase continues until then. After that, the cubic function turns into a convex profile and the convex window increase begins.¶
This style of window adjustment (concave and then convex) improves the algorithm stability while maintaining high network utilization [CEHRX09]. This is because the window size remains almost constant, forming a plateau around the remembered congestion window size of the last congestion event, where network utilization is deemed highest. Under steady state, most window size samples of CUBIC are close to that remembered congestion window size, thus promoting high network utilization and stability.¶
Note that congestion control algorithms that only use convex functions to increase the congestion window size have their maximum increments around the remembered congestion window size of the last congestion event, and thus introduce many packet bursts around the saturation point of the network, likely causing frequent global loss synchronizations.¶
CUBIC promotes per-flow fairness to Reno. Note that Reno performs well over paths with short RTTs and small bandwidths (or small BDPs). There is only a scalability problem in networks with long RTTs and large bandwidths (or large BDPs).¶
A congestion control algorithm designed to be friendly to Reno on a per-flow basis must increase its congestion window less aggressively in small BDP networks than in large BDP networks.¶
The aggressiveness of CUBIC mainly depends on the maximum window size before a window reduction, which is smaller in small-BDP networks than in large-BDP networks. Thus, CUBIC increases its congestion window less aggressively in small-BDP networks than in large-BDP networks.¶
Furthermore, in cases when the cubic function of CUBIC would increase the congestion window less aggressively than Reno, CUBIC simply follows the window size of Reno to ensure that CUBIC achieves at least the same throughput as Reno in small-BDP networks. We call this region where CUBIC behaves like Reno the "Reno-friendly region".¶
Two CUBIC flows with different RTTs have a throughput ratio that is linearly proportional to the inverse of their RTT ratio, where the throughput of a flow is approximately the size of its congestion window divided by its RTT.¶
Specifically, CUBIC maintains a window increase rate independent of RTTs outside the Reno-friendly region, and thus flows with different RTTs have similar congestion window sizes under steady state when they operate outside the Reno-friendly region.¶
This notion of a linear throughput ratio is similar to that of Reno under high statistical multiplexing where packet loss is independent of individual flow rates. However, under low statistical multiplexing, the throughput ratio of Reno flows with different RTTs is quadratically proportional to the inverse of their RTT ratio [XHR04].¶
CUBIC always ensures a linear throughput ratio independent of the amount of statistical multiplexing. This is an improvement over Reno. While there is no consensus on particular throughput ratios for different RTT flows, we believe that over wired Internet paths, use of a linear throughput ratio seems more reasonable than equal throughputs (i.e., the same throughput for flows with different RTTs) or a higher-order throughput ratio (e.g., a quadratical throughput ratio of Reno under low statistical multiplexing environments).¶
To balance between scalability and convergence speed, CUBIC sets the multiplicative window decrease factor to 0.7, whereas Reno uses 0.5.¶
While this improves the scalability of CUBIC, a side effect of this decision is slower convergence, especially under low statistical multiplexing. This design choice is following the observation that HighSpeed TCP (HSTCP) [RFC3649] and other approaches (e.g., [GV02]) made: the current Internet becomes more asynchronous with less frequent loss synchronizations under high statistical multiplexing.¶
In such environments, even strict Multiplicative-Increase Multiplicative-Decrease (MIMD) can converge. CUBIC flows with the same RTT always converge to the same throughput independent of statistical multiplexing, thus achieving intra-algorithm fairness. We also find that in environments with sufficient statistical multiplexing, the convergence speed of CUBIC is reasonable.¶
In this section, we discuss how the congestion window is updated during the different stages of the CUBIC congestion controller.¶
The unit of all window sizes in this document is segments of the maximum segment size (MSS), and the unit of all times is seconds. Implementations can use bytes to express window sizes, which would require factoring in the maximum segment size wherever necessary and replacing segments_acked with the number of bytes acknowledged in Figure 4.¶
βcubic: CUBIC multiplicative decrease factor as described in Section 4.6.¶
αcubic: CUBIC additive increase factor used in Reno-friendly region as described in Section 4.3.¶
C: constant that determines the aggressiveness of CUBIC in competing with other congestion control algorithms in high BDP networks. Please see Section 5 for more explanation on how it is set. The unit for C is¶
This section defines the variables required to implement CUBIC:¶
RTT: Smoothed round-trip time in seconds, calculated as described in [RFC6298].¶
cwnd: Current congestion window in segments.¶
ssthresh: Current slow start threshold in segments.¶
Wmax: Size of cwnd in segments just before cwnd was reduced in the last congestion event when fast convergence is disabled. However, if fast convergence is enabled, the size may be further reduced based on the current saturation point.¶
K: The time period in seconds it takes to increase the congestion window size at the beginning of the current congestion avoidance stage to Wmax.¶
current_time: Current time of the system in seconds.¶
epochstart: The time in seconds at which the current congestion avoidance stage started.¶
cwndstart: The cwnd at the beginning of the current congestion avoidance stage, i.e., at time epochstart.¶
Wcubic(t): The congestion window in segments at time t in seconds based on the cubic increase function, as described in Section 4.2.¶
target: Target value of congestion window in segments after the next RTT, that is, Wcubic(t + RTT), as described in Section 4.2.¶
West: An estimate for the congestion window in segments in the Reno-friendly region, that is, an estimate for the congestion window of Reno.¶
segments_acked: Number of MSS-sized segments acked when a "new ACK" is received, i.e., an ACK that cumulatively acknowledges the delivery of new data. This number will be a decimal value when a new ACK acknowledges an amount of data that is not MSS-sized. Specifically, it can be less than 1 when a new ACK acknowledges a segment smaller than the MSS.¶
CUBIC maintains the acknowledgment (ACK) clocking of Reno by increasing the congestion window only at the reception of a new ACK. It does not make any changes to the TCP Fast Recovery and Fast Retransmit algorithms [RFC6582][RFC6675].¶
During congestion avoidance, after a congestion event is detected by mechanisms described in Section 3.1, CUBIC uses a window increase function different from Reno.¶
CUBIC uses the following window increase function:¶
where t is the elapsed time in seconds from the beginning of the current congestion avoidance stage, that is,¶
and where epochstart is the time at which the current congestion avoidance stage starts. K is the time period that the above function takes to increase the congestion window size at the beginning of the current congestion avoidance stage to Wmax if there are no further congestion events and is calculated using the following equation:¶
where cwndstart is the congestion window at the beginning of the current congestion avoidance stage.¶
Upon receiving a new ACK during congestion avoidance, CUBIC computes the target congestion window size after the next RTT using Figure 1 as follows, where RTT is the smoothed round-trip time. The lower and upper bounds below ensure that CUBIC's congestion window increase rate is non-decreasing and is less than the increase rate of slow start [SXEZ19].¶
The elapsed time t in Figure 1 MUST NOT include periods during which cwnd has not been updated due to application-limited behavior (see Section 5.8).¶
Depending on the value of the current congestion window size cwnd, CUBIC runs in three different regions:¶
Below, we describe the exact actions taken by CUBIC in each region.¶
Reno performs well in certain types of networks, for example, under short RTTs and small bandwidths (or small BDPs). In these networks, CUBIC remains in the Reno-friendly region to achieve at least the same throughput as Reno.¶
The Reno-friendly region is designed according to the analysis in [FHP00], which studies the performance of an AIMD algorithm with an additive factor of α (segments per RTT) and a multiplicative factor of β, denoted by AIMD(α, β). p is the packet loss rate. Specifically, the average congestion window size of AIMD(α, β) can be calculated using Figure 3.¶
By the same analysis, to achieve the same average window size as Reno that uses AIMD(1, 0.5), α must be equal to,¶
Thus, CUBIC uses Figure 4 to estimate the window size West in the Reno-friendly region with¶
which achieves the same average window size as Reno. When receiving a new ACK in congestion avoidance (where cwnd could be greater than or less than Wmax), CUBIC checks whether Wcubic(t) is less than West. If so, CUBIC is in the Reno-friendly region and cwnd SHOULD be set to West at each reception of a new ACK.¶
West is set equal to cwndstart at the start of the congestion avoidance stage. After that, on every new ACK, West is updated using Figure 4. Note that this equation is for a connection where Appropriate Byte Counting (ABC) [RFC3465] is disabled. For a connection with ABC enabled, this equation SHOULD be adjusted by using the number of acknowledged bytes instead of acknowledged segments. Also note that this equation works for connections with enabled or disabled Delayed ACKs [RFC5681], as segments_acked will be different based on the segments actually acknowledged by a new ACK.¶
Note that once West reaches Wmax, that is, West >= Wmax, CUBIC needs to start probing to determine the new value of Wmax. At this point, αcubic SHOULD be set to 1 to ensure that CUBIC can achieve the same congestion window increment as Reno, which uses AIMD(1, 0.5).¶
When receiving a new ACK in congestion avoidance, if CUBIC is not in the Reno-friendly region and cwnd is less than Wmax, then CUBIC is in the concave region. In this region, cwnd MUST be incremented by¶
for each received new ACK, where target is calculated as described in Section 4.2.¶
When receiving a new ACK in congestion avoidance, if CUBIC is not in the Reno-friendly region and cwnd is larger than or equal to Wmax, then CUBIC is in the convex region.¶
The convex region indicates that the network conditions might have changed since the last congestion event, possibly implying more available bandwidth after some flow departures. Since the Internet is highly asynchronous, some amount of perturbation is always possible without causing a major change in available bandwidth.¶
Unless it is overridden by the AIMD window increase, CUBIC is very careful in this region. The convex profile aims to increase the window very slowly at the beginning when cwnd is around Wmax and then gradually increases its rate of increase. We also call this region the "maximum probing phase", since CUBIC is searching for a new Wmax. In this region, cwnd MUST be incremented by¶
for each received new ACK, where target is calculated as described in Section 4.2.¶
When a congestion event is detected by mechanisms described in Section 3.1, CUBIC updates Wmax and reduces cwnd and ssthresh immediately as described below. In case of packet loss, the sender MUST reduce cwnd and ssthresh immediately upon entering loss recovery, similar to [RFC5681] (and [RFC6675]). Note that other mechanisms, such as Proportional Rate Reduction [RFC6937], can be used to reduce the sending rate during loss recovery more gradually. The parameter βcubic SHOULD be set to 0.7, which is different from the multiplicative decrease factor used in [RFC5681] (and [RFC6675]) during fast recovery.¶
In Figure 5, flight_size is the amount of outstanding data in the network, as defined in [RFC5681]. Note that a rate-limited application with idle periods or periods when unable to send at the full rate permitted by cwnd may easily encounter notable variations in the volume of data sent from one RTT to another, resulting in flight_size that is significantly less than cwnd on a congestion event. This may decrease cwnd to a much lower value than necessary. To avoid suboptimal performance with such applications, the mechanisms described in [RFC7661] can be used to mitigate this issue as it would allow using a value between cwnd and flight_size to calculate the new ssthresh in Figure 5. The congestion window growth mechanism defined in [RFC7661] is safe to use even when cwnd is greater than the receive window as it validates cwnd based on the amount of data acknowledged by the network in an RTT which implicitly accounts for the allowed receive window. Some implementations of CUBIC currently use cwnd instead of flight_size when calculating a new ssthresh using Figure 5.¶
A side effect of setting βcubic to a value bigger than 0.5 is slower convergence. We believe that while a more adaptive setting of βcubic could result in faster convergence, it will make the analysis of CUBIC much harder.¶
Note that CUBIC MUST continue to reduce cwnd in response to congestion events due to ECN-Echo ACKs until it reaches a value of 1 MSS. If congestion events indicated by ECN-Echo ACKs persist, a sender with a cwnd of 1 MSS MUST reduce its sending rate even further. It can achieve that by using a retransmission timer with exponential backoff, as described in [RFC3168].¶
To improve convergence speed, CUBIC uses a heuristic. When a new flow joins the network, existing flows need to give up some of their bandwidth to allow the new flow some room for growth, if the existing flows have been using all the network bandwidth. To speed up this bandwidth release by existing flows, the following "Fast Convergence" mechanism SHOULD be implemented.¶
With Fast Convergence, when a congestion event occurs, we update Wmax as follows, before the window reduction as described in Section 4.6.¶
At a congestion event, if the current cwnd is less than Wmax, this indicates that the saturation point experienced by this flow is getting reduced because of a change in available bandwidth. Then we allow this flow to release more bandwidth by reducing Wmax further. This action effectively lengthens the time for this flow to increase its congestion window, because the reduced Wmax forces the flow to plateau earlier. This allows more time for the new flow to catch up to its congestion window size.¶
Fast Convergence is designed for network environments with multiple CUBIC flows. In network environments with only a single CUBIC flow and without any other traffic, Fast Convergence SHOULD be disabled.¶
In case of a timeout, CUBIC follows Reno to reduce cwnd [RFC5681], but sets ssthresh using βcubic (same as in Section 4.6) in a way that is different from Reno TCP [RFC5681].¶
During the first congestion avoidance stage after a timeout, CUBIC increases its congestion window size using Figure 1, where t is the elapsed time since the beginning of the current congestion avoidance, K is set to 0, and Wmax is set to the congestion window size at the beginning of the current congestion avoidance stage. In addition, for the Reno-friendly region, West SHOULD be set to the congestion window size at the beginning of the current congestion avoidance.¶
In cases where CUBIC reduces its congestion window in response to having detected packet loss via duplicate ACKs or timeouts, there is a possibility that the missing ACK would arrive after the congestion window reduction and a corresponding packet retransmission. For example, packet reordering could trigger this behavior. A high degree of packet reordering could cause multiple congestion window reduction events, where spurious losses are incorrectly interpreted as congestion signals, thus degrading CUBIC's performance significantly.¶
For TCP, there are two types of spurious events - spurious timeouts and spurious fast retransmits. In case of QUIC, there are no spurious timeouts as the loss is only detected after receiving an ACK.¶
An implementation MAY detect spurious timeouts based on the mechanisms described in Forward RTO-Recovery [RFC5682]. Experimental alternatives include Eifel [RFC3522]. When a spurious timeout is detected, a TCP implementation MAY follow the response algorithm described in [RFC4015] to restore the congestion control state and adapt the retransmission timer to avoid further spurious timeouts.¶
Upon receiving an ACK, a TCP implementation MAY detect spurious losses either using TCP Timestamps or via D-SACK[RFC2883]. Experimental alternatives include Eifel detection algorithm [RFC3522] which uses TCP Timestamps and DSACK based detection [RFC3708] which uses DSACK information. A QUIC implementation can easily determine a spurious loss if a QUIC packet is acknowledged after it has been marked as lost and the original data has been retransmitted with a new QUIC packet.¶
In this section, we specify a simple response algorithm when a spurious loss is detected by acknowledgements. Implementations would need to carefully evaluate the impact of using this algorithm in different environments that may experience sudden change in available capacity (e.g., due to variable radio capacity, a routing change, or a mobility event).¶
When a packet loss is detected via acknowledgements, a CUBIC implementation MAY save the current value of the following variables before the congestion window is reduced.¶
Once the previously declared packet loss is confirmed to be spurious, CUBIC MAY restore the original values of the above-mentioned variables as follows if the current cwnd is lower than prior_cwnd. Restoring the original values ensures that CUBIC's performance is similar to what it would be without spurious losses.¶
In rare cases, when the detection happens long after a spurious loss event and the current cwnd is already higher than prior_cwnd, CUBIC SHOULD continue to use the current and the most recent values of these variables.¶
CUBIC MUST employ a slow-start algorithm, when cwnd is no more than ssthresh. In general, CUBIC SHOULD use the HyStart++ slow start algorithm [I-D.ietf-tcpm-hystartplusplus], or MAY use the Reno TCP slow start algorithm [RFC5681] in the rare cases when HyStart++ is not suitable. Experimental alternatives include hybrid slow start [HR11], a predecessor to HyStart++ that some CUBIC implementations have used as the default for the last decade, and limited slow start [RFC3742]. Whichever start-up algorithm is used, work might be needed to ensure that the end of slow start and the first multiplicative decrease of congestion avoidance work well together.¶
When CUBIC uses HyStart++ [I-D.ietf-tcpm-hystartplusplus], it may exit the first slow start without incurring any packet loss and thus Wmax is undefined. In this special case, CUBIC switches to congestion avoidance and increases its congestion window size using Figure 1, where t is the elapsed time since the beginning of the current congestion avoidance, K is set to 0, and Wmax is set to the congestion window size at the beginning of the current congestion avoidance stage.¶
In this section, we further discuss the safety features of CUBIC following the guidelines specified in [RFC5033].¶
With a deterministic loss model where the number of packets between two successive packet losses is always 1/p, CUBIC always operates with the concave window profile, which greatly simplifies the performance analysis of CUBIC. The average window size of CUBIC can be obtained by the following function:¶
With βcubic set to 0.7, the above formula reduces to:¶
We will determine the value of C in the following subsection using Figure 7.¶
In environments where Reno is able to make reasonable use of the available bandwidth, CUBIC does not significantly change this state.¶
Reno performs well in the following two types of networks:¶
CUBIC is designed to behave very similarly to Reno in the above two types of networks. The following two tables show the average window sizes of Reno TCP, HSTCP, and CUBIC TCP. The average window sizes of Reno TCP and HSTCP are from [RFC3649]. The average window size of CUBIC is calculated using Figure 7 and the CUBIC Reno-friendly region for three different values of C.¶
Loss Rate P | Reno | HSTCP | CUBIC (C=0.04) | CUBIC (C=0.4) | CUBIC (C=4) |
---|---|---|---|---|---|
1.0e-02 | 12 | 12 | 12 | 12 | 12 |
1.0e-03 | 38 | 38 | 38 | 38 | 59 |
1.0e-04 | 120 | 263 | 120 | 187 | 333 |
1.0e-05 | 379 | 1795 | 593 | 1054 | 1874 |
1.0e-06 | 1200 | 12280 | 3332 | 5926 | 10538 |
1.0e-07 | 3795 | 83981 | 18740 | 33325 | 59261 |
1.0e-08 | 12000 | 574356 | 105383 | 187400 | 333250 |
Table 1 describes the response function of Reno TCP, HSTCP, and CUBIC in networks with RTT = 0.1 seconds. The average window size is in MSS-sized segments.¶
Loss Rate P | Reno | HSTCP | CUBIC (C=0.04) | CUBIC (C=0.4) | CUBIC (C=4) |
---|---|---|---|---|---|
1.0e-02 | 12 | 12 | 12 | 12 | 12 |
1.0e-03 | 38 | 38 | 38 | 38 | 38 |
1.0e-04 | 120 | 263 | 120 | 120 | 120 |
1.0e-05 | 379 | 1795 | 379 | 379 | 379 |
1.0e-06 | 1200 | 12280 | 1200 | 1200 | 1874 |
1.0e-07 | 3795 | 83981 | 3795 | 5926 | 10538 |
1.0e-08 | 12000 | 574356 | 18740 | 33325 | 59261 |
Table 2 describes the response function of Reno TCP, HSTCP, and CUBIC in networks with RTT = 0.01 seconds. The average window size is in MSS-sized segments.¶
Both tables show that CUBIC with any of these three C values is more friendly to Reno TCP than HSTCP, especially in networks with a short RTT where Reno TCP performs reasonably well. For example, in a network with RTT = 0.01 seconds and p=10^-6, Reno TCP has an average window of 1200 packets. If the packet size is 1500 bytes, then Reno TCP can achieve an average rate of 1.44 Gbps. In this case, CUBIC with C=0.04 or C=0.4 achieves exactly the same rate as Reno TCP, whereas HSTCP is about ten times more aggressive than Reno TCP.¶
We can see that C determines the aggressiveness of CUBIC in competing with other congestion control algorithms for bandwidth. CUBIC is more friendly to Reno TCP, if the value of C is lower. However, we do not recommend setting C to a very low value like 0.04, since CUBIC with a low C cannot efficiently use the bandwidth in fast and long-distance networks. Based on these observations and extensive deployment experience, we find C=0.4 gives a good balance between Reno-friendliness and aggressiveness of window increase. Therefore, C SHOULD be set to 0.4. With C set to 0.4, Figure 7 is reduced to:¶
Figure 8 is then used in the next subsection to show the scalability of CUBIC.¶
CUBIC uses a more aggressive window increase function than Reno for fast and long-distance networks.¶
The following table shows that to achieve the 10 Gbps rate, Reno TCP requires a packet loss rate of 2.0e-10, while CUBIC TCP requires a packet loss rate of 2.9e-8.¶
Throughput (Mbps) | Average W | Reno P | HSTCP P | CUBIC P |
---|---|---|---|---|
1 | 8.3 | 2.0e-2 | 2.0e-2 | 2.0e-2 |
10 | 83.3 | 2.0e-4 | 3.9e-4 | 2.9e-4 |
100 | 833.3 | 2.0e-6 | 2.5e-5 | 1.4e-5 |
1000 | 8333.3 | 2.0e-8 | 1.5e-6 | 6.3e-7 |
10000 | 83333.3 | 2.0e-10 | 1.0e-7 | 2.9e-8 |
Table 3 describes the required packet loss rate for Reno TCP, HSTCP, and CUBIC to achieve a certain throughput. We use 1500-byte packets and an RTT of 0.1 seconds.¶
Our test results in [HLRX07] indicate that CUBIC uses the spare bandwidth left unused by existing Reno TCP flows in the same bottleneck link without taking away much bandwidth from the existing flows.¶
CUBIC is designed to remedy the poor performance of Reno in fast and long-distance networks.¶
CUBIC has been extensively studied using simulations, testbed emulations, Internet experiments, and Internet measurements, covering a wide range of network environments [HLRX07][H16][CEHRX09][HR11][BSCLU13][LBEWK16]. They have convincingly demonstrated that CUBIC delivers substantial benefits over classical Reno congestion control [RFC5681].¶
Same as Reno, CUBIC is a loss-based congestion control algorithm. Because CUBIC is designed to be more aggressive (due to a faster window increase function and bigger multiplicative decrease factor) than Reno in fast and long-distance networks, it can fill large drop-tail buffers more quickly than Reno and increases the risk of a standing queue [RFC8511]. In this case, proper queue sizing and management [RFC7567] could be used to mitigate the risk to some extent and reduce the packet queuing delay. Also, in large-BDP networks after a congestion event, CUBIC, due its cubic window increase function, recovers quickly to the highest link utilization point. This means that link utilization is less sensitive to an active queue management (AQM) target that is lower than the amplitude of the whole sawtooth.¶
Similar to Reno, the performance of CUBIC as a loss-based congestion control algorithm suffers in networks where a packet loss is not a good indication of bandwidth utilization, such as wireless or mobile networks [LIU16].¶
With regard to the potential of causing congestion collapse, CUBIC behaves like Reno, since CUBIC modifies only the window adjustment algorithm of Reno. Thus, it does not modify the ACK clocking and timeout behaviors of Reno.¶
CUBIC also satisfies the "full backoff" requirement as described in [RFC5033]. After reducing the sending rate to one packet per RTT in response to congestion events due to ECN-Echo ACKs, CUBIC then exponentially increases the transmission timer for each packet retransmission while congestion persists.¶
CUBIC ensures convergence of competing CUBIC flows with the same RTT in the same bottleneck links to an equal throughput. When competing flows have different RTT values, their throughput ratio is linearly proportional to the inverse of their RTT ratios. This is true independently of the level of statistical multiplexing on the link. The convergence time depends on the network environments (e.g., bandwidth, RTT) and the level of statistical multiplexing, as mentioned in Section 3.4.¶
This is not considered in the current CUBIC design.¶
A flow is application-limited if it is currently sending less than what is allowed by the congestion window. This can happen if the flow is limited by either the sender application or the receiver application (via the receiver advertised window) and thus sends less data than what is allowed by the sender's congestion window.¶
CUBIC does not increase its congestion window if a flow is application-limited. Section 4.2 requires that t in Figure 1 does not include application-limited periods, such as idle periods, otherwise Wcubic(t) might be very high after restarting from these periods.¶
If there is a sudden increase in capacity, e.g., due to variable radio capacity, a routing change, or a mobility event, CUBIC is designed to utilize the newly available capacity faster than Reno.¶
On the other hand, if there is a sudden decrease in capacity, CUBIC reduces more slowly than Reno. This remains true whether or not CUBIC is in Reno-friendly mode and whether or not fast convergence is enabled.¶
CUBIC requires only changes to the congestion control at the sender, and it does not require any changes at receivers. That is, a CUBIC sender works correctly with Reno receivers. In addition, CUBIC does not require any changes to routers and does not require any assistance from routers.¶
CUBIC makes no changes to the underlying security of TCP. More information about TCP security concerns can be found in [RFC5681].¶
This document does not require any IANA actions.¶
Richard Scheffenegger and Alexander Zimmermann originally co-authored [RFC8312].¶
These individuals suggested improvements to this document:¶
CUBIC has gone through a few changes since the initial release [HRX08] of its algorithm and implementation. Below we highlight the differences between its original paper and [RFC8312].¶