Subject: Re: Very slow pipe/TCP connection in 1.6_BETA4
To: Jason R Thorpe <>
From: Bill Studenmund <>
List: current-users
Date: 07/12/2002 20:44:16
On Fri, 12 Jul 2002, Jason R Thorpe wrote:

> On Fri, Jul 12, 2002 at 12:55:33PM -0700, Bill Studenmund wrote:
>  > But with a 16k window of which 48 bytes are filled, why can't I send 4k?
>  > Sounds like a bug somewhere...
> The window the receiver is advertising back to you (your SND_WND) is 16k,
> but your congestion window hasn't opened up yet.
> The way this works is that your CWND starts out at 1 packet (the Initial
> Window).  For each ACK you get back, it opens up 2 more packets.  Eventually,
> your CWND opens up to match your SND_WND.
> Now, even though things are counted as packets, the BSD TCP still likes
> to think about bytes.  So, the way available CWND is computed is:
> 	initial-window * tx-segsize
> If you are NOT using PMTU, then tx-segsize is tcp_mssdflt, which defaults
> to 512.  If you are using PMTU, then it's the MTU of the outgoing interface,
> adjusted for headers, etc.

Ok. So with the default of 512 for tx-segsize, I should be at a 16k
congestion window after 16 ACKs, shouldn't I?

I'm seeing this behavior after many thousands of packets (and I'd assume
associated acks) have gone by. ??

Oh, this is happening for a connection over the loopback interface.

> It might be worth playing with the net.inet.tcp.init_win parameter -- crank
> it up to 4, or something, and see if that makes any difference.  Also make
> sure you have PMTU enabled (net.inet.ip.mtudisc).

Will try this.

Take care,