From owner-freebsd-fs@freebsd.org Wed May 12 16:06:06 2021 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC01F643FDF for ; Wed, 12 May 2021 16:06:06 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [66.165.241.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FgKQk3qZNz4nQ0; Wed, 12 May 2021 16:06:06 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from [192.168.1.223] (cpe-24-24-163-126.socal.res.rr.com [24.24.163.126]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 9c61617e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 12 May 2021 16:06:03 +0000 (UTC) Subject: Re: Changes in vfs.zfs.arc_max on 13 To: Andriy Gapon , freebsd-fs@freebsd.org References: <0961dfe0-922e-8a6f-0bf9-c0685e3ec3d1@nomadlogic.org> From: Pete Wright Message-ID: <95d2d77f-c995-69ce-c6d6-ea8e22e9515b@nomadlogic.org> Date: Wed, 12 May 2021 09:06:02 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 4FgKQk3qZNz4nQ0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2021 16:06:06 -0000 On 5/11/21 11:40 PM, Andriy Gapon wrote: > On 11/05/2021 20:09, Pete Wright via freebsd-fs wrote: >> The next issue I am seeing is that when setting this variable the >> example from the handbook states you can do something similar to this >> (section 20.6.2.3): >> >> vfs.zfs.arc_max="40M" >> >> This throws an error on my system: >> $ sudo sysctl vfs.zfs.arc_max=2048M >> sysctl: invalid unsigned long '2048M' >> $ sudo sysctl vfs.zfs.arc_max=2G >> sysctl: invalid unsigned long '2G' >> >> Using the human unfriendly form works though: >> $ sudo sysctl vfs.zfs.arc.max="2000000000" >> vfs.zfs.arc.max: 0 -> 2000000000 >> $ >> >> Is this a bug, or would it be best to also update the documentation >> accordingly to reflect this?  Personally I like the old behavior as >> it's easier on my eyes. > > Are you sure that that is a recipe for sysctl? > It looks like it was for loader.conf. > Ah interesting, the examples certainly refer to loader.conf knobs. I had mistakenly assumed that the sysctl values would take the same form.  Section 20.6.1 of the handbook isn't clear on this distinction: "This value can be adjusted at runtime with sysctl(8) and can be set in /boot/loader.conf or /etc/sysctl.conf." zfs-module-parameters(5) is a bit more clear on this it looks like. Is it common for loader variables to accept different formatted values for the same knob? -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA