Page 1 of 1

ARC Max Documentation Incorrect?

PostPosted: Sat Nov 25, 2023 10:07 am
by tvillini
I'd been really strugling getting the arc.max to set. I'd put
Code: Select all
kstat.zfs.darwin.tunable.zfs_arc_max=
into my zsysctl.conf file, and when I'd reboot, it would still be set to 0. I was able to change it manually using:
Code: Select all
sudo sysctl -w kstat.zfs.darwin.tunable.zfs_arc.max=
and that would work, but on reboot it would be back to default. On a whim, I changed zsysctl.conf entry from "arc_max" to "arc.max" and everything is happy. So I assume what it really should be is "arc.max"?

It shows arc_max:
https://openzfsonosx.org/wiki/Memory_utilization
https://openzfsonosx.org/wiki/Performance

Re: ARC Max Documentation Incorrect?

PostPosted: Mon Nov 27, 2023 5:31 am
by jawbroken
I believe it changed at some point, not sure which version, and the documentation is out of date.

Re: ARC Max Documentation Incorrect?

PostPosted: Fri Dec 15, 2023 11:11 am
by RJVB
jawbroken wrote:I believe it changed at some point, not sure which version, and the documentation is out of date.


That would probably be

Code: Select all
commit ff00bedaae9e630b049b7ceea6b5ca07c6874812
Author: Jorgen Lundman <lundman@lundman.net>
Date:   Thu Feb 3 19:36:32 2022 +0900

    macOS: Handle ZFS_MODULE_PARAMS as sysctl, take 2
   
    Modelled on FreeBSD approach, made to work on macOS.
   
    Attempt to stay close to legacy macOS tunable names
    but some are now slightly different.
   
    Retire the macOS kstat versions, replace with ZFS_MODULE_IMPL.
   
    Signed-off-by: Jorgen Lundman <lundman@lundman.net>


To get the new name of the kstat.zfs.darwin.tunable.zfs_arc_meta_limit parameter I did:

Code: Select all
> sysctl -a | fgrep -i arc | fgrep -i meta | fgrep -i limit