Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Sep 2002 08:49:52 -0700
From:      "Justin C. Walker" <justin@mac.com>
To:        freebsd-net@FreeBSD.ORG
Subject:   Re: socket buffers
Message-ID:  <453BBE24-CB1E-11D6-891F-00306544D642@mac.com>
In-Reply-To: <3D8895BE.F2F12CED@he.iki.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wednesday, September 18, 2002, at 08:03 AM, Petri Helenius wrote:

>
> I played around adjusting udp socket buffers for a while and noticed
> that if the input buffer is set to a value, packets start getting 
> dropped
> when npkt*MTU > SO_RCVBUF so if a socket receives 100 byte packets over
> an ethernet interface of 1500 byte MTU and receive buffer of 100k the 
> packets
> start dropping at less than 10k received data in a buffer.

This is, I think, normal behavior.  Check Wright/Stevens (TCP/IP 
Illustrated, V2), Ch. 2, where this is discussed (as I recall).  A 
socket buffer counts not only the valid data bytes enqueued, but also 
the size of the mbufs used.  The reasoning is clear: in order to avoid 
having all the mbufs in the system end up on a single queue, because 
very small packets are being received, counting mbuf space limits the 
number of mbufs that can be sucked up by one direction for one socket.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        | It's not whether you win or 
lose...
                                        |  It's whether *I* win or lose.
*--------------------------------------*-------------------------------*


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?453BBE24-CB1E-11D6-891F-00306544D642>