Date: Sun, 11 Nov 2012 01:41:04 -0800 From: Alfred Perlstein <bright@mu.org> To: Alexey Dokuchaev <danfe@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm <peter@wemm.org> Subject: Re: svn commit: r242847 - in head/sys: i386/include kern Message-ID: <509F72B0.90201@mu.org> In-Reply-To: <20121111073352.GA96046@FreeBSD.org> References: <CAF6rxg=HPmQS1T-LFsZ=DuKEqH30iJFpkz%2BJGhLr4OBL8nohjg@mail.gmail.com> <509DC25E.5030306@mu.org> <509E3162.5020702@FreeBSD.org> <509E7E7C.9000104@mu.org> <CAF6rxgmV8dx-gsQceQKuMQEsJ%2BGkExcKYxEvQ3kY%2B5_nSjvA3w@mail.gmail.com> <509E830D.5080006@mu.org> <1352568275.17290.85.camel@revolution.hippie.lan> <CAGE5yCp4N7fML05-Tomm0TM-ROBSka5%2Bb9EKJTFR%2ByUpFuGj5Q@mail.gmail.com> <20121111061517.H1208@besplex.bde.org> <CAGE5yCpExfeJHeUuO0FEEFMgeNzftaFSWT=D-yKGdP%2B1xnjZ4A@mail.gmail.com> <20121111073352.GA96046@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509F72B0.90201>