From owner-freebsd-net Mon Feb 12 10:52: 5 2001 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id D3DC537B491 for ; Mon, 12 Feb 2001 10:52:01 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f1CIpws03695; Mon, 12 Feb 2001 10:51:58 -0800 (PST) Date: Mon, 12 Feb 2001 10:51:58 -0800 From: Alfred Perlstein To: Jonathan Lemon Cc: net@freebsd.org Subject: Re: somaxconn and foot removal Message-ID: <20010212105158.B3274@fw.wintelcom.net> References: <20010211015516.J3274@fw.wintelcom.net> <20010212084657.U650@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010212084657.U650@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Feb 12, 2001 at 08:46:57AM -0600 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Jonathan Lemon [010212 06:46] wrote: > On Sun, Feb 11, 2001 at 01:55:16AM -0800, Alfred Perlstein wrote: > > The sysctl for somaxconn is an int, however the queue limits in the > > socket structures are 'short' this can cause some bad behavior if > > one sets somaxconn to more than 32k. > > > > A) So, do we bump the sockets to use 'int' for so->so_qlimit? > > B) Do we fix solisten() to compensate? > > C) Or de we fix the sysctl (patch below)? > > I'd patch sysctl. I can't imagine a listen queue > u_short actually > being all that useful; at some point it is better to just start > shedding load instead of queuing up numerous connections. It's for accept filters, I didn't expect to actually get that many connections however: 1) I shouldn't shoot myself in the foot by dinking this to a 'reasonable' number 2) aren't 16 bit ops more expensive on things like the Alpha? I think I have a generic way to implement a SYSCTL_LIMIT type thing, but it'll be a couple of days before I can present it. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message