From owner-freebsd-net Thu Mar 25 17:33:53 1999 Delivered-To: freebsd-net@freebsd.org Received: from gecko.nas.nasa.gov (gecko.nas.nasa.gov [129.99.50.17]) by hub.freebsd.org (Postfix) with ESMTP id 1C310154F3 for ; Thu, 25 Mar 1999 17:33:52 -0800 (PST) (envelope-from kml@gecko.nas.nasa.gov) Received: from gecko.nas.nasa.gov (kml@localhost) by gecko.nas.nasa.gov (8.9.1a/NAS8.8.7n) with ESMTP id RAA17817; Thu, 25 Mar 1999 17:33:32 -0800 (PST) Message-Id: <199903260133.RAA17817@gecko.nas.nasa.gov> To: Jim Shankland Cc: freebsd-net@freebsd.org Subject: Re: mbuf clusters and socket send buffers (was Re: 3.1-STABLE dies on 40+ connects) In-reply-to: Your message of "Thu, 25 Mar 1999 18:29:14 PST." <199903260229.SAA22400@biggusdiskus.flyingfox.com> Date: Thu, 25 Mar 1999 17:33:32 -0800 From: "Kevin M. Lahey" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199903260229.SAA22400@biggusdiskus.flyingfox.com>, Jim Shankland writes: >I'm not sure whether you misunderstood my point, or were just making >a related observation. Just in case, let me clarify with a concrete >example: Sorry, I was being stupid; I was thinking about receive buffers rather than send buffers. >A program sets its socket send buffer size to 64KB. At some instant, >the kernel has 8KB of data in its send buffer, which is exactly >how much the receiving end has indicated (via the window advertisement) >it is willing to accept. The sending process issues another 8 KB write() >call. Should the kernel accept the 8 KB of data, allocating more mbufs >and returning from the write(), or should it stall the write() call >until the receiving end grows the window? Hmmm, I guess I'd object that the receiver could increase the advertised window size at any time, so it'd be nice to have at least some amount of data sitting in the buffer, ready to go. Granted, the window size is limited by the window scale factor, so there would be some sort of reasonable upper limit on the size of the buffer. The folks at PSC have done some interesting work on autotuning buffer sizes to solve exactly this problem. Check it out: http://www.psc.edu/networking/auto.html Sorry for my confusion on the earlier point, Kevin kml@nas.nasa.gov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message