Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 17:33:32 -0800
From:      "Kevin M. Lahey" <kml@nas.nasa.gov>
To:        Jim Shankland <jas@flyingfox.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: mbuf clusters and socket send buffers (was Re: 3.1-STABLE dies on 40+ connects) 
Message-ID:  <199903260133.RAA17817@gecko.nas.nasa.gov>
In-Reply-To: Your message of "Thu, 25 Mar 1999 18:29:14 PST." <199903260229.SAA22400@biggusdiskus.flyingfox.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903260133.RAA17817>