Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/zfs/zsysctl.conf isn't loaded correctly at startup (Catalina, MacBook Pro 2018) #781

Open
feiyax opened this issue Jan 2, 2021 · 0 comments

Comments

@feiyax
Copy link

feiyax commented Jan 2, 2021

With ARC limits specified in /etc/zfs/zsysctl.conf, it appears that they are not loaded at start up correctly. Inspected with sysctl kstat | grep arc_max, the values are 0 after start up.

My system is a MacBook Pro 15-inch 2018 model, running the Catalina 10.15.7 (the latest). ZFS version is 1.9.4-0 (also the latest release.)

My /etc/zfs/zsysctl.conf has the following definition. (I read the Memory utilization wiki page)

kstat.zfs.darwin.tunable.zfs_arc_max=1073741824
kstat.zfs.darwin.tunable.zfs_arc_meta_limit=0x30000000

The log file is empty on my system: /private/var/log/org.openzfsonosx.zconfigd.log

The error log file has the following

$ cat /private/var/log/org.openzfsonosx.zconfigd.err 
Looking for service matching net_lundman_zfs_zvol
Starting the run loop
Found match
Running /usr/local/bin/zsysctl -f /etc/zfs/zsysctl.conf
top level name kstat in kstat.zfs.darwin.tunable.zfs_arc_max is invalid
Looking for service matching net_lundman_zfs_zvol
Starting the run loop
Found match
Running /usr/local/bin/zsysctl -f /etc/zfs/zsysctl.conf
top level name kstat in kstat.zfs.darwin.tunable.zfs_arc_max is invalid
Looking for service matching net_lundman_zfs_zvol
Starting the run loop
Found match
Running /usr/local/bin/zsysctl -f /etc/zfs/zsysctl.conf
top level name kstat in kstat.zfs.darwin.tunable.zfs_arc_max is invalid
top level name kstat in kstat.zfs.darwin.tunable.zfs_arc_meta_limit is invalid

I manually replayed the call /usr/local/bin/zsysctl -f /etc/zfs/zsysctl.conf since the above error shows it. It went through ok. Console logs below.

$ sudo /usr/local/bin/zsysctl -f /etc/zfs/zsysctl.conf
Password:
kstat.zfs.darwin.tunable.zfs_arc_max: 0 -> 1073741824
kstat.zfs.darwin.tunable.zfs_arc_meta_limit: 0 -> 805306368

Now it confuses me why isn't that file loaded correctly at start up. I'd appreciate any help on how to troubleshoot this issue. Thanks!

(I was suspecting a race condition somewhere such that it got called too early, but i don't know how to investigate that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant