Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2014 01:56:48 +1000
From:      Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au>
To:        Mateusz Guzik <mjguzik@gmail.com>, rmg1970swe@gmail.com
Cc:        FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: Unchangeable sysctl's in FreeBSD10.0 Stable
Message-ID:  <53A1B6C0.50701@heuristicsystems.com.au>
In-Reply-To: <20140618113246.GA7157@dft-labs.eu>
References:  <53A15911.5020507@heuristicsystems.com.au> <20140618113246.GA7157@dft-labs.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18/06/2014 9:32 PM, Mateusz Guzik wrote:
> On Wed, Jun 18, 2014 at 07:17:05PM +1000, Dewayne Geraghty wrote:
>> While migrating from 9.2 Stable (9.3Beta3) to 10.0Stable (r267307M) I
>> noticed that some of the sysctl's that I adjust for tuning purposes
>> aren't writeable, instead sysctl returns an "Invalid argument".  The two
>> sysctl's of interest are:
>> net.flowtable.maxflows and kern.ipc.maxsockets
>>
>> Would someone advise the new way that these can be adjusted to suite the
>> purpose of the servers?   There was no mention in src/UPDATING.
>>
> EINVAL most likely comes from sysctl handler for given variable if it is unhappy
> with new value.
>
> net.flowtable.maxflows's will complain if you are trying to shrink it.
>
> kern.ipc.maxsockets's will complain if the following does not hold:
>                 if (newmaxsockets > maxsockets &&
>                     newmaxsockets <= maxfiles) {
>
>
> maxfiles can be read from kern.maxfiles
>
Thanks for providing feedback and advice.

Mateusz,
You've given me a clue and yes, I probably need to read the code first;
I had maxsockets=maxfiles+8.
The default for this 10.0 Stable amd64 machine, with 8GB  and
kern.maxusers="512"
# sysctl -ae | egrep "maxsockets|maxfiles="
kern.maxfiles=254868
kern.ipc.maxsockets=254870

Rolf, good suggestion.  Though its probably better to check, in my case
sysctl -Ta|egrep "maxsockets|maxflows"  # Checks for variables set
within loader.conf
sysctl -Wa | egrep "maxsockets|maxflows"  # Checks for variables set via
sysctl.conf (or sysctl).

These particular variables are writeable via sysctl. And frankly, I'm
pleased that sysctl did perform a sanity check and rejected my numbers,
something that I'll need to investigate further.  :)

Kind regards, Dewayne.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A1B6C0.50701>