enable compression by default on new pools #8213
Replies: 20 comments
-
also, from http://open-zfs.org/wiki/Performance_tuning#General_recommendations "Set compression=lz4 on your pools' root datasets so that all datasets inherit it unless you have a reason not to enable it" is there a strong reason to not enable it by default? |
Beta Was this translation helpful? Give feedback.
-
Defaults should be sane and consistent from a user standpoint. |
Beta Was this translation helpful? Give feedback.
-
Perhaps we can handle this a different way. Create a user editable configuration file that would be used for defaults. ZFS on Linux seems to have one already, (at least on Gentoo Linux);
Then if someone is deploying servers with ZFS, they include the appropriately modified default file. For @mailinglists35 issue, perhaps something like this;
which would be applied on any pool creation. Then inherited down the dataset / zvol tree. However, I do agree leaving the current default of compression off is best for now. And this idea can be discussed elsewhere, (like the mailing list). |
Beta Was this translation helpful? Give feedback.
-
that idea would be awesome and would solve another issue, the default mountpoint on root filesystem tree instead of naturally going into /srv on linux |
Beta Was this translation helpful? Give feedback.
-
@Lady-Galadriel I can't easily search for "defaults" as there are too many results, do you happen to know if is there already filed some issue to provide defaults in a /etc/default/zfs file (in the upstream package, not added by distro)? this and the other issue I mentioned should then be solved. |
Beta Was this translation helpful? Give feedback.
-
@mailinglists35, no I don't know if this defaults file concept has been filed as a feature request / issue. It should probably be followed up in the mailing lists. And / or reported as a separate issue. As for your default mountpoint for a pool, I thought it was based on the pool name. Thus, a pool named "srv" would mount by default on "/srv". I routinely disable my pool's automounting, as it's never correct. So;
|
Beta Was this translation helpful? Give feedback.
-
Other candidates for updated defaults could be Thus a generic way to specify -o and -O options in a default file that are applied on Ceterum censeo regarding the argument about consistency with other filesystems and users initial expectations we should do something about |
Beta Was this translation helpful? Give feedback.
-
Objection, that implies |
Beta Was this translation helpful? Give feedback.
-
Can we repurpose this issue as a feature request for a global zfs/zpool preferences file? Like the one ubuntu already provides, but with added abilites (1) to specify zpool create -o -O flags and (2) with ability to tell the root prefix mountpoint (instead of default /) |
Beta Was this translation helpful? Give feedback.
-
there is some precedent for defaults already, where the "default config file" is /etc/modprobe.d/zfs.conf see https://github.com/zfsonlinux/zfs/wiki/ZFS-on-Linux-Module-Parameters#spa_config_path |
Beta Was this translation helpful? Give feedback.
-
Thinking about this more, it maybe should be 2 / 3 configuration files. Or a way to specify the difference between options for zpool, zfs and Zvols. Meaning the current requests could be met with;
And in some cases, I can see Zvols wanting this as the default;
Basically anything related to the pool or top level dataset would be in the "zpool" defaults file, applied at pool creation. And the "/etc/default/zfs" file would apply to all other datasets on "zfs create". And perhaps allowing a separate "zvol" defaults would be useful. I'd also suggest allowing some variables to be allowed in the default configuration files;
The last 3 could be useful for Zpool comments, like "Pool made for HOSTNAME on DATE". (Zpool comments on exported pools are available using |
Beta Was this translation helpful? Give feedback.
-
It would be great if we can set any default value via some config file (if we're already speaking about this functionality for compression). What do you think about it? |
Beta Was this translation helpful? Give feedback.
-
ZFS is slowly becoming "the systemd" of filesystems and it is because of feature requests like this (and #6836, #6041, #4134) Is it too hard to type "-O compression=lz4" once in a blue moon? No, it is not. Does your job require typing "zpool create" all day long? You can script it with something that fits your needs. Once again we see a great product of engineering being pushed around by the some members of its community. I can't wait to see ZFS/systemd integration via D-Bus /s. |
Beta Was this translation helpful? Give feedback.
-
yes |
Beta Was this translation helpful? Give feedback.
-
IMNSHO, pool creation should be automated, like everything else you do more than once. When developing such automation, understanding where and why someone else changes the defaults is toil. |
Beta Was this translation helpful? Give feedback.
-
For me compression is a feature, and as such should be leaved off by default even if the recommended setup is to have it on. As said before, compressing data by default is not so common among filesystems and certainly unexpected. Sane defaults often are not the same than recommended setup for a use-case, as generic as it could be. I'd also arg that ZoL would then diverge from the other zfs implementations, which -as far as I know- retain mostly the same settings. As for the default setting file, only root can create/mount filesystems, so why not put a cmd alias somewhere in |
Beta Was this translation helpful? Give feedback.
-
@kpande Sure, can you also bring it up on the [email protected] mailing list so that folks from all platforms have a chance to weigh in on this before the meeting? |
Beta Was this translation helpful? Give feedback.
-
Let's have this issue be specific to the having compression on out-of-the-box, with no additional work. It sounds like some folks would also like to be able to have a settings file that (essentially) provides some default arguments whenever you run "zpool create". If that's still desired, please open a separate Issue (feature request) for that. |
Beta Was this translation helpful? Give feedback.
-
seems like all of the negative aspects of having |
Beta Was this translation helpful? Give feedback.
-
This was discussed at today's OpenZFS Leadership Meeting. Here are the relevant notes: The idea is to give a better out of the box experience. The downsides are: potential CPU cost (and write performance due to compressing) and new users misunderstanding how the space is used in certain cases. https://www.youtube.com/watch?v=dIVGGJaZ7zk&feature=youtu.be |
Beta Was this translation helpful? Give feedback.
-
System information
Describe the problem you're observing
zpool
creates new pool with zfscompression
set tooff
.can this be made default to
on
?Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
Beta Was this translation helpful? Give feedback.
All reactions