2

TCP slow start came about in a time when the Internet began experiencing "congestion collapses". The anecdotal example from Van Jacobson and Michael Karels paper goes:

During this period, the data throughput from LBL to UC Berkeley (sites separated
by 400 yards and two IMP hops) dropped from 32 Kbps to 40 bps.

The congestion problem is often described as being caused by the transition from a high-speed link to a slow-speed link, and packet build up/dropping at the buffer at this bottleneck.
What I'm trying to understand is how such a build up would cause a drop in end-to-end throughput, as opposed to simply causing superfluous activity/retransmits on the high-speed portion of the link leading into the full buffer. As an example, consider the following network:

    fast       slow       fast
A ======== B -------- C ======== D

A and D are the endpoints and B and C are the packet buffers at a transition from a high speed to low speed network. So e.g. the link between A/B and C/D is 10Mbps, and link between B/C is 56Kbps. Now if A transmits a large (let's say theoretically infinite) message to D, what I'm trying to understand is why it would take it any longer to get through if it just hammered the TCP connection with data versus adapting to the slower link speed in the middle of the connection. I'm envisaging B as just being some thing whose buffer drains at a fixed rate of 56Kbps, regardless of how heavily its buffer is being hammered by A, and regardless of how many packets it has to discard because of a full buffer. So if A is always keeping B's buffer full (or overfull as may be the case), and B is always transmitting at it's maximum rate of 56Kbps, how would the throughput get any better by using slow-start instead?

The only thing I could think of was if the same packets D had already received were having to be retransmitted over the slow B/C link under congestion, and this was blocking new packets. But wouldn't D have typically ACK'd any packets it had received, so retransmitted packets should be mostly those which legitimately hadn't been received by D because they were dropped at B's buffer?

Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126
  • Or, perhaps, those segments were retransmitted by A because it hadn't seen an ACK for them, *because they're still in transit*... It'll only wait so long before it assumes they are MIA. At which point it's sending most of the data twice, and most of that a third time, and most of the third run a fourth time, and... – cHao Jun 13 '12 at 03:22
  • @cHao I did think of this. The fact they're still in transit though would seem to imply bufferbloat at B. I didn't think bufferbloat was a problem back in the day, but I could be wrong? – Bryce Thomas Jun 13 '12 at 03:27
  • Not sure. But think about this, too...A and D only know the speed on their respective ends of the link, if that. They don't know how fast the B<->C link is. If they assume they have 10Mbps to play with, and actually *send* stuff at 10Mbps (setting up large enough windows to make that useful, of course), and B drops the majority of A's packets, they'll *still* need to be retransmitted...so now A's eating up tons of bandwidth on its network (not just flooding B with packets, but having to retransmit cause most of them were dropped!) in order to send stuff at 56K max. – cHao Jun 13 '12 at 03:38
  • Any way you look at it, a retransmitted packet is lost/wasted bandwidth. And if everyone's doing the same thing... :P – cHao Jun 13 '12 at 03:57

1 Answers1

2

Remember that networks involve sharing resources between multiple computers. Very simplistically, slow start is required to avoid router buffer exhaustion by a small number of TCP sessions (in your diagram, this is most likely at points B and C)

From RFC 2001, Section 1:

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.

...

[2]  V. Jacobson, "Congestion Avoidance and Control," Computer
    Communication Review, vol. 18, no. 4, pp. 314-329, Aug. 1988.
    ftp://ftp.ee.lbl.gov/papers/congavoid.ps.Z.

Routers must have finite buffers. The larger a speed mismatch between links is, the greater the chance of buffer exhaustion without slow start. After you have buffer exhaustion, your average TCP throughput will go down because buffering increases TCP's ability to utilize links (preventing unnecessary drops for instantaneous link saturation).

Note that RFC 2001 above has been superseded by RFC 5681; however, RFC 2001 offers a more quotable answer to your question.

From your OP...

Now if A transmits a large (let's say theoretically infinite) message to D, what I'm trying to understand is why it would take it any longer to get through if it just hammered the TCP connection with data versus adapting to the slower link speed in the middle of the connection.

First, there is no such thing as an infinite message in TCP. TCP was limited by the initial window size before slow-start came along.

So, let's say the initial TCP segment was 64KB long. If the entire TCP segment fills the router's tx buffer at B, TCP utilizes less of the link over time due to dynamics involved with packet loss, ACKs and TCP back-off. Let's look at individual situations:

  • B's tx_buffer < 64KB: You automatically lost time for retransmissions because A's TCP is sending faster than B can dequeue packets
  • B's tx_buffer >= 64KB: As long as A is the only station transmitting, no negative effects (as long as D is ACK-ing correctly); however, if there are multiple hosts transmitting on A's LAN trying to transit across the 56K link, there are probably problems because it takes 200 milliseconds to dequeue a single 1500 byte packet at 56K. If you have 44 1500-byte packets from A's 64KB initial window (44*1460=64KB; you only get 1460 bytes of TCP payload), the router has a saturated link for almost 9 seconds handling A's traffic.

The second situation is neither fair nor wise. TCP backs off when it sees any packet loss... multiple hosts sharing a single link must use slow start to keep the situation sane.

BTW, I have never seen a router with 9 seconds of buffering on an interface. No user would tolerate that kind of latency. Most routers have about 1-2 seconds max, and that was years ago at T-1 speeds. For a number of reasons, buffers today are even smaller.

Community
  • 1
  • 1
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
  • Regardng your bullet points, I'm still having trouble seeing how this impacts aggregate throughput. Point 1, yes, there is squandered bandwidth between A and B with retransmits, but B to C is kept plenty busy (which is why packets are dropped at B), so it seems like end-to-end things are still moving as fast as possible. Point 2 seems to be mainly wrt to *fairness* and latency, not throughput. If packets were making it to C and *then* had to be retransmitted regardless because of timeout, it all makes sense. As you seem to infer though, small buffer sizes in practice helped bound latency. – Bryce Thomas Jun 14 '12 at 11:16
  • Point 1: If packets are dropped and have to retransmit, then your throughput is lower; the issue is not merely dropped packets but the 1xRTT it takes for packet loss detection and the self-imposed TCP backoff because of the drops. Point 2: I'm conceding that there is no throughput problem for the first station, but the situation fails the common sense test. To summarize: because of limited buffer sizes in routers, people had to make TCP start slowly – Mike Pennington Jun 14 '12 at 11:46
  • Point 1: During that 1xRTT for packet loss detection, wouldn't subsequent packets have been progressively making their way through B -> C, so you get comparable throughput, the packets just arrive in a different order? I thought the self-imposed backoff was introduced concurrently with TCP slow-start (i.e. didn't exist before that), but I'm guessing that's wrong? Point 2 I think I see what you're getting at, I just don't see it having any effect on aggregate throughput unless packets are dropped/require retransmission *after* already passing through the slow bottleneck link. – Bryce Thomas Jun 14 '12 at 12:07
  • Ah, I suppose unless the buffer drain time was a lot smaller than the retransmit timeout. In which case there'd be cycling between an overflowed buffer that then quickly fully drains, followed by a long waiting period for the timeout before retransmit, followed by another overflowing buffer with all the retransmits... Which might have been what you were getting at... – Bryce Thomas Jun 14 '12 at 12:10