From owner-freebsd-net Wed Sep 18 8:51:16 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B1CB37B401 for ; Wed, 18 Sep 2002 08:51:15 -0700 (PDT) Received: from smtpout.mac.com (smtpout.mac.com [204.179.120.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id A90F743E4A for ; Wed, 18 Sep 2002 08:50:52 -0700 (PDT) (envelope-from justin@mac.com) Received: from smtp-relay02.mac.com (smtp-relay02-en1 [10.13.10.225]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id g8IFnpxD011616 for ; Wed, 18 Sep 2002 08:49:51 -0700 (PDT) Received: from asmtp01.mac.com (asmtp01-qfe3 [10.13.10.65]) by smtp-relay02.mac.com (8.12.1/8.12.1/1.0) with ESMTP id g8IFnsZH029433 for ; Wed, 18 Sep 2002 08:49:54 -0700 (PDT) Received: from grinch ([12.234.224.67]) by asmtp01.mac.com (Netscape Messaging Server 4.15) with ESMTP id H2N5B500.825 for ; Wed, 18 Sep 2002 08:49:53 -0700 Date: Wed, 18 Sep 2002 08:49:52 -0700 Subject: Re: socket buffers Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: "Justin C. Walker" To: freebsd-net@FreeBSD.ORG Content-Transfer-Encoding: 7bit In-Reply-To: <3D8895BE.F2F12CED@he.iki.fi> Message-Id: <453BBE24-CB1E-11D6-891F-00306544D642@mac.com> X-Mailer: Apple Mail (2.482) Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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