TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms
RFC 2001

Document Type RFC - Proposed Standard (January 1997; No errata)
Obsoleted by RFC 2581
Was draft-stevens-tcpca-spec (individual)
Last updated 2013-03-02
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state RFC 2001 (Proposed Standard)
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                         W. Stevens
Request for Comments: 2001                                          NOAO
Category: Standards Track                                   January 1997

                 TCP Slow Start, Congestion Avoidance,
             Fast Retransmit, and Fast Recovery Algorithms

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.


   Modern implementations of TCP contain four intertwined algorithms
   that have never been fully documented as Internet standards:  slow
   start, congestion avoidance, fast retransmit, and fast recovery.  [2]
   and [3] provide some details on these algorithms, [4] provides
   examples of the algorithms in action, and [5] provides the source
   code for the 4.4BSD implementation.  RFC 1122 requires that a TCP
   must implement slow start and congestion avoidance (Section
   of [1]), citing [2] as the reference, but fast retransmit and fast
   recovery were implemented after RFC 1122.  The purpose of this
   document is to document these four algorithms for the Internet.


   Much of this memo is taken from "TCP/IP Illustrated, Volume 1:  The
   Protocols" by W. Richard Stevens (Addison-Wesley, 1994) and "TCP/IP
   Illustrated, Volume 2: The Implementation" by Gary R. Wright and W.
   Richard Stevens (Addison-Wesley, 1995).  This material is used with
   the permission of Addison-Wesley.  The four algorithms that are
   described were developed by Van Jacobson.

1.  Slow Start

   Old TCPs would start a connection with the sender injecting multiple
   segments into the network, up to the window size advertised by the
   receiver.  While this is OK when the two hosts are on the same LAN,
   if there are routers and slower links between the sender and the
   receiver, problems can arise.  Some intermediate router must queue
   the packets, and it's possible for that router to run out of space.
   [2] shows how this naive approach can reduce the throughput of a TCP
   connection drastically.

Stevens                     Standards Track                     [Page 1]
RFC 2001                          TCP                       January 1997

   The algorithm to avoid this is called slow start.  It operates by
   observing that the rate at which new packets should be injected into
   the network is the rate at which the acknowledgments are returned by
   the other end.

   Slow start adds another window to the sender's TCP:  the congestion
   window, called "cwnd".  When a new connection is established with a
   host on another network, the congestion window is initialized to one
   segment (i.e., the segment size announced by the other end, or the
   default, typically 536 or 512).  Each time an ACK is received, the
   congestion window is increased by one segment.  The sender can
   transmit up to the minimum of the congestion window and the
   advertised window.  The congestion window is flow control imposed by
   the sender, while the advertised window is flow control imposed by
   the receiver.  The former is based on the sender's assessment of
   perceived network congestion; the latter is related to the amount of
   available buffer space at the receiver for this connection.

   The sender starts by transmitting one segment and waiting for its
   ACK.  When that ACK is received, the congestion window is incremented
   from one to two, and two segments can be sent.  When each of those
   two segments is acknowledged, the congestion window is increased to
   four.  This provides an exponential growth, although it is not
   exactly exponential because the receiver may delay its ACKs,
   typically sending one ACK for every two segments that it receives.

   At some point the capacity of the internet can be reached, and an
   intermediate router will start discarding packets.  This tells the
   sender that its congestion window has gotten too large.

   Early implementations performed slow start only if the other end was
   on a different network.  Current implementations always perform slow

2.  Congestion Avoidance

   Congestion can occur when data arrives on a big pipe (a fast LAN) and
   gets sent out a smaller pipe (a slower WAN).  Congestion can also
   occur when multiple input streams arrive at a router whose output
   capacity is less than the sum of the inputs.  Congestion avoidance is
   a way to deal with lost packets.  It is described in [2].
Show full document text