ZFS install - tuning determined at install or at each reboot?

Started by dinguz, September 08, 2021, 09:18:08 PM

Previous topic - Next topic
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?
In theory there is no difference between theory and practice. In practice there is.

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

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.
In theory there is no difference between theory and practice. In practice there is.

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
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)