Date: Tue, 5 Jul 2016 21:45:14 -0400 From: Allan Jude <allanjude@freebsd.org> To: Nathan Bosley <nathan.bosley@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: Setting sysctl vfs.zfs.arc_max failed: 22 Message-ID: <7255f240-8cf0-0a62-89be-2a0970b67063@freebsd.org> In-Reply-To: <CAB%2BRvm6OpDQMz4vE7d0D76wDuPjzh597UaDXjNfrHLP59st_ag@mail.gmail.com> References: <ccdd6a5b-4771-6207-adb3-ce9a7960485c@FreeBSD.org> <975e5ae2-2090-94cd-49c0-eee9866ff02b@freebsd.org> <CAB%2BRvm7c97ionaM02UgTLNt-aqQJLZ8%2B5ZoFL9gHDhmmx=cCcg@mail.gmail.com> <e1fd9ae9-71de-ec0f-53d2-1c5d2f9ccc87@multiplay.co.uk> <145180d1-43c9-d894-9221-b210d641955d@freebsd.org> <CAB%2BRvm6OpDQMz4vE7d0D76wDuPjzh597UaDXjNfrHLP59st_ag@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Lw91Xcd8CQ9wGP101BemApOdQd5VFp75Q Content-Type: multipart/mixed; boundary="IaIXvstQ2LaSSrkAQlPeIUS8x1K2EHDU8" From: Allan Jude <allanjude@freebsd.org> To: Nathan Bosley <nathan.bosley@gmail.com> Cc: freebsd-current@freebsd.org Message-ID: <7255f240-8cf0-0a62-89be-2a0970b67063@freebsd.org> Subject: Re: Setting sysctl vfs.zfs.arc_max failed: 22 References: <ccdd6a5b-4771-6207-adb3-ce9a7960485c@FreeBSD.org> <975e5ae2-2090-94cd-49c0-eee9866ff02b@freebsd.org> <CAB+Rvm7c97ionaM02UgTLNt-aqQJLZ8+5ZoFL9gHDhmmx=cCcg@mail.gmail.com> <e1fd9ae9-71de-ec0f-53d2-1c5d2f9ccc87@multiplay.co.uk> <145180d1-43c9-d894-9221-b210d641955d@freebsd.org> <CAB+Rvm6OpDQMz4vE7d0D76wDuPjzh597UaDXjNfrHLP59st_ag@mail.gmail.com> In-Reply-To: <CAB+Rvm6OpDQMz4vE7d0D76wDuPjzh597UaDXjNfrHLP59st_ag@mail.gmail.com> --IaIXvstQ2LaSSrkAQlPeIUS8x1K2EHDU8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-05 21:32, Nathan Bosley wrote: > I think in about 4 - 5 hours I can show what values I'm using in > loader.conf under, say, r302264 and r302265 for comparison. I'm not 100= % > sure that the problem arose for me in r302265; I merely suspect it. >=20 > On Tue, Jul 5, 2016 at 9:25 PM, Allan Jude <allanjude@freebsd.org > <mailto:allanjude@freebsd.org>> wrote: >=20 > On 2016-07-05 20:27, Steven Hartland wrote: > > Ahh right, let me check that. > > > > On 06/07/2016 00:51, Nathan Bosley wrote: > >> I actually have this same problem. > >> I'll send more details when I get home later. > >> > >> I think the problem started for me after r302265. > >> Before that, I can set vfs.zfs.arc_max and vfs.zfs.arc_min in > >> loader.conf. > >> After r302265, setting either vfs.zfs.arc_max or vfs.zfs.arc_min= in > >> loader.conf results in the EINVAL errors in 'dmesg': > >> > >> Setting sysctl vfs.zfs.arc_max failed: 22 > >> Setting sysctl vfs.zfs.arc_min failed: 22 > >> > >> But setting vfs.zfs.arc_meta_limit in loader.conf works fine. > >> > >> But I did notice that using 'sysct' or sysctl.conf for vfs.zfs.a= rc_max > >> and vfs.zfs.arc_min works. > >> I only have problems with setting them now in loader.conf. > >> > >> Like I said, I'll try to send output from my setup later. > >> > >> Thanks. > >> > >> On Tue, Jul 5, 2016 at 6:10 PM, Steven Hartland > >> <steven@multiplay.co.uk <mailto:steven@multiplay.co.uk> > <mailto:steven@multiplay.co.uk <mailto:steven@multiplay.co.uk>>> wr= ote: > >> > >> What is it currently? > >> > >> Just had a quick play here: > >> sysctl vfs.zfs.arc_max > >> vfs.zfs.arc_max: 32283127808 > >> sysctl vfs.zfs.arc_max=3D32283127807 > >> vfs.zfs.arc_max: 32283127808 -> 32283127807 > >> sysctl vfs.zfs.arc_max=3D32283127808 > >> vfs.zfs.arc_max: 32283127807 -> 32283127808 > >> > >> Error 22 =3D EINVAL so I suspect you're requesting a value > which one > >> of the following: > >> * < arc_abs_min > >> * > kmem_size > >> * < arc_c_min > >> * < zfs_arc_meta_limit > >> > >> Regards > >> Steve > >> > >> On 05/07/2016 22:56, Eric van Gyzen wrote: > >> > >> Steven and -current: > >> > >> I just updated to r302350 with a GENERIC kernel config. = > I see > >> this in > >> dmesg: > >> > >> VT(efifb): resolution 1024x768 > >> Setting sysctl vfs.zfs.arc_max failed: 22 > >> CPU: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz > >> (3491.98-MHz K8-class > >> CPU) > >> > >> The relevant parts of /boot/loader.conf are: > >> > >> zfs_load=3D"YES" > >> vfs.zfs.arc_max=3D"6442450944" > >> > >> Let me know what other information you need. > >> > >> Cheers, > >> > >> Eric > >> > >> > >> _______________________________________________ > >> freebsd-current@freebsd.org > <mailto:freebsd-current@freebsd.org> > <mailto:freebsd-current@freebsd.org > <mailto:freebsd-current@freebsd.org>> > >> mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-current > >> To unsubscribe, send any mail to > >> "freebsd-current-unsubscribe@freebsd.org > <mailto:freebsd-current-unsubscribe@freebsd.org> > >> <mailto:freebsd-current-unsubscribe@freebsd.org > <mailto:freebsd-current-unsubscribe@freebsd.org>>" > >> > >> > > > > _______________________________________________ > > freebsd-current@freebsd.org <mailto:freebsd-current@freebsd.org> > mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@fre= ebsd.org > <mailto:freebsd-current-unsubscribe@freebsd.org>" >=20 >=20 > I think the issue might be that the default value of arc_min is hig= her > than when the user is trying to set arc_max to. In that case we mig= ht > want sysctl to lower arc_min instead of giving an error? >=20 > It would definitely be a POLA violation to have to set arc_min lowe= r to > be able to have existing lines that set arc_max in loader.conf work= > correctly. >=20 > -- > Allan Jude >=20 >=20 The problem is related to Steven's commit, which makes it so you can adjust arc_max and arc_min at runtime. Part of this change put in a requirement that the new arc_max you are trying to set, must be less than the current arc_min. When you first boot, i think the default is arc_max =3D all ram save 1GB, and arc_min =3D 1/8 of that. So if you try to set your arc_max to 1/8th or less, it will fail with that error 22 (this should be fixed). You can work around it temporarily by setting a lower arc_min first. --=20 Allan Jude --IaIXvstQ2LaSSrkAQlPeIUS8x1K2EHDU8-- --Lw91Xcd8CQ9wGP101BemApOdQd5VFp75Q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJXfGKqAAoJEBmVNT4SmAt+EMcP/A5zkAPp5IBH2iaMgBJ2+PCA DLaG180wKIhZMrTixfhDxi4ZkQO7sok82sO9nDrYpmEIL6TAyjdL182JB8QHatkF 1RKsYpCFhj53fczs5lDQDWTB59Tojri6aA2rnSGYzbEfyLrvraeKovWFvR3DfHIq pJMjEffzwj2fq7qxixExQh8pVDK3L44+xM7KT/U9ztYXtWzGCz5cFYBk4di57vGk FSTYANnKt7DKTzF030rz4pSiW1AUGL0/zGPEd3feiV045FJO706mB8GZHQXL57XB 1amcoS2fcl8uQDUnic9ueJxr3UqRCYGmd5cJejFjhBQSM6xer1p7SRvhvlgzy4Rt 4TITBH76YuGIxKZ2kWnJEvqMjnbW5Jy74b2da2WXGL6AP8uyddVJDnQ0MCaT6UNa nR/X3bwK0gdRBAWLIHmobK96+UTyt1n0XPTHACXtju9Tnq8c/4uCspXUzB3ZGuHJ 3ZiKb7RKtG6nQ33QgVtcb5C3MEwQyEJb8C6khgE2ngnbEdki722s9krYDlJEEA8a UUHjapihZ4+WAdFRjttXsGJPXE288NNE+eHdR3N2CzvBxzzjdTsPN42n3lDg0FqI ya8kyvHUYAeo97ftCVRc42fm66RWigElqmM7bNKHXwlytGtQJ6bZPVjaeiFftaVq ehF6nKqrsRYHiBwlFwxX =F44x -----END PGP SIGNATURE----- --Lw91Xcd8CQ9wGP101BemApOdQd5VFp75Q--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7255f240-8cf0-0a62-89be-2a0970b67063>