Hello everyone,
I have a question regarding the compression property in ZFS and I would appreciate some clarification.
I recently created a new ZFS pool with the following command, without specifying any particular options:
When checking the compression settings on the mail dataset to compare it with the zroot dataset, I found the following:
From this, it appears that the mail dataset has the compression=on property, which, by default, should use lz4 (https://openzfs.github.io/openzfs-docs/Performance and Tuning/Workload Tuning.html#compression). However, I also noticed that the zroot dataset explicitly uses lz4 with the local source.
I have a couple of questions:
Thank you in advance for your insights and recommendations!
I have a question regarding the compression property in ZFS and I would appreciate some clarification.
I recently created a new ZFS pool with the following command, without specifying any particular options:
sh:
# zpool create mail da1 da2
When checking the compression settings on the mail dataset to compare it with the zroot dataset, I found the following:
Code:
# zfs get compression zroot mail
NAME PROPERTY VALUE SOURCE
mail compression on default
zroot compression lz4 local
From this, it appears that the mail dataset has the compression=on property, which, by default, should use lz4 (https://openzfs.github.io/openzfs-docs/Performance and Tuning/Workload Tuning.html#compression). However, I also noticed that the zroot dataset explicitly uses lz4 with the local source.
I have a couple of questions:
- Default compression method: Can someone confirm that the default compression=on property for a dataset, means ZFS automatically uses lz4 (at least in the most recent ZFS versions on FreeBSD)?
- Best practice for compression setting: Is it better to leave the compression property set to on (which i think defaults to lz4), particularly to avoid potential issues during future upgrades, or should I manually configure it to lz4 for clarity and consistency?
Code:
# zfs --version
zfs-2.2.6-FreeBSD_g33174af15
zfs-kmod-2.2.6-FreeBSD_g33174af15
Code:
# uname -r
14.2-RELEASE-p1
Thank you in advance for your insights and recommendations!