OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: dinguz on September 08, 2021, 09:18:08 PM

Title: ZFS install - tuning determined at install or at each reboot?
Post by: dinguz on September 08, 2021, 09:18:08 PM
When 21.7 came out, I reinstalled my system using the ZFS filesystem. The system back then had only 4 GB of RAM, and I vaguely remember the installer stating that certain settings related to ZFS had been applied, this being a 'low memory' system.
I have since upgraded the RAM to 8 GB. Do I need to change any of these settings manually to adjust to the new situation, or are these all dynamically determined at each reboot of the machine?
Title: Re: ZFS install - tuning determined at install or at each reboot?
Post by: franco on September 09, 2021, 08:52:01 AM
It would help to know the message exactly as it was written to trace this in the source code. Not too familiar with that area of bsdinstall yet.


Cheers,
Franco
Title: Re: ZFS install - tuning determined at install or at each reboot?
Post by: dinguz on September 19, 2021, 07:56:17 PM
Replying to my own question here, to perhaps benefit others. I have studied this somewhat and believe this be related to ZFS prefetch. This is automatically disabled at boot time for systems with up to 4 GB of RAM, and enabled for systems with more RAM. It's also tunable with this sysctl: vfs.zfs.prefetch_disable
As far as I could tell the installer doesn't set this sysctl anywhere but leaves it to the boot time heuristics to set this  appropriately.
Title: Re: ZFS install - tuning determined at install or at each reboot?
Post by: Patrick M. Hausen on September 19, 2021, 08:20:49 PM
Quote from: dinguz on September 19, 2021, 07:56:17 PM
As far as I could tell the installer doesn't set this sysctl anywhere but leaves it to the boot time heuristics to set this  appropriately.
Correct. If this is indeed the only tunable of concern, it's best to not touch it at all. The system will do the right thing at boot.

HTH,
Patrick