Internet-Draft | Constrained cwnd Increase | February 2024 |
Welzl, et al. | Expires 25 August 2024 | [Page] |
This document specifies how transport protocols increase their congestion window when the sender is rate-limited. Such a limitation can be caused by the sending application not supplying data or by receiver flow control.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://mwelzl.github.io/draft-ccwg-constrained-increase/draft-welzl-ccwg-constrained-increase.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-welzl-ccwg-ratelimited-increase/.¶
Discussion of this document takes place on the Congestion Control Working Group Working Group mailing list (mailto:ccwg@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/ccwg/. Subscribe at https://www.ietf.org/mailman/listinfo/ccwg/.¶
Source for this draft and an issue tracker can be found at https://github.com/mwelzl/draft-ccwg-constrained-increase.¶
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 25 August 2024.¶
Copyright (c) 2024 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.¶
A sender of a congestion controlled transport protocol becomes "rate-limited" when it does not send any data even though the congestion control rules would allow it to transmit data. This could occur because the application has not provided sufficient data to fully utilise the congestion window (cwnd). It could also occur because the receiver has limited the sender using flow control (e.g., by the advertised TCP receiver window (rwnd) or by the conection or stream flow credit in quic). Current RFCs specifying congestion control mechanisms diverge regarding the rules for increasing the cwnd when the sender is rate-limited.¶
Congestion Window Validation (CWV) [RFC7661] provides an experimental specification defining how to manage a cwnd that has become larger than the current flight size. In contrast, this present document concerns the increase in cwnd when a sender is rate-limited. These two topics are distinct, but are related, because both describe the management of the cwnd when the sender does not fully utilise the current cwnd.¶
This document specifies a uniform rule that congestion control mechanisms MUST apply and provides a recommendation that congestion control implementations SHOULD follow. An appendix provides an overview of the divergence in current RFCs and some current implementations regarding cwnd increase when the sender is rate-limited.¶
This document uses the terms defined in Section 2 of [RFC5681].¶
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.¶
Irrespective of the current state of a congestion control mechanism, senders using a congestion controlled transport protocol:¶
MUST include a limit to the growth of cwnd when FlightSize < cwnd.¶
SHOULD limit the growth of cwnd when FlightSize < cwnd with inc(maxFS).¶
In rule #2, "inc" is a function that returns the maximum unconstrained increase that would result from the congestion control mechanism within one RTT, based on the "maxFS" parameter. For example, for Slow Start, as specified in [RFC5681], inc(maxFS)=2*maxFS, such that equation 2 in [RFC5681] becomes:¶
cwnd_new = cwnd + min (N, SMSS) cwnd = min(cwnd_new, 2*maxFS)¶
Similarly, with rule #2 applied to Congestion Avoidance, inc(maxFS)=1+maxFS, such that equation 3 in [RFC5681] becomes:¶
cwnd_new = cwnd + SMSS*SMSS/cwnd cwnd = min(cwnd_new, 1+maxFS)¶
maxFS is the largest value of FlightSize since the last time that cwnd was decreased. If cwnd has never been decreased, maxFS is the maximum value of FlightSize since the start of the data transfer.¶
If the sending rate is less than permitted by cwnd for multiple RTTs, limited either by the sending application or by the receiver-advertised window, continuously increasing the cwnd would cause a mismatch between the cwnd and the capacity that the path supports (i.e., over-estimating the capacity). Such unlimited growth in the cwnd is therefore disallowed by the first rule.¶
However, in most common congestion control mechanisms, in the absence of an indication of congestion, a cwnd that has been fully utilized during an RTT is permitted to be increased during the immediately following RTT. Thus, such an increase is allowed by the second rule.¶
While congestion control designs could result in unwanted competing traffic, they do not directly result in new security considerations.¶
Transport protocols that provide authentication (including those using encryption), or are carried over protocols that provide authentication, can protect their congestion control mechanisms from network attack. This is orthogonal to the congestion control rules.¶
This document requests no IANA action.¶
This section is provided as input for IETF discussion, and should be removed before publication.¶
[RFC5681] does not contain a rule to limit the growth of cwnd when the sender is rate-limited. This statement (page 8) gives an impression that such cwnd growth might be expected:¶
Implementation Note: An easy mistake to make is to simply use cwnd, rather than FlightSize, which in some implementations may incidentally increase well beyond rwnd.¶
[RFC7661] also suggests there is no increase limitation in the standard TCP behavior (which [RFC7661] changes), on page 4:¶
Standard TCP does not impose additional restrictions on the growth of the congestion window when a TCP sender is unable to send at the maximum rate allowed by the cwnd. In this case, the rate-limited sender may grow a cwnd far beyond that corresponding to the current transmit rate, resulting in a value that does not reflect current information about the state of the network path the flow is using.¶
ns-2 allows cwnd to grow when it is rate-limited by rwnd. (Rate-limited by the sending application: not tested.)¶
ns-3 allows cwnd to grow when it is rate-limited by either an application or the rwnd.¶
In Congestion Avoidance, Linux only allows the cwnd to grow when the sender is unconstrained.
Before kernel version 3.16, this also applied to Slow Start.
The check for "unconstrained" is perfomed by checking if FlightSize is greater or equal to cwnd.
Since kernel version 3.16, which was published in August 2014, in Slow Start, the increase
implements rule #2 in Section 3 in the tcp_is_cwnd_limited
function in tcp.h
.¶
Linux implements a limit to cwnd growth in accordance with rule #1 in Section 3; in Slow Start, this limit follows rule #2, while in Congestion Avoidance, it is more conservative than rule #2. The specification and the ns-2 and ns-3 implementations are in conflict with rules #1 and #2 in Section 3.¶
Section 5.8 of [RFC9438] says:¶
Cubic doesn't increase cwnd when it's limited by the sending application or rwnd.¶
The description of Linux described in Appendix A.1.2 also applies to Cubic.¶
Section 7.2.1 of [RFC9260] says:¶
When cwnd is less than or equal to ssthresh, an SCTP endpoint MUST use the slow-start algorithm to increase cwnd only if the current congestion window is being fully utilized and the data sender is not in Fast Recovery. Only when these two conditions are met can the cwnd be increased; otherwise, the cwnd MUST NOT be increased.¶
The quoted statement from [RFC9260] prescribes the same cwnd growth limitation that is also specified for Cubic and implemented for both Reno and Cubic in Linux. It is in accordance with rule #1 in Section 3, and more conservative than rule #2 in Section 3.¶
Section 7.2.1 of [RFC9260] is specifically limited to Slow Start. Congestion Avoidance is discussed in Section 7.2.2 of [RFC9260] However, this section neither contains a similar rule, nor does it refer back to the rule that limits the growth of cwnd in Section 7.2.1. It is thus implicitly clear that the quoted rule only applies to Slow Start, whereas the rules in Section 3 apply to both Slow Start and Congestion Avoidance.¶
Section 7.8 of [RFC9002] states:¶
When bytes in flight is smaller than the congestion window and sending is not pacing limited, the congestion window is underutilized. This can happen due to insufficient application data or flow control limits. When this occurs, the congestion window SHOULD NOT be increased in either slow start or congestion avoidance.¶
A sender that paces packets might delay sending packets and not fully utilize the congestion window due to this delay. A sender SHOULD NOT consider itself application limited if it would have fully utilized the congestion window without pacing delay.¶
With the exception of pacing, this specification conservatively limits the growth in cwnd, similar to Cubic and SCTP. The exception for pacing in the second paragraph requires that when pacing is enabled, it is specifically taken into account. Pacing could occur over various timescales, but is typically done with delays below an RTT; thus, rule #2 in Section 3 should cover this case.¶
Section 5.1 of [RFC4341] states: > There are currently no standards governing TCP's use of the congestion window during an application-limited period. In particular, it is possible for TCP's congestion window to grow quite large during a long uncongested period when the sender is application limited, sending at a low rate. [RFC2861] essentially suggests that TCP's congestion window not be increased during application-limited periods when the congestion window is not being fully utilized.¶
A DCCP Congestion Control ID (CCID) specifing TCP-like behaviour ought to follow the method specified in this document. The current guidance relates only to !RFC2861. The text in section 5.1 CCID2 !RFC4341, is updated by this document to specify the management of the cwnd during an application-limited period.¶
{XXX - Other protocols and mechanisms in RFCs include: TFRC; various multicast and multipath mechanisms; the RMCAT mechanisms for real-time media. Other protocol specs containing congestion control include: MPTCP, RTP extensions for CC. A DCCP Congestion Control ID (CCID) specifing TFRC-like behaviour (including CCID3 !RFC4341), needs to follow the recommendations for TFRC.¶
This can get huge... how many / which of these should we discuss? XXX}¶
-00 was the first individual submission for feedback by CCWG. -01 includes editorial improvements -- Removes application interaction with QUIC pacing, since pacing is might be within the QUIC stack. -- Adds explicit mention of DCCP/CCID2. -- Adds this change log.¶