From owner-freebsd-stable@FreeBSD.ORG Wed Jun 18 16:18:25 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F89CC0 for ; Wed, 18 Jun 2014 16:18:25 +0000 (UTC) Received: from nschwqsrv02p.mx.bigpond.com (nschwqsrv02p.mx.bigpond.com [61.9.189.234]) by mx1.freebsd.org (Postfix) with ESMTP id 1530124E0 for ; Wed, 18 Jun 2014 16:18:24 +0000 (UTC) Received: from nschwcmgw08p ([61.9.190.168]) by nschwmtas06p.mx.bigpond.com with ESMTP id <20140618155849.MRBV3884.nschwmtas06p.mx.bigpond.com@nschwcmgw08p> for ; Wed, 18 Jun 2014 15:58:49 +0000 Received: from hermes.heuristicsystems.com.au ([121.210.107.100]) by nschwcmgw08p with BigPond Outbound id Fryp1o00V29zwdD01rypgg; Wed, 18 Jun 2014 15:58:49 +0000 X-Authority-Analysis: v=2.0 cv=F6HVh9dN c=1 sm=1 a=SEJ2iDwVkb98DYvesvueMw==:17 a=JipEcVzqA9wA:10 a=ousgtvyemmcA:10 a=8nJEP1OIZ-IA:10 a=GHIR_BbyAAAA:8 a=g7hp7OhqZI_kE_LyrJoA:9 a=wPNLvfGTeEIA:10 a=SEJ2iDwVkb98DYvesvueMw==:117 Received: from [10.0.5.3] (ewsw01.hs [10.0.5.3]) (authenticated bits=0) by hermes.heuristicsystems.com.au (8.14.5/8.13.6) with ESMTP id s5IFumMm023612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 19 Jun 2014 01:56:49 +1000 (EST) (envelope-from dewayne.geraghty@heuristicsystems.com.au) Message-ID: <53A1B6C0.50701@heuristicsystems.com.au> Date: Thu, 19 Jun 2014 01:56:48 +1000 From: Dewayne Geraghty User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Mateusz Guzik , rmg1970swe@gmail.com Subject: Re: Unchangeable sysctl's in FreeBSD10.0 Stable References: <53A15911.5020507@heuristicsystems.com.au> <20140618113246.GA7157@dft-labs.eu> In-Reply-To: <20140618113246.GA7157@dft-labs.eu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable Mailing List X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 16:18:25 -0000 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.