Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jul 2006 09:27:29 -0500
From:      Kevin Kinsey <kdk@daleco.biz>
To:        Pietro Cerutti <pietro.cerutti@gmail.com>
Cc:        freebsd questions <freebsd-questions@freebsd.org>
Subject:   Re: maxusers -> kernel.maxfiles
Message-ID:  <44ABCC51.4060706@daleco.biz>
In-Reply-To: <e572718c0607050506m35e8b074l31db8a06894e472b@mail.gmail.com>
References:  <e572718c0607050506m35e8b074l31db8a06894e472b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Pietro Cerutti wrote:
> Hi list,
> today my home server stopped responding because of a "kern.maxfiles
> limit exceeded" problem.
> 
> I noticed that the maxfiles MIB value was set to 1928, which I find
> ridiculous even for a small home server ( i386-6.1-RELEASE, mySQL,
> Apache, LDAP, Postfix, SSH, SFTP ).
> 
> On my laptop, which is running 6.1-STABLE, this defaults to 25000.
> 
> Reading [1] I discovered that this value is computed basing on the
> value of maxusers, which is supposed to be in the kernel configuration
> file.
> 
> Since I didn't set the maxusers option in my kernel conf, I was
> expecting to find a default value somewhere, and here's where I
> miserably fail...
> 
> So, could you please tell me:
> 1) where's the default for it?
> 2) how is the kern.maxfiles value exactly computed?


Warning, Pietro: IANAE.

2) Looks like (6-STABLE here) it's approximately
(kern.maxusers^5) ---  1) if you wish to set a different
value for kern.maxusers or kern.maxfiles, you do it in /boot/loader.conf.

You can see quite a bit about this in /boot/defaults/loader.conf.

HTH,

Kevin Kinsey

P.S.  The doc in the link you sent does seem a little confusing.
Might be worth discussion on the docs list?

-- 
One good thing about music,
Well, it helps you feel no pain.
So hit me with music;
Hit me with music now.
		-- Bob Marley, Trenchtown Rock



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44ABCC51.4060706>