home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / papers / draft.jan29 < prev    next >
Text File  |  1997-01-28  |  13KB  |  258 lines

  1. This is a short note to recommend changing the permitted initial window
  2. in TCP from 1 packet to 4K bytes.  (More precisely, the initial window
  3. would be the maximum of the initial segment size and 4380 bytes
  4. (3x1460).  An additional constraint would be that the initial window
  5. would be at most four times the initial segment size.  As always, the
  6. upper bound imposed by the receiver's advertised window would also
  7. still apply.  For brevity, for the rest of the note I refer to this
  8. simply as a larger initial window.)  We emphasize that we do not
  9. propose REQUIRING a larger initial window for TCP;  we simply
  10. propose explicitly ALLOWING one.
  11.  
  12. This was discussed at the End-to-end Research Group meeting in November
  13. 1996.  This general change is supported by a number of other people,
  14. including Fred Baker, Jon Crowcroft, Van Jacobson, Jamshid Mahdavi,
  15. Matt Mathis, and Vern Paxson.  That does not, however, necessarily mean
  16. that they have each read and agree with every word in the most recent
  17. draft of the note.  I also thank Bob Braden, K.K. Ramakrishnan, and Joe
  18. Touch for feedback on this note.
  19.  
  20. The change:
  21.  
  22. The recommendation is to allow the initial window used by a TCP
  23. connection to increase from 1 packet (or more precisely, segment) to
  24. roughly 4K bytes.  The initial window would be the maximum of the
  25. initial segment size and 4380 bytes (3x1460).  An additional constraint
  26. would be that the initial window would be at most four times the
  27. initial segment size.  Thus, TCP connections sending 1460-byte packets
  28. could initially send three packets, and TCP connections sending
  29. 512-byte packets could initially send four packets.  This increased
  30. initial window would be optional:  that a TCP MAY start with a larger
  31. initial window, not that it SHOULD.
  32.  
  33. This would only apply to the initial window of the connection, in its
  34. very first roundtrip time of data, or to connections that are just
  35. beginning to send data after a long quiescent period.  This would not
  36. change the behavior after a retransmit timeout, when the sender would
  37. continue to slow-start from an initial window of one packet.
  38.  
  39. The benefits:
  40.  
  41. (1) For connections with only a small amount of data to send, a larger
  42. initial window
  43. would reduce the time needed to send all of the data (assuming moderate
  44. packet drop rates).  For the many email and web page files that are
  45. less than 4K bytes, the larger initial window would reduce the 
  46. data transfer to a single
  47. roundtrip time.  
  48.  
  49. (2) For connections that will be able to use a large congestion window,
  50. this eliminates several round-trip times in the initial slow-start to
  51. increase the congestion window from one packet to two, four, and then
  52. eight packets.  This would be of particular benefit for high-bandwidth
  53. large-propagation-delay TCP connections, such as those over satellite
  54. links.
  55.  
  56. (3) For connections with packets of no more than 2K bytes, this means
  57. that the sender can initially send at least two packets.  For data
  58. receivers that use a "delayed ACK" but that send an ACK for at least
  59. every second packet (as recommended in RFC 1122 Section 4.2.3.2), this
  60. means that the data receiver will send an ACK immediately after
  61. receiving the second packet.  This avoids the delay (of 0.1 seconds or
  62. more) that can occur when a sender starts with a congestion window of
  63. one packet.
  64.  
  65. Implementation issues:
  66.  
  67. When implemented along with Path MTU Discovery, only one of the packets
  68. in the initial window should have the "Don't Fragment" bit set.  If
  69. implemented, the initial window MUST be configurable.  The default
  70. setting of the initial window (to either one segment, or up to 4380
  71. bytes) SHOULD be per assigned numbers.  Thus implementations will use
  72. the preconfigured standard value by default, but the standard value can
  73. be tuned within the allowed range for some specific context.
  74.  
  75. Even though the initial window is at most four times the initial
  76. segment size, under some limited conditions TCP may send more than four
  77. packets in the initial burst.  This would occur, for example, if the
  78. TCP data sender sends an initial large packet with the "Don't Fragment"
  79. bit set, discovers that the MTU should be set to 512 bytes, and then
  80. retransmits eight 512-byte segments.
  81.  
  82. This larger initial window should not be viewed as an encouragement for
  83. web browsers to open four simultaneous TCP connections all with larger
  84. initial windows.  (Web browsers should not open four simultaneous TCP
  85. connections to the same destination in any case, because this works
  86. against TCP's congestion control mechanisms.)  
  87.  
  88. Are there drawbacks to the connection?
  89.  
  90. In high-congestion environments, particularly for routers that have a
  91. bias against bursty traffic (as in the typical Drop Tail router
  92. queues), a TCP connection could sometimes be better off starting with
  93. an initial window of one packet.  There are scenarios where a TCP
  94. connection slow-starting from an initial window of one packet might not
  95. have packets dropped, while a TCP connection starting with an initial
  96. window of four packets might have packets dropped unnecessarily,
  97. due to the inability of the router to handle small bursts.  This could
  98. result in an unnecessary retransmit timeout.  For a large-window
  99. connection that is able to recover without a retransmit timeout, this
  100. could result in an unnecessarily-early transition from the slow-start
  101. to the congestion-avoidance phase of the window increase algorithm.
  102. These premature packet drops should not happen in uncongested 
  103. networks, or in moderately-congested networks where the congested
  104. router used RED (Random Early Congestion) queue management [FJ93].
  105.  
  106. Some TCP connections will receive better performance with the higher
  107. initial window even if the burstiness of the initial window results in
  108. premature packet drops.  This will be true if (1) the TCP connection
  109. recovers from the packet drop without a retransmit timeout, and (2) the
  110. TCP connection is ultimately limited to a small congestion window by
  111. either network congestion or by the receiver's advertised window.
  112.  
  113. Because some connections could get better performance with an initial
  114. window of one packet, using a larger initial window 
  115. should be optional, not a requirement.
  116.  
  117. Is there any danger to the network?
  118.  
  119. We consider two separate potential dangers for the network. 
  120. The first danger would be a scenario where a large number
  121. of packets on congested links were duplicate or unnecessarily-retransmitted
  122. packets that had already been received at the receiver.
  123. The second danger would be a scenario where a large number
  124. of packets on congested links were packets that would be dropped
  125. later in the network before reaching their final destination.
  126.  
  127. Unnecessarily-retransmitted packets:
  128.  
  129. As described in the previous section, the larger initial window could
  130. occasionally result in a packet dropped from the initial window, when
  131. that packet might not have been dropped if the sender had slow-started
  132. from an initial window of one packet.  However, Appendix A shows that
  133. even in this case, the larger initial window would not result in a
  134. large number of unnecessarily-retransmitted packets.
  135.  
  136. Packets dropped later in the network:
  137.  
  138. How much would the larger initial window for TCP increase the number of
  139. packets on congested links that would be dropped before reaching their
  140. final destination?  This is a problem that can only occur for connections
  141. with multiple congested links, where some packets might use scarce
  142. bandwidth on the first congested link along the path, only to be dropped 
  143. later along the path.
  144.  
  145. First, many of the TCP connections will have only one congested link
  146. along the path.  Packets dropped from these connections do not
  147. ``waste'' scarce bandwidth, and do not contribute to congestion
  148. collapse.
  149.  
  150. However, some TCP connection paths will have multiple congested links,
  151. and packets dropped from the initial window could use scarce bandwidth
  152. along the earlier congested links before being dropped.  To the extent
  153. that the drop rate is independent of the initial window used by TCP
  154. packets, the problem of congested links carrying packets that will be
  155. dropped before reaching their destination will be similar for TCP
  156. connections that start by sending four packets or one packet.
  157.  
  158. It is true that for a network with high packet drop rates, increasing
  159. the initial TCP congestion window could increase the packet drop rate
  160. even further.  This is in part because routers with Drop Tail queue
  161. management have difficulties with bursty traffic in times of
  162. congestion.  However, this should be a second order effect.  This has
  163. not been explored with extensive simulations, or with extensive
  164. analysis, and simulations would certainly be useful.  However, given
  165. uncorrelated arrivals for TCP connections, the larger initial
  166. TCP congestion window should generally not significantly increase the
  167. packet drop rate.  
  168.  
  169. There are other changes in the network are also making a larger initial
  170. window less of a problem.  These include the increasing deployment of
  171. higher-speed links where 4K bytes is a rather small quantity of data
  172. and the deployment of queue management mechanisms such as RED that are more
  173. tolerant of transient traffic bursts.  The current dangers of
  174. congestion collapse most likely now come not from a 4K initial burst
  175. from TCP connections, but from the increased deployment of UDP
  176. connections without any end-to-end congestion control at all.
  177.  
  178. Are there fairness considerations?
  179.  
  180. No.  This does not mean that a TCP connection with an initial window of
  181. one 1460-byte packet and a TCP connection with an initial window of
  182. three 1460-byte packets would see exactly the same throughput in all
  183. scenarios.  This means that there would be no systematic unfairness
  184. against TCP connections that do not use the larger initial window.
  185.  
  186. Summary:
  187.  
  188. This is a small change to make to TCP that does not present any major
  189. dangers, and that is likely to be of benefit to TCP connections
  190. with long roundtrip times (saving several roundtrip times of the initial
  191. slow-start).  
  192.  
  193. The process:
  194.  
  195. What would be the process of making this change?  If a discussion
  196. results in rough consensus on the end-to-end-interest mailing list,
  197. then I will write an internet draft, gather supporting documentation,
  198. and submit it to the Transport Area Directors, who would submit it to the
  199. IESG.
  200.  
  201. The current standards:
  202.  
  203. What do the current standards say about the initial congestion window?
  204. Section 4.2.2.15 of RFC 1122 says the following:
  205.  
  206.             Recent work by Jacobson [TCP:7] on Internet congestion and
  207.             TCP retransmission stability has produced a transmission
  208.             algorithm combining "slow start" with "congestion
  209.             avoidance".  A TCP MUST implement this algorithm. 
  210.  
  211. I am not aware of any other discussion of the initial window in the
  212. standards literature.
  213.  
  214. Appendix A:
  215.  
  216. In the current environment (without Explicit Congestion Notification),
  217. all TCPs use packet drops as the feedback mechanism from the network
  218. about the limits of available bandwidth.  However, the change to a
  219. larger initial window should not result in a large number of
  220. unnecessarily-retransmitted packets.
  221.  
  222. If a packet is dropped from the initial window, there are three
  223. different ways for TCP to recover:  (1) Slow-starting from a window of
  224. one packet, as is done after a retransmit timeout, or after Fast
  225. Retransmit in Tahoe TCP; (2) Fast Recovery without SACK, as is done
  226. after three DUP ACKs in Reno TCP; and (3) Fast Recovery with SACK, for
  227. TCP where both the sender and the receiver support the SACK option.  In
  228. all three cases, if a single packet is dropped from the initial window,
  229. there are no unnecessarily-retransmitted packets.  (Note that
  230. for a TCP sending four 512-byte packets in the initial window, a
  231. single packet drop will not require a retransmit timeout, but
  232. can be recovered from using the Fast Retransmit procedure.)
  233.  
  234. What if multiple packets are dropped from the initial window?  Using
  235. the first recovery method, slow-starting from a window of one packet,
  236. the number of unnecessarily-retransmitted packets is limited [FF96].
  237. In the second case of Fast Recovery without SACK, multiple packet drops
  238. from a window of data generally result in a retransmit timeout.  Again,
  239. the number of unnecessarily-retransmitted packets is small.  In the
  240. third case, of Fast Recovery with SACK, there can only be
  241. unnecessarily-retransmitted packets if a precise pattern of ACK packets
  242. are also lost [F96], or if packets are seriously-reordered in the
  243. network.  In any case, the number of unnecessarily-retransmitted
  244. packets due to a larger initial window should be small.
  245.  
  246. References:
  247.  
  248. [FF96] Fall, K., and Floyd, S., Simulation-based Comparisons of Tahoe,
  249. Reno, and SACK TCP. To appear in Computer Communications Review, July
  250. 1996.
  251.  
  252. [F96] Floyd, S., Issues of TCP with SACK. Technical report, January
  253. 1996.  Available from http://www-nrg.ee.lbl.gov/floyd/.
  254.  
  255. [JF93] Floyd, S., and Jacobson, V., Random Early Detection gateways for
  256. Congestion Avoidance. IEEE/ACM Transactions on Networking, V.1 N.4,
  257. August 1993, p. 397-413.
  258.