From owner-svn-src-all@FreeBSD.ORG Sun Nov 11 09:41:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 401E17C3; Sun, 11 Nov 2012 09:41:12 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 198658FC0C; Sun, 11 Nov 2012 09:41:11 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 3FE631A3C1E; Sun, 11 Nov 2012 01:41:05 -0800 (PST) Message-ID: <509F72B0.90201@mu.org> Date: Sun, 11 Nov 2012 01:41:04 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: svn commit: r242847 - in head/sys: i386/include kern References: <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <20121111061517.H1208@besplex.bde.org> <20121111073352.GA96046@FreeBSD.org> In-Reply-To: <20121111073352.GA96046@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 09:41:12 -0000 On 11/10/12 11:33 PM, Alexey Dokuchaev wrote: > On Sat, Nov 10, 2012 at 10:22:52PM -0800, Peter Wemm wrote: >> We've had kern.ipc.nmbclusters for years. It is simple to understand, >> easy to predict the outcome of a change, is runtime adjustable, is a >> *cap* and not a reservation (like it used to be) and does not require >> a reboot like maxusers tweaking would, and doesn't change maxproc as a >> side effect. >> >> Tune the caps sensibly by default and move on. maxusers must die. > Big +1. I would also like to get rid of maxusers altogether. > > ./danfe You aren't really understanding it. The contrived examples Peter are giving are *wrong*. > Q: "How do I get an extra 2MB of clusters?" > A1: "increase kern.ipc.nmbclusters by 1000" > A2: "well, 2MB is 1000 clusters, and since you have mode than 768M of > ram, you divide that 1000 clusters by 16 to get 62, then multiply that > by 8 to reverse the maxusers slope factor above 768M, so you need to > find the maxusers value you have and add 496 to it. That will > probably increase your clusters by 2MB. Maybe." I am 100% aware that nmbclusters can override maxusers values, in fact it does. The real conversation goes like this: user: "Why is my box seeing terrible network performance?" bsdguy: "Increase nmbclusters." user: "what is that?" bsdguy: "Oh those are the mbufs, just tell me your current value." user: "oh it's like 128000" bsdguy: "hmm try doubling that, go sysctl kern.ipc.nmbclusters=512000 on the command line." user: "ok" .... an hour passes ... user: "hmm now I can't fork any more copies of apache.." bsdguy: "oh, ok, you need to increase maxproc for that." user: "so sysctl kern.ipc.maxproc=10000?" bsdguy: "no... one second..." .... bsdguy: "ok, so that's sysctl kern.maxproc=10000" user: "ok... bbiaf" .... user: "so now i'm getting log messages about can't open sockets..." bsdguy: "oh you need to increase sockets bro... one second..." user: "sysctl kern.maxsockets?" bsdguy: "oh no.. it's actually back to kern.ipc.maxsockets" user: "alrighty then.." .... .... bsdguy: "so how is freebsd since I helped you tune it?" user: "well i kept hitting other resource limits, boss made me switch to Linux, it works out of the box and doesn't require an expert tuner to run a large scale server. Y'know as a last ditch effort I looked around for this 'maxusers' thing but it seems like some eggheads retired it and instead of putting my job at risk, I just went with Linux, no one gets fired for using Linux." bsdguy: "managers are lame!" user: "yeah! managers..." -Alfred