From owner-freebsd-stable@FreeBSD.ORG Thu Jun 19 12:07:01 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 D643456E for ; Thu, 19 Jun 2014 12:07:01 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3132868 for ; Thu, 19 Jun 2014 12:07:01 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id ty20so1413658lab.11 for ; Thu, 19 Jun 2014 05:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=J6lAC4XmlvkkxZ6PL2iXQpDB8LhshRBZIRnzQvKrwdg=; b=kJzw23ZIL0b57sReLZKMPO3RuvLI9kOjrqRCTNm2sk6YZsA9ksc99mNtLFNep+WnD+ shlCdYrC66Xcqq64A9ep11CY/6m7RoAigbil8vUMbBJP8U2DDyQZGcqHn4sDb/i2y9cd zUBzPDJoG5pjc/3Ku2UIp2b0PU4w3RkP4uMNqnAtDYmS8GAXPeV58u7A5f2lgIyQ2Snh 0LLl88Pz4g6gCkfXQvHpjoxuusqsHWlLJrRBfPIDVHwe4Bg7rRwWSwzLPlDNMFmDgkNI S0wOmyypNbWgKJDfIp0SKyIjKtfTY0OpFhlQHhVNnuFoUH2um59+PcoHgpLDGVMA9+sx UeEg== X-Received: by 10.152.42.234 with SMTP id r10mr1404523lal.66.1403179619341; Thu, 19 Jun 2014 05:06:59 -0700 (PDT) Received: from lazlar.no-ip.biz (109.58.147.47.bredband.tre.se. [109.58.147.47]) by mx.google.com with ESMTPSA id ar1sm4022928lbc.3.2014.06.19.05.06.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 05:06:58 -0700 (PDT) Message-ID: <53A2D260.90606@gmail.com> Date: Thu, 19 Jun 2014 14:06:56 +0200 From: Rolf Nielsen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Dewayne Geraghty , Mateusz Guzik Subject: Re: Unchangeable sysctl's in FreeBSD10.0 Stable References: <53A15911.5020507@heuristicsystems.com.au> <20140618113246.GA7157@dft-labs.eu> <53A1B6C0.50701@heuristicsystems.com.au> In-Reply-To: <53A1B6C0.50701@heuristicsystems.com.au> X-Enigmail-Version: 1.6 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: Thu, 19 Jun 2014 12:07:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-06-18 17:56, Dewayne Geraghty wrote: > 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. > > > > You're probably right. My reply was just a quick reaction. I don't fiddle with those specific sysctl's, but I do set some other ones in loader.conf. However, those are, according to the information, intentionally read only while in multiuser, thus required to be set early. Rolf -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTotJgAAoJEB1OKfQ0M8TgvbEQANunEpLn6Exs80by2c+xgXB1 czzwKZLw3p+y9a1K105cJVUf0/P/gQDk8oOqECBWJw6P+EGsza1BWrpnDCyyxgLA Nu+TIdNwghC6f2uRTb0qCPMUlMiXlXrYfvun66jhP5n/00gkzn374TEy8H6EFdnA 3cfRvn8Jtk/hvioqAsJWU9y1KOhTE9rEpPdfuPCAwsixvfG1MNub4EGSQk3uSIcQ 4vnayNP9LWuYCwMZxK2UgLS15DOvc7qMYyHUCFcmXRyljXHg4oaZ2tsdFhN+46r4 FcJIQnGHObau6giN4n80ay2i0JqcriiBwVAhR2ENwXRxLmezbPa9bu+7TDn+pEch J4UWomYytx0CN8beanqeuXo1xf6wXgUwvx6O+UhDZpRKoOg0QOw3efaTiHh5QvHV ZWY8P1cyxMT7g2ApukGm7/+krJ2E6ONtz0ImWEZtLqpomXFKqk3YJQkkBuoTa8Ub 76jY0fly5BeK5qlEIs4MeGLoTkQk8O67203T5ayON8DERVj0SQVnHqho6nyv+B23 tAsV8f4eqXCtAhhqLesOWK1G2tOO6xrLkQ9j3MQj1JGVm69ZQWRe8THpid/Ky0vB Rvo+3B00a+VRTwNAZaZ7ecBzW83OuntmuuImuI14kPyTkqSLWy8YO4QHvYAqY4q3 +EfPEFZQ+0zvKqaitRyB =RRu9 -----END PGP SIGNATURE-----