From owner-freebsd-current@FreeBSD.ORG Mon Oct 8 10:49:46 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 061E2106566C; Mon, 8 Oct 2012 10:49:46 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id 46FCC8FC0A; Mon, 8 Oct 2012 10:49:42 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id 2312ED4801F; Mon, 8 Oct 2012 12:49:35 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id EB3A9AD3; Mon, 8 Oct 2012 12:49:34 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id C125210693; Mon, 8 Oct 2012 10:49:34 +0000 (UTC) Date: Mon, 8 Oct 2012 12:49:34 +0200 From: Jeremie Le Hen To: Andre Oppermann Message-ID: <20121008104934.GB25291@felucia.tataz.chchile.org> Mail-Followup-To: Andre Oppermann , Adrian Chadd , freebsd@chrysalisnet.org, freebsd-current@freebsd.org References: <03e101cda197$326dc240$974946c0$@org> <506C9CE4.6080400@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <506C9CE4.6080400@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd@chrysalisnet.org, Adrian Chadd , freebsd-current@freebsd.org Subject: Re: sysctl kern.ipc.somaxconn limit 65535 why? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 10:49:46 -0000 Hi, On Wed, Oct 03, 2012 at 10:15:32PM +0200, Andre Oppermann wrote: > On 03.10.2012 22:03, Adrian Chadd wrote: > > > > somaxconn is the connection queue depth. If it's sitting at a couple > > hundred thousand then something else is going crazily wrong. > > > > I understand your frustration, but there's a lot of instances where > > the application just isn't doing things "right" and the OS tries to > > hide it as much as psosible. Blowing out somaxconn to chew up a whole > > lot of resources seems a bit silly. I'd rather investigate why the > > userland application is not servicing the connect queue often enough. > > > > I've written network services that supported tens of thousands of new > > TCP connections a second on a LAN and I never once had to bump > > somaxconn past 32767. I'm not saying that it won't apply to your > > scenario, I'm just trying to explain that there's likely more going > > on. > > I guess the problem is rather kern.ipc.maxsockets which is only 25600. > > The name somaxconn is confusing as it specifies the listen queue limit > instead of the maximum number of connections as the it suggests. If we want to change that name to something more sensible and less error-prone like "somaxbacklog", does the project has a policy to change sysctl names? I'm thinking of something like renaming the sysctl to "somaxbacklog" and make "somaxconn" compatibility shim during RELENG_10 which still works but prints a warning in the dmesg. -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons.