From owner-freebsd-net Sun Jun 18 21:28:11 2000 Delivered-To: freebsd-net@freebsd.org Received: from overlord.e-gerbil.net (e-gerbil.net [207.91.110.247]) by hub.freebsd.org (Postfix) with ESMTP id 46D4437BB34 for ; Sun, 18 Jun 2000 21:28:08 -0700 (PDT) (envelope-from ras@e-gerbil.net) Received: from localhost (ras@localhost) by overlord.e-gerbil.net (8.9.3/8.9.3) with ESMTP id AAA09762; Mon, 19 Jun 2000 00:28:04 -0400 (EDT) (envelope-from ras@e-gerbil.net) X-Authentication-Warning: overlord.e-gerbil.net: ras owned process doing -bs Date: Mon, 19 Jun 2000 00:28:04 -0400 (EDT) From: "Richard A. Steenbergen" To: David Greenman Cc: freebsd-net@FreeBSD.ORG Subject: Re: Auto-scaling socket buffers In-Reply-To: <200006182040.NAA15590@implode.root.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 18 Jun 2000, David Greenman wrote: > >This could affect our transmitions, and thus the send buffer, but not the > >recv buffer. if you've received so much data that you've maxed your socket > >buffer and are sending a window of 0 on your ACKs, you're confident that > >its not a lack of bandwidth but rather a lack of buffer space -- This can > >all be determined locally. In reality the recv buffer is the one we're > >concerned with anyways, as it would have to be the other side adjusting > >its recv buffer for our uploads to show any performance increases. > > FreeBSD rarely sends a window of 0. It usually only happens when the > machine is so overloaded that it can't keep up with the input stream. I do > agree, however, that advertising a larger receive window is needed in order > for the transmitter to fill up a long pipe. The thing is that a dynamic > adjustment that is based on a filled-up receiver isn't going to work for > that. Of course it also 'takes two to tango', so not also increasing the > transmitter socket buffer would defeat a larger receive buffer even if > you could find a good algorithm for dynamically increasing the receive > side socket space. But you still know if you are receiving enough of an input stream to open up the window. Infact you know this part already, its simply a matter of extending it to opening up the socket buffer as well. As for the "two to tango", I'm trying to find the code related to this. It makes logical sense that you would need to have a socket buffer sufficient to store all the in-flight packets if you were called upon to do a retransmit, regardless of the window being advertised by the receiver, but the test numbers don't seem to match up with this (I get significantly reduced performance at 4k but equal performance with sendspace of 16k or 256k). At any rate, scaling the send buffer can only increase the potential for performance, not the congestion/buffering, as this is handled entirely by the TCP windows, which will shrink upon congestion. We're just talking about expanding the POTENTIAL for TCP windows to expand as needed by increasing socket buffers in a sensable fashion. -- Richard A Steenbergen http://www.e-gerbil.net/humble PGP Key ID: 0x138EA177 (67 29 D7 BC E8 18 3E DA B2 46 B3 D8 14 36 FE B6) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message