| Summary: | The ZFS default compression method described in the handbook is not zstd. | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | ykla <yklaxds> |
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | allanjude, lwhsu |
| Priority: | --- | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
ykla
2023-08-09 17:59:06 UTC
I think there are two things here. If you're talking about the default compression setting of the zfs on root done by the bsdinstall, in
usr.sbin/bsdinstall/scripts/zfsboot
which is indeed set to lz4:
: ${ZFSBOOT_POOL_CREATE_OPTIONS:=-O compress=lz4 -O atime=off}
We can discuss if we want to change it to zstd.
On the other hand, the default compression algorithm of OpenZFS, is still lz4 when lz4_compress feature is enabled (and which is the default.)
This is in the OpenZFS doc:
https://openzfs.github.io/openzfs-docs/man/master/7/zfsprops.7.html#compression
and so as the imported https://man.freebsd.org/zfsprops/7
Finally, you may misinterpret that paragraph. What it describes is that OpenZFS 2.0 is the default since FreeBSD 13.0, and thus zstd is an available option, not the default compression algorithm is changed.
It does not state zstd is the default, just that support for it was introduced. ZSTD is more expensive, and should not be the default. All it says is ZSTD offers better compression than the default, which is LZ4. You still have to opt-in to it. |