RFC 9438 | TCP CUBIC | August 2023 |
Xu, et al. | Standards Track | [Page] |
CUBIC is a standard TCP congestion control algorithm that uses a cubicfunction instead of a linear congestion window increase functionto improve scalability and stability over fast and long-distancenetworks. CUBIC has been adopted as the default TCP congestion controlalgorithm by the Linux, Windows, and Apple stacks.¶
This document updates the specification of CUBIC to includealgorithmic improvements based on these implementations and recentacademic work. Based on the extensive deployment experience withCUBIC, this document also moves the specification to the Standards Track and obsoletes RFC 8312. This document also updates RFC 5681, to allowfor CUBIC's occasionally more aggressive sending behavior.¶
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained athttps://www.rfc-editor.org/info/rfc9438.¶
Copyright (c) 2023 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 algorithmin the Linux, Windows, and Apple stacks, and has been used anddeployed globally. Extensive, decade-long deployment experience invastly different Internet scenarios has convincingly demonstratedthat CUBIC is safe for deployment on the global Internet and deliverssubstantial benefits over classical Reno congestion control[RFC5681]. It istherefore to be regarded as the currently most widely deployedstandard for TCP congestion control. CUBIC can also be used for othertransport protocols such as QUIC[RFC9000] and the Stream Control Transmission Protocol (SCTP)[RFC9260]as a default congestion controller.¶
The design of CUBIC was motivated by the well-documented problemclassical Reno TCP has with low utilization over fast and long-distancenetworks[K03][RFC3649]. This problem arises from a slow increaseof the congestion window (cwnd) following a congestion event in a network witha large bandwidth-delay product (BDP).[HLRX07] indicates that thisproblem is frequently observed even in the range of congestion windowsizes over several hundreds of packets. This problem is equallyapplicable to all Reno-style standards and their variants, includingTCP-Reno[RFC5681], TCP-NewReno[RFC6582][RFC6675], SCTP[RFC9260], TCP Friendly Rate Control (TFRC)[RFC5348], and QUIC congestion control[RFC9002], which use the same linear increase function for windowgrowth. All Reno-style standards and their variants arecollectively referred to as "Reno" in this document.¶
CUBIC, originally proposed in[HRX08], is a modification to thecongestion control algorithm of classical Reno to remedy thisproblem. Specifically, CUBIC uses a cubic function instead of the linearwindow increase function of Reno to improve scalability andstability under fast and long-distance networks.¶
This document updates the specification of CUBIC to include algorithmicimprovements based on the Linux, Windows, and Apple implementations andrecent academic work. Based on the extensive deployment experience withCUBIC, it also moves the specification to the Standards Track,obsoleting[RFC8312]. This requires an update toSection 3 of [RFC5681], whichlimits the aggressiveness of Reno TCP implementations.Since CUBIC is occasionally more aggressive than the algorithms defined in[RFC5681],this document updates the first paragraph ofSection 3 of [RFC5681], replacing it with a normative reference to guideline (1)inSection 3 of [RFC5033], which allows for CUBIC's behavior as definedin this document.¶
Specifically, CUBIC may increase the congestion window more aggressively thanReno during the congestion avoidance phase. According to[RFC5681],during congestion avoidance, the sender must not increment cwnd by more thanSender Maximum Segment Size (SMSS) bytes once per round-trip time (RTT), whereas CUBIC may increase cwnd much moreaggressively. Additionally, CUBIC recommends the HyStart++algorithm[RFC9406] for slow start, which allows forcwnd increases of more than SMSS bytes for incoming acknowledgments duringslow start, while this behavior is not allowed as part of the standard behavior prescribed by[RFC5681].¶
Binary Increase Congestion Control (BIC-TCP)[XHR04], a predecessorof CUBIC, was selected as the default TCP congestion control algorithmby Linux in the year 2005 and had been used for several years by theInternet community at large.¶
CUBIC uses a window increase function similar to BIC-TCP and isdesigned to be less aggressive and fairer to Reno in bandwidthusage than BIC-TCP while maintaining the strengths of BIC-TCP such asstability, window scalability, and RTT-fairness.¶
[RFC5033] documents the IETF's best current practices forspecifying new congestion control algorithms, specifically those thatdiffer from the general congestion control principles outlined in[RFC2914]. It describes what type of evaluation is expected by theIETF to understand the suitability of a new congestion controlalgorithm and the process of enabling a specification to be approvedfor widespread deployment in the global Internet.¶
There are areas in which CUBIC differs from the congestion controlalgorithms previously published in Standards Track RFCs; thosechanges are specified in this document. However, it is not obviousthat these changes go beyond the general congestion controlprinciples outlined in[RFC2914], so the process documented in[RFC5033] may not apply.¶
Also, the wide deployment of CUBIC on the Internet was driven bydirect adoption in most of the popular operating systems and did notfollow the practices documented in[RFC5033]. However, due to theresulting Internet-scale deployment experience over a longperiod of time, the IETF determined that CUBIC could be publishedas a Standards Track specification. This decision by the IETF doesnot alter the general guidance provided in[RFC2914].¶
The following sections¶
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, CUBICuses both the concave and convex profiles of a cubic function toincrease the congestion window size, instead of using just aconvex function.¶
To be Reno-friendly, CUBIC is designed to behave like Reno innetworks with short RTTs and small bandwidth where Renoperforms well.¶
For RTT-fairness, CUBIC is designed to achieve linear bandwidthsharing among flows with different RTTs.¶
CUBIC appropriately sets its multiplicative window decrease factorin order to achieve a balance between scalability and convergence speed.¶
For better network utilization and stability, CUBIC[HRX08] uses acubic window increase function in terms of the elapsed time from thelast congestion event. While most congestion controlalgorithms that provide alternatives to Reno increase the congestion window using convexfunctions, CUBIC uses both the concave and convex profiles of a cubicfunction for window growth.¶
After a window reduction in response to a congestion event detected byduplicate acknowledgments (ACKs), Explicit Congestion Notification-Echo (ECN-Echo (ECE))ACKs[RFC3168], RACK-TLP for TCP[RFC8985], or QUIC loss detection[RFC9002], CUBIC remembers the congestion window size at which itreceived the congestion event and performs a multiplicative decrease ofthe congestion window. When CUBIC enters into congestion avoidance, itstarts to increase the congestion window using the concave profile ofthe cubic function. The cubic function is set to have its plateau atthe remembered congestion window size, so that the concave windowincrease continues until then. After that, the cubic function turnsinto a convex profile and the convex window increase begins.¶
This style of window adjustment (concave and then convex) improvesalgorithm 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 thelast congestion event, where network utilization is deemed highest.Under steady state, most window size samples of CUBIC are close tothat remembered congestion window size, thus promoting high networkutilization and stability.¶
Note that congestion control algorithms that only use convex functionsto increase the congestion window size have their maximum incrementsaround the remembered congestion window size of the last congestionevent and thus introduce many packet bursts around thesaturation point of the network, likely causing frequent global losssynchronizations.¶
CUBIC promotes per-flow fairness to Reno. Note that Renoperforms well over paths with small BDPs and onlyexperiences problems when attempting to increase bandwidth utilizationon paths with large BDPs.¶
A congestion control algorithm designed to be friendly to Reno ona per-flow basis must increase its congestion window less aggressivelyin small-BDP networks than in large-BDP networks.¶
The aggressiveness of CUBIC mainly depends on the maximum window sizebefore a window reduction, which is smaller in small-BDP networks thanin large-BDP networks. Thus, CUBIC increases its congestion windowless aggressively in small-BDP networks than in large-BDP networks.¶
Furthermore, in cases when the cubic function of CUBIC would increasethe congestion window less aggressively than Reno, CUBIC simplyfollows the window size of Reno to ensure that CUBIC achieves atleast the same throughput as Reno in small-BDP networks. The regionwhere CUBIC behaves like Reno is called the "Reno-friendlyregion".¶
Two CUBIC flows with different RTTs have a throughput ratio that islinearly proportional to the inverse of their RTT ratio, where thethroughput of a flow is approximately the size of its congestionwindow divided by its RTT.¶
Specifically, CUBIC maintains a window increase rate that is independent of RTTs outside the Reno-friendly region, and thus flows withdifferent RTTs have similar congestion window sizes under steady statewhen they operate outside the Reno-friendly region.¶
This notion of a linear throughput ratio is similar to that of Renounder an asynchronous loss model, where flows with different RTTshave the same packet loss rate but experience loss events at differenttimes. However, under a synchronous loss model, where flows with differentRTTs experience loss events at the same time but have different packet lossrates, the throughput ratio of Reno flows with different RTTs is quadraticallyproportional to the inverse of their RTT ratio[XHR04].¶
CUBIC always ensures a linear throughput ratio that is independent of the loss environment. This is an improvement over Reno.While there is no consensus on the optimal throughput ratio fordifferent RTT flows, over wired Internet paths, use ofa linear throughput ratio seems more reasonable than equal throughputs(i.e., the same throughput for flows with different RTTs) or ahigher-order throughput ratio (e.g., a quadratic throughput ratio ofReno in synchronous loss environments).¶
To achieve a balance between scalability and convergence speed, CUBIC sets themultiplicative window decrease factor to 0.7, whereas Reno uses0.5.¶
While this improves the scalability of CUBIC, a side effect of thisdecision is slower convergence, especially under low statisticalmultiplexing. This design choice is following the observation thatHighSpeed TCP (HSTCP)[RFC3649] and other approaches (e.g.,[GV02]) made: the current Internet becomes more asynchronous withless frequent loss synchronizations under high statisticalmultiplexing.¶
In such environments, even strict Multiplicative-IncreaseMultiplicative-Decrease (MIMD) can converge. CUBIC flows with the sameRTT always converge to the same throughput independently of statisticalmultiplexing, thus achieving intra-algorithm fairness.In environments with sufficient statistical multiplexing, theconvergence speed of CUBIC is reasonable.¶
This section discusses how the congestion window is updatedduring the different stages of the CUBIC congestion controller.¶
The unit of all window sizes in this document is segments of theSMSS, and the unit of all times is seconds.Implementations can use bytes to express window sizes, which wouldrequire factoring in the SMSS wherever necessaryand replacingsegments_acked (Figure 4) with the number of acknowledged bytes.¶
βcubic:CUBIC multiplicative decrease factor as described inSection 4.6.¶
αcubic:CUBIC additive increase factor used in the Reno-friendly regionas described inSection 4.3.¶
C:Constant that determines the aggressiveness of CUBIC in competing withother congestion control algorithms in high-BDP networks. Please seeSection 5 for more explanation on how it is set. The unit forCis¶
This section defines the variables required to implement CUBIC:¶
CUBIC maintains the ACK clocking of Reno byincreasing the congestion window only at the reception of a new ACK. Itdoes not make any changes to the TCP Fast Recovery and Fast Retransmitalgorithms[RFC6582][RFC6675].¶
During congestion avoidance, after a congestion event is detectedas described inSection 3.1, CUBIC uses a windowincrease function different from Reno.¶
CUBIC uses the following window increase function:¶
wheret is the elapsed time in seconds from the beginning of thecurrent congestion avoidance stage -- that is,¶
and wheretepoch is the time at which the currentcongestion avoidance stage starts. K is the time period that theabove function takes to increase the congestion window size at thebeginning of the current congestion avoidance stage toWmax if there are no further congestion events. K iscalculated using the following equation:¶
wherecwndepoch is the congestion window at the beginningof the current congestion avoidance stage.¶
Upon receiving a new ACK during congestion avoidance, CUBIC computes thetarget congestion window size after the nextRTT usingFigure 1 asfollows, whereRTT is the smoothed round-trip time. The lower andupper bounds below ensure that CUBIC's congestion window increase rateis non-decreasing and is less than the increase rate of slow start[SXEZ19].¶
The elapsed timet inFigure 1MUST NOT include periods duringwhichcwnd has not been updated due to application-limited behavior(seeSection 5.8).¶
Depending on the value of the current congestion window sizecwnd,CUBIC runs in three different regions:¶
To summarize, CUBIC computes both Wcubic(t) andWest (seeSection 4.3) on receiving a new ACKin congestion avoidance and chooses the larger of the two values.¶
The next sections 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 thesenetworks, CUBIC remains in the Reno-friendly region to achieve atleast the same throughput as Reno.¶
The Reno-friendly region is designed according to the analysis discussed in[FHP00], which studies the performance of an AIMD algorithm with anadditive factor of α (segments perRTT) anda multiplicative factor of β, denoted byAIMD(α, β). p is the packet loss rate.Specifically, the average congestion window size ofAIMD(α, β) can becalculated usingFigure 3.¶
By the same analysis, to achieve an average window size similar to Renothat uses AIMD(1, 0.5), α must be equal to¶
Thus, CUBIC usesFigure 4 to estimate the windowsizeWest in the Reno-friendly region with¶
which achieves approximately the same average window size as Reno inmany cases. The model used to calculate αcubic is notabsolutely precise, but analysis and simulation as discussed in[AIMD-friendliness],as well as over a decade of experience with CUBIC in the publicInternet, show that this approach produces acceptable levels ofrate fairness between CUBIC and Reno flows. Also, no significantdrawbacks of the model have been reported. However, continued detailedanalysis of this approach would be beneficial. Whenreceiving a new ACK in congestion avoidance (wherecwnd could begreater than or less thanWmax), CUBIC checks whetherWcubic(t) is less thanWest. If so, CUBIC isin the Reno-friendly region andcwndSHOULD be set toWest at each reception of a new ACK.¶
West is set equal tocwndepoch at the startof the congestion avoidance stage. After that, on every new ACK,West is updated usingFigure 4. Note that this equationusessegments_acked andcwnd is measured in segments. An implementationthat measurescwnd in bytes should adjust the equation accordingly usingthe number of acknowledged bytes and the SMSS. Also note that this equation works forconnections with enabled or disabled delayed ACKs[RFC5681], assegments_acked will be different based on the segments actuallyacknowledged by a new ACK.¶
OnceWest has grown to reach thecwnd at the time ofmost recently settingssthresh -- that is,West >=cwndprior --the senderSHOULD set αcubic to 1 to ensure thatit can achieve the same congestion window increment rate as Reno,which uses AIMD(1, 0.5).¶
The next two sections assume that CUBIC is not in the Reno-friendly region anduses the window increase function described inSection 4.2. Althoughcwnd is incremented in the same way for both concave and convex regions,they are discussed separately to analyze and understand the differencebetween the two regions.¶
When receiving a new ACK in congestion avoidance, if CUBIC is not in theReno-friendly region andcwnd is less thanWmax, thenCUBIC is in the concave region. In this region,cwndMUST beincremented by¶
for each received new ACK, wheretarget is calculated as described inSection 4.2.¶
When receiving a new ACK in congestion avoidance, if CUBIC is not in theReno-friendly region andcwnd is larger than or equal toWmax, then CUBIC is in the convex region.¶
The convex region indicates that the network conditions might havechanged since the last congestion event, possibly implying moreavailable bandwidth after some flow departures. Since the Internet ishighly asynchronous, some amount of perturbation is always possiblewithout causing a major change in available bandwidth.¶
Unless the cwnd is overridden by the AIMD window increase,CUBIC will behave cautiously when operating in this region. The convex profile aims toincrease the window very slowly at the beginning whencwnd isaroundWmax and then gradually increases its rate of increase.This region is also called the "maximum probing phase", since CUBIC issearching for a newWmax. In this region,cwndMUST beincremented by¶
for each received new ACK, wheretarget is calculated as described inSection 4.2.¶
When a congestion event is detected by the mechanisms described inSection 3.1, CUBIC updatesWmax and reducescwndandssthresh immediately, as described below.In the case of packet loss, the senderMUST reducecwndandssthresh immediately upon entering loss recovery, similar to[RFC5681] (and[RFC6675]). Note that other mechanisms,such as Proportional Rate Reduction[RFC6937], can be usedto reduce the sending rate during loss recovery more gradually.The parameter βcubicSHOULD be set to 0.7, whichis different from the multiplicative decrease factor used in[RFC5681](and[RFC6675]) during fast recovery.¶
InFigure 5,flight_size is the amount of outstanding(unacknowledged) data in the network, as defined in[RFC5681]. Note that a rate-limited application with idle periodsor periods when unable to send at the full rate permitted bycwndcould easily encounter notable variations in the volume of data sentfrom one RTT to another, resulting inflight_size that issignificantly less thancwnd when there is a congestion event. Thecongestion response would therefore decreasecwnd to a much lowervalue than necessary. To avoid such suboptimal performance, themechanisms described in[RFC7661] can be used.[RFC7661] describes how to manage and usecwnd andssthresh during a rate-limited interval,and how to updatecwnd andssthresh after congestion has been detected. Themechanisms defined in[RFC7661] are safe to use even whencwnd isgreater than the receive window, because they validatecwnd based onthe amount of data acknowledged by the network in an RTT, whichimplicitly accounts for the allowed receive window.¶
Some implementations of CUBIC currently usecwnd instead offlight_size when calculating a newssthresh. Implementations thatusecwndMUST use other measures to preventcwnd from growing whenthe volume of bytes in flight is smaller thancwnd. This alsoeffectively preventscwnd from growing beyond the receive window. Suchmeasures are important for preventing a CUBIC sender from using anarbitrarily high cwndvalue when calculating new values forssthresh andcwnd when congestion is detected. This might not be asrobust as the mechanisms described in[RFC7661].¶
A QUIC sender that uses acwndvalue to calculate new values forcwnd andssthresh after detecting a congestion event isREQUIRED to applysimilar mechanisms[RFC9002].¶
A side effect of setting βcubic to a value biggerthan 0.5 is that packet loss can happen for more than one RTT in certaincases, but it can work efficiently in other cases -- for example, when HyStart++[RFC9406]is used along with CUBIC or when the sending rate is limited by the application.While a more adaptive setting of βcubiccould help limit packet loss to a single round, it would require detailedanalyses and large-scale evaluations to validate such algorithms.¶
Note that CUBICMUST continue to reducecwnd in response to congestionevents detected by ECN-Echo ACKs until it reaches a value of 1 SMSS.If congestion events indicated by ECN-Echo ACKs persist, a sender with acwnd of 1 SMSSMUST reduce its sending rate even further. This can be achievedby using a retransmission timer with exponential backoff, asdescribed in[RFC3168].¶
To improve convergence speed, CUBIC uses a heuristic. When a new flowjoins the network, existing flows need to give up some of theirbandwidth to allow the new flow some room for growth if the existingflows have been using all the network bandwidth. To speed up thisbandwidth release by existing flows, the following fast convergencemechanismSHOULD be implemented.¶
With fast convergence, when a congestion event occurs,Wmaxis updated as follows, before the window reduction describedinSection 4.6.¶
During a congestion event, if the currentcwnd is less thanWmax, this indicates that the saturation pointexperienced by this flow is getting reduced because of a change inavailable bandwidth. This flow can then release more bandwidthby reducingWmax further. This action effectivelylengthens the time for this flow to increase its congestion window,because the reducedWmax forces the flow to plateauearlier. This allows more time for the new flow to catch up to itscongestion window size.¶
Fast convergence is designed for network environments with multipleCUBIC flows. In network environments with only a single CUBIC flow andwithout any other traffic, fast convergenceSHOULD be disabled.¶
In the case of a timeout, CUBIC follows Reno to reducecwnd[RFC5681] but setsssthresh using βcubic(same as inSection 4.6) in a way that is different from Reno TCP[RFC5681].¶
During the first congestion avoidance stage after a timeout, CUBICincreases its congestion window size usingFigure 1, wheret is theelapsed time since the beginning of the current congestion avoidance stage,K is set to 0, andWmax is set to the congestion windowsize at the beginning of the current congestion avoidance stage. Inaddition, for the Reno-friendly region,WestSHOULD beset to the congestion window size at the beginning of the currentcongestion avoidance stage.¶
In cases where CUBIC reduces its congestion window in response tohaving detected packet loss via duplicate ACKs or timeouts, it ispossible that the missing ACK could arrive after the congestionwindow reduction and a corresponding packet retransmission. Forexample, packet reordering could trigger this behavior. A high degreeof packet reordering could cause multiple congestion window reductionevents, where spurious losses are incorrectly interpreted ascongestion signals, thus degrading CUBIC's performance significantly.¶
For TCP, there are two types of spurious events: spurious timeoutsand spurious fast retransmits. In the case of QUIC, there are no spurioustimeouts, as the loss is only detected after receiving an ACK.¶
An implementationMAY detect spurious timeouts based on the mechanismsdescribed in Forward RTO-Recovery[RFC5682]. Experimental alternativesinclude the Eifel detection algorithm[RFC3522]. When a spurious timeout is detected,a TCP implementationMAY follow the response algorithm described in[RFC4015] to restore the congestion control state and adaptthe retransmission timer to avoid further spurious timeouts.¶
Upon receiving an ACK, a TCP implementationMAY detect spurious fast retransmitseither using TCP Timestamps or via D-SACK[RFC2883]. As noted above, experimentalalternatives include the Eifel detection algorithm[RFC3522], which usesTCP Timestamps; and DSACK-based detection[RFC3708], which usesDSACK information. A QUIC implementation can easily determine aspurious fast retransmit if a QUIC packet is acknowledged after it has beenmarked as lost and the original data has been retransmitted witha new QUIC packet.¶
This section specifies a simple response algorithm when a spuriousfast retransmit is detected by acknowledgments. Implementations would need to carefullyevaluate the impact of using this algorithm in different environmentsthat may experience a sudden change in available capacity (e.g., due to variableradio capacity, a routing change, or a mobility event).¶
When packet loss is detected via acknowledgments, a CUBICimplementationMAY save the current value of the followingvariables before the congestion window is reduced.¶
Once the previously declared packet loss is confirmed to be spurious,CUBICMAY restore the original values of the above-mentioned variablesas follows if the currentcwnd is lower thancwndprior. Restoring the original values ensures that CUBIC'sperformance is similar to what it would be without spurious losses.¶
In rare cases, when the detection happens long after a spurious fast retransmit event and the currentcwnd is already higher thancwndprior,CUBICSHOULD continue to use the current and the most recent values ofthese variables.¶
Whencwnd is no more thanssthresh, CUBICMUST employ a slow start algorithm. In general, CUBICSHOULD use the HyStart++ slow startalgorithm[RFC9406] orMAY use the Reno TCPslow start algorithm[RFC5681] in the rare cases whenHyStart++ is not suitable. Experimental alternatives includehybrid slow start[HR11], a predecessor to HyStart++ that some CUBICimplementations have used as the default for the last decade, andlimited slow start[RFC3742]. Whichever startup algorithm is used,work might be needed to ensure that the end of slow start and the firstmultiplicative decrease of congestion avoidance work well together.¶
When CUBIC uses HyStart++[RFC9406], it mayexit the first slow start without incurring any packet loss andthusWmax is undefined. In this special case, CUBICsetscwndprior = cwnd and switches to congestion avoidance.It then increases its congestion windowsize usingFigure 1, wheret is the elapsed time since the beginningof the current congestion avoidance stage,K is set to 0,andWmax is set to the congestion window size at thebeginning of the current congestion avoidance stage.¶
This section further discusses the safety features of CUBIC,following the guidelines specified in[RFC5033].¶
With a deterministic loss model where the number of packets betweentwo successive packet losses is always1/p, CUBIC always operateswith the concave window profile, which greatly simplifies theperformance analysis of CUBIC. The average window size of CUBIC (seeAppendix B)can be obtained via the following function:¶
With βcubic set to 0.7, the above formula reducesto¶
The following subsection will determine the value ofC usingFigure 7.¶
In environments where Reno is able to make reasonable use of theavailable 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 abovetwo types of networks. The following two tables show the averagewindow sizes of Reno TCP, HSTCP, and CUBIC TCP. The average window sizesof Reno TCP and HSTCP are from[RFC3649]. The average window sizeof CUBIC is calculated usingFigure 7 and the CUBIC Reno-friendlyregion for three different values ofC.¶
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 CUBICin networks withRTT = 0.1 seconds. The average window size is inSMSS-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 CUBICin networks withRTT = 0.01 seconds. The average window size is inSMSS-sized segments.¶
Both tables show that CUBIC with any of these threeC values is morefriendly to Reno TCP than HSTCP, especially in networks with a shortRTT where Reno TCP performs reasonably well. For example, in anetwork withRTT = 0.01 seconds and p=10-6, Reno TCP has an averagewindow of 1200 packets. If the packet size is 1500 bytes, then RenoTCP can achieve an average rate of 1.44 Gbps. In this case, CUBIC withC=0.04 orC=0.4 achieves exactly the same rate as Reno TCP,whereas HSTCP is about ten times more aggressive than Reno TCP.¶
C determines the aggressiveness of CUBIC incompeting with other congestion control algorithms for bandwidth.CUBIC is more friendly to Reno TCP if the value ofC is lower.However, it isNOT RECOMMENDED to setC to a very low value like0.04, since CUBIC with a lowC cannot efficiently use the bandwidthin fast and long-distance networks. Based on these observations andextensive deployment experience,C=0.4 seems to provide a good balancebetween Reno-friendliness and aggressiveness of window increase.Therefore,CSHOULD be set to 0.4. WithC set to 0.4,Figure 7 isreduced to¶
Figure 8 is then used in the next subsection to show the scalability ofCUBIC.¶
CUBIC uses a more aggressive window increase function than Renofor fast and long-distance networks.¶
Table 3 shows that to achieve the 10 Gbps rate, Reno TCPrequires a packet loss rate of 2.0e-10, while CUBIC TCP requires a packetloss 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, with 1500-byte packetsand anRTT of 0.1 seconds.¶
The test results provided in[HLRX07] indicate that, in typical cases with adegree of background traffic, CUBIC uses the sparebandwidth left unused by existing Reno TCP flows in the samebottleneck link without taking away much bandwidth from the existingflows.¶
CUBIC is designed to remedy the poor performance of Reno in fastand long-distance networks.¶
CUBIC has been extensively studied using simulations,testbed emulations, Internet experiments, and Internetmeasurements, covering a wide range of network environments[HLRX07][H16][CEHRX09][HR11][BSCLU13][LBEWK16].They have convincingly demonstratedthat CUBIC delivers substantial benefits overclassical 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 fasterwindow increase function and bigger multiplicative decrease factor)than Reno in fast and long-distance networks, it can fill largedrop-tail buffers more quickly than Reno and increases the risk of astanding queue[RFC8511]. In this case, proper queue sizing andmanagement[RFC7567] could be used to mitigate the risk to someextent and reduce the packet queuing delay. Also, in large-BDPnetworks after a congestion event, CUBIC, due to its cubic windowincrease function, recovers quickly to the highest link utilizationpoint. This means that link utilization is less sensitive to an activequeue management (AQM) target that is lower than the amplitude of thewhole sawtooth.¶
Similar to Reno, the performance of CUBIC as a loss-based congestioncontrol algorithm suffers in networks where packet loss is not agood indication of bandwidth utilization, such as wireless or mobilenetworks[LIU16].¶
With regard to the potential of causing congestion collapse, CUBICbehaves like Reno, since CUBIC modifies only the window adjustmentalgorithm of Reno. Thus, it does not modify the ACK clocking andtimeout behaviors of Reno.¶
CUBIC also satisfies the "full backoff" requirement as described in[RFC5033]. After reducing the sending rate to one packet perRTT in response to congestion events detected by ECN-Echo ACKs, CUBICthen exponentially increases the transmissiontimer for each packet retransmission while congestion persists.¶
CUBIC ensures convergence of competing CUBIC flows with the same RTTin the same bottleneck links to an equal throughput. When competingflows have different RTT values, their throughput ratio is linearlyproportional to the inverse of their RTT ratios. This is true and isindependent 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 inSection 3.4.¶
CUBIC does not introduce new entities or signals, so its vulnerability tomisbehaving nodes or attackers is unchanged from Reno.¶
A flow is application limited if it is currently sendingless than what is allowed by the congestion window.This can happen if the flow is limited by either thesender application or the receiver application (via the receiver'sadvertised window) and thus sends less data than what is allowed bythe sender's congestion window.¶
CUBIC does not increase its congestion window if a flow is application limited.PerSection 4.2, it is required thatt inFigure 1 not includeapplication-limited periods, such as idle periods; otherwise,Wcubic(t) might be very high after restarting from theseperiods.¶
If there is a sudden increase in capacity, e.g., due to variable radiocapacity, a routing change, or a mobility event, CUBIC is designed toutilize the newly available capacity more quickly than Reno.¶
On the other hand, if there is a sudden decrease in capacity, CUBICreduces more slowly than Reno. This remains true regardless of whether CUBICis in Reno-friendly mode and regardless of whether fast convergence isenabled.¶
CUBIC requires only changes to congestion control at the sender, and it doesnot require any changes at receivers. That is, a CUBIC sender works correctlywith Reno receivers. In addition, CUBIC does not require anychanges to routers and does not require any assistance from routers.¶
CUBIC makes no changes to the underlying security of a transport protocoland inherits the general security concerns described in[RFC5681].Specifically, changing the window computation on the sender mayallow an attacker, through dropping or injecting ACKs (as described in[RFC5681]), to either force the CUBIC implementation to reduce its bandwidthor convince it that there is no congestion when congestion does exist, and to usethe CUBIC implementation as an attack vector against other hosts. These attacksare not new to CUBIC and are inherently part of any transport protocol like TCP.¶
This document does not require any IANA actions.¶
CUBIC has gone through a few changes since the initial release[HRX08] of its algorithm and implementation. This appendix highlights thedifferences between the original paper and[RFC8312].¶
The definition of the βcubic constantwas changed in[RFC8312]. For example,βcubic in the original paper was referred to as thewindow decrease constant, while[RFC8312] changed it to "CUBIC multiplicative decrease factor". With this change, the currentcongestion window size after a congestion event as listed in[RFC8312] wasβcubic *Wmax, while it was(1-βcubic) *Wmax in theoriginal paper.¶
This appendix contains a proof for the average CUBIC windowsizeAVG_Wcubic inFigure 6.¶
We findAVG_Wcubic under a deterministic loss model, where thenumber of packets between two successive packet losses is 1/p. With thismodel, CUBIC always operates with the concave window profile and the time periodbetween two successive packet losses isK.¶
The average window sizeAVG_Wcubic is defined as follows, where thenumerator 1/p is the total number of packets between two successive packetlosses and the denominatorK/RTT is the total number of RTTs between twosuccessive packet losses.¶
Below, we findK as a function of CUBIC parameters βcubicandC, and network parametersp andRTT. According to the definition ofK inFigure 2, we have¶
The total number of packets between two successive packet losses can also beobtained as follows, using the window increase function inFigure 1. Specifically,the window size in the first RTT (i.e.,n=1, or equivalently,t=0) isC(-K)3+Wmax and the window size in the last RTT(i.e.,n=K/RTT, or equivalently,t=K-RTT) isC(-RTT)3+Wmax.¶
After solving the equations in Figures10 and11 forK andWmax, we have¶
The average CUBIC window sizeAVG_Wcubic can be obtained bysubstitutingK fromFigure 12 inFigure 9.¶
Richard Scheffenegger andAlexander Zimmermann originally coauthored[RFC8312].¶
These individuals suggested improvements to this document:¶
Bob Briscoe¶
Christian Huitema¶
Gorry Fairhurst¶
Jonathan Morton¶
Juhamatti Kuusisaari¶
Junho Choi¶
Markku Kojo¶
Martin Duke¶
Martin Thomson¶
Matt Mathis¶
Matt Olson¶
Michael Welzl¶
Mirja Kühlewind¶
Mohit P. Tahiliani¶
Neal Cardwell¶
Praveen Balasubramanian¶
Randall Stewart¶
Richard Scheffenegger¶
Rod Grimes¶
Spencer Dawkins¶
Tom Henderson¶
Tom Petch¶
Wesley Rosenblum¶
Yoav Nir¶
Yoshifumi Nishida¶
Yuchung Cheng¶