Changes in vfs.zfs.arc_max on 13

Pete Wright pete at
Wed May 12 16:06:06 UTC 2021

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
>> 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 Wright
pete at

More information about the freebsd-fs mailing list