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




_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to