2024-08-11
ZFS properties sometimes change their default values over time
For an assortment of reasons, we don't want ZFS to do compression on most of the filesystems on our fileservers. Some of these reasons are practical technical ones and some of them have to do with our particular local non-technical ('political') decisions around disk space allocation. Traditionally we've done this by the simple mechanism of not specifically enabling compression, because the default was off. Recently I discovered, more or less by coincidence, that OpenZFS had changed the default for ZFS compression from off to on between the version in Ubuntu 22.04 ('v2.1.5' plus Ubuntu changes) and the version in Ubuntu 24.04 ('v2.2.2' plus Ubuntu changes).
(This change was made in early March of 2022 and first appeared in v2.2.0. The change itself is discussed in pull request #13078.)
Another property that changed its default value in OpenZFS v2.2.0
is 'relatime
'.
This was apparently a change to match general Linux behavior, based
on pull request #13614.
Since we already specifically turn atime off, we might want to also
disable relatime now that it defaults to on, or perhaps it won't
have too much of an impact (and in general, atime and relatime may
not work over NFS anyway).
These aren't big changes (and they're perfectly sensible ones), but to me they point what should really have already been obvious, which is that OpenZFS can change the default values of properties over time. When you move to the new version of ZFS, you'll probably inherit these new default values, unless you're explicitly setting the properties to something. If you care about various properties having specific values, it's probably worth explicitly setting those values even if they're the current default.
(To be explicit, I think that OpenZFS should make this sort of changes to defaults when they have good reasons, which I feel they definitely did here. Our issues with compression are unusual and specific to our environment, and dealing with it is our problem.)