⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2861.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 2 页
字号:
Network Working Group                                         M. HandleyRequest for Comments: 2861                                     J. PadhyeCategory: Experimental                                          S. Floyd                                                                   ACIRI                                                               June 2000                    TCP Congestion Window ValidationStatus of this Memo   This memo defines an Experimental Protocol for the Internet   community.  It does not specify an Internet standard of any kind.   Discussion and suggestions for improvement are requested.   Distribution of this memo is unlimited.Copyright Notice   Copyright (C) The Internet Society (2000).  All Rights Reserved.Abstract   TCP's congestion window controls the number of packets a TCP flow may   have in the network at any time.  However, long periods when the   sender is idle or application-limited can lead to the invalidation of   the congestion window, in that the congestion window no longer   reflects current information about the state of the network.  This   document describes a simple modification to TCP's congestion control   algorithms to decay the congestion window cwnd after the transition   from a sufficiently-long application-limited period, while using the   slow-start threshold ssthresh to save information about the previous   value of the congestion window.   An invalid congestion window also results when the congestion window   is increased (i.e., in TCP's slow-start or congestion avoidance   phases) during application-limited periods, when the previous value   of the congestion window might never have been fully utilized.  We   propose that the TCP sender should not increase the congestion window   when the TCP sender has been application-limited (and therefore has   not fully used the current congestion window).  We have explored   these algorithms both with simulations and with experiments from an   implementation in FreeBSD.1.  Conventions and Acronyms   The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,   SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this   document, are to be interpreted as described in [B97].Handley, et al.               Experimental                      [Page 1]RFC 2861            TCP Congestion Window Validation           June 20002. Introduction   TCP's congestion window controls the number of packets a TCP flow may   have in the network at any time.  The congestion window is set using   an Additive-Increase, Multiplicative-Decrease (AIMD) mechanism that   probes for available bandwidth, dynamically adapting to changing   network conditions.  This AIMD mechanism works well when the sender   continually has data to send, as is typically the case for TCP used   for bulk-data transfer.  In contrast, for TCP used with telnet   applications, the data sender often has little or no data to send,   and the sending rate is often determined by the rate at which data is   generated by the user.  With the advent of the web, including   developments such as TCP senders with dynamically-created data and   HTTP 1.1 with persistent-connection TCP, the interaction between   application-limited periods (when the sender sends less than is   allowed by the congestion or receiver windows) and network-limited   periods (when the sender is limited by the TCP window) becomes   increasingly important.  More precisely, we define a network-limited   period as any period when the sender is sending a full window of   data.   Long periods when the sender is application-limited can lead to the   invalidation of the congestion window.  During periods when the TCP   sender is network-limited, the value of the congestion window is   repeatedly "revalidated" by the successful transmission of a window   of data without loss.  When the TCP sender is network-limited, there   is an incoming stream of acknowledgements that "clocks out" new data,   giving concrete evidence of recent available bandwidth in the   network.  In contrast, during periods when the TCP sender is   application-limited, the estimate of available capacity represented   by the congestion window may become steadily less accurate over time.   In particular, capacity that had once been used by the network-   limited connection might now be used by other traffic.   Current TCP implementations have a range of behaviors for starting up   after an idle period.  Some current TCP implementations slow-start   after an idle period longer than the RTO estimate, as suggested in   [RFC2581] and in the appendix of [VJ88], while other implementations   don't reduce their congestion window after an idle period.  RFC 2581   [RFC2581] recommends the following: "a TCP SHOULD set cwnd to no more   than RW [the initial window] before beginning transmission if the TCP   has not sent data in an interval exceeding the retransmission   timeout."  A proposal for TCP's slow-start after idle has also been   discussed in [HTH98].  The issue of validation of congestion   information during idle periods has also been addressed in contexts   other than TCP and IP, for example in "Use-it or Lose-it" mechanisms   for ATM networks [J96,J95].Handley, et al.               Experimental                      [Page 2]RFC 2861            TCP Congestion Window Validation           June 2000   To address the revalidation of the congestion window after a   application-limited period, we propose a simple modification to TCP's   congestion control algorithms to decay the congestion window cwnd   after the transition from a sufficiently-long application-limited   period (i.e., at least one roundtrip time) to a network-limited   period.  In particular, we propose that after an idle period, the TCP   sender should reduce its congestion window by half for every RTT that   the flow has remained idle.   When the congestion window is reduced, the slow-start threshold   ssthresh remains as "memory" of the recent congestion window.   Specifically, ssthresh is never decreased when cwnd is reduced after   an application-limited period; before cwnd is reduced, ssthresh is   set to the maximum of its current value, and half-way between the old   and the new values of cwnd.  This use of ssthresh allows a TCP sender   increasing its sending rate after an application-limited period to   quickly slow-start to recover most of the previous value of the   congestion window.  To be more precise, if ssthresh is less than 3/4   cwnd when the congestion window is reduced after an application-   limited period, then ssthresh is increased to 3/4 cwnd before the   reduction of the congestion window.   An invalid congestion window also results when the congestion window   is increased (i.e., in TCP's slow-start or congestion avoidance   phases) during application-limited periods, when the previous value   of the congestion window might never have been fully utilized.  As   far as we know, all current TCP implementations increase the   congestion window when an acknowledgement arrives, if allowed by the   receiver's advertised window and the slow-start or congestion   avoidance window increase algorithm, without checking to see if the   previous value of the congestion window has in fact been used.  This   document proposes that the window increase algorithm not be invoked   during application-limited periods [MSML99].  In particular, the TCP   sender should not increase the congestion window when the TCP sender   has been application-limited (and therefore has not fully used the   current congestion window).  This restriction prevents the congestion   window from growing arbitrarily large, in the absence of evidence   that the congestion window can be supported by the network.  From   [MSML99, Section 5.2]: "This restriction assures that [cwnd] only   grows as long as TCP actually succeeds in injecting enough data into   the network to test the path."   A somewhat-orthogonal problem associated with maintaining a large   congestion window after an application-limited period is that the   sender, with a sudden large amount of data to send after a quiescent   period, might immediately send a full congestion window of back-to-   back packets.  This problem of sending large bursts of packets back-   to-back can be effectively handled using rate-based pacing (RBP,Handley, et al.               Experimental                      [Page 3]RFC 2861            TCP Congestion Window Validation           June 2000   [VH97]), or using a maximum burst size control [FF96].  We would   contend that, even with mechanisms for limiting the sending of back-   to-back packets or pacing packets out over the period of a roundtrip   time, an old congestion window that has not been fully used for some   time can not be trusted as an indication of the bandwidth currently   available for that flow.  We would contend that the mechanisms to   pace out packets allowed by the congestion window are largely   orthogonal to the algorithms used to determine the appropriate size   of the congestion window.3. Description   When a TCP sender has sufficient data available to fill the available   network capacity for that flow, cwnd and ssthresh get set to   appropriate values for the network conditions.  When a TCP sender   stops sending, the flow stops sampling the network conditions, and so   the value of the congestion window may become inaccurate.  We believe   the correct conservative behavior under these circumstances is to   decay the congestion window by half for every RTT that the flow   remains inactive.  The value of half is a very conservative figure   based on how quickly multiplicative decrease would have decayed the   window in the presence of loss.   Another possibility is that the sender may not stop sending, but may   become application-limited rather than network-limited, and offer   less data to the network than the congestion window allows to be   sent.  In this case the TCP flow is still sampling network   conditions, but is not offering sufficient traffic to be sure that   there is still sufficient capacity in the network for that flow to   send a full congestion window.  Under these circumstances we believe   the correct conservative behavior is for the sender to keep track of   the maximum amount of the congestion window used during each RTT, and   to decay the congestion window each RTT to midway between the current   cwnd value and the maximum value used.   Before the congestion window is reduced, ssthresh is set to the   maximum of its current value and 3/4 cwnd.  If the sender then has   more data to send than the decayed cwnd allows, the TCP will slow-   start (perform exponential increase) at least half-way back up to the   old value of cwnd.   The justification for this value of "3/4 cwnd" is that 3/4 cwnd is a   conservative estimate of the recent average value of the congestion   window, and the TCP should safely be able to slow-start at least up   to this point.  For a TCP in steady-state that has been reducing its   congestion window each time the congestion window reached some   maximum value `maxwin', the average congestion window has been 3/4   maxwin.  On average, when the connection becomes application-limited,Handley, et al.               Experimental                      [Page 4]RFC 2861            TCP Congestion Window Validation           June 2000   cwnd will be 3/4 maxwin, and in this case cwnd itself represents the   average value of the congestion window.  However, if the connection   happens to become application-limited when cwnd equals maxwin, then   the average value of the congestion window is given by 3/4 cwnd.   An alternate possibility would be to set ssthresh to the maximum of   the current value of ssthresh, and the old value of cwnd, allowing   TCP to slow-start all of the way back up to the old value of cwnd.   Further experimentation can be used to evaluate these two options for   setting ssthresh.   For the separate issue of the increase of the congestion window in   response to an acknowledgement, we believe the correct behavior is   for the sender to increase the congestion window only if the window   was full when the acknowledgment arrived.   We term this set of modifications to TCP Congestion Window Validation   (CWV) because they are related to ensuring the congestion window is   always a valid reflection of the current network state as probed by   the connection.3.1. The basic algorithm for reducing the congestion window   A key issue in the CWV algorithm is to determine how to apply the   guideline of reducing the congestion window once for every roundtrip   time that the flow is application-limited.  We use TCP's   retransmission timer (RTO) as a reasonable upper bound on the   roundtrip time, and reduce the congestion window roughly once per   RTO.   This basic algorithm could be implemented in TCP as follows: When TCP   sends a new packet it checks to see if more than RTO seconds have   elapsed since the previous packet was sent.  If RTO has elapsed,   ssthresh is set to the maximum of 3/4 cwnd and the current value of   ssthresh, and then the congestion window is halved for every RTO that   elapsed since the previous packet was sent.  In addition, T_prev is   set to the current time, and W_used is reset to zero.  T_prev will be   used to determine the elapsed time since the sender last was network-   limited or had reduced cwnd after an idle period.  When the sender is   application-limited, W_used holds the maximum congestion window   actually used since the sender was last network-limited.   The mechanism for determining the number of RTOs in the most recent   idle period could also be implemented by using a timer that expires   every RTO after the last packet was sent instead of a check per   packet - efficiency constraints on different operating systems may   dictate which is more efficient to implement.Handley, et al.               Experimental                      [Page 5]RFC 2861            TCP Congestion Window Validation           June 2000   After TCP sends a packet, it also checks to see if that packet filled   the congestion window.  If so, the sender is network-limited, and   sets the variable T_prev to the current TCP clock time, and the   variable W_used to zero.   When TCP sends a packet that does not fill the congestion window, and   the TCP send queue is empty, then the sender is application-limited.   The sender checks to see if the amount of unacknowledged data is   greater than W_used; if so, W_used is set to the amount of   unacknowledged data.  In addition TCP checks to see if the elapsed   time since T_prev is greater than RTO.  If so, then the TCP has not   just reduced its congestion window following an idle period.  The TCP   has been application-limited rather than network-limited for at least   an entire RTO interval, but for less than two RTO intervals.  In this   case, TCP sets ssthresh to the maximum of 3/4 cwnd and the current   value of ssthresh, and reduces its congestion window to   (cwnd+W_used)/2.  W_used is then set to zero, and T_prev is set to   the current time, so a further reduction will not take place until at   least another RTO period has elapsed.  Thus, during an application-   limited period the CWV algorithm reduces the congestion window once   per RTO.3.2.  Pseudo-code for reducing the congestion window

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -