ZFS: compression on by default? Since when? WTH?!

Hi gang!

So yeah, at the time of writing I am hyped. Playing with the big boys now because I am restoring my personal online presence, powered by FreeBSD; obviously.

But I don't get this part:

VPS.jpg


As far as I know this was never the default. Oh, it gets worse: it seems the handbook isn't even aware of this feat at all, see this link. Why would you want to enable compression... when it's on by default?

Now, the reason why I am complaining should be obvious enough: this compression is eating away resources even though there's no real need for it. Considering the fact that FreeBSD is also often used on plenty of small systems.. I am kinda baffled to learn about this feat, which I would describe as idiocy.

Don't the "powers that be" realize the waste of cycles that get involved with, say, recompressing /usr/ports/distfiles?
 
Try "zfs get compressionratio root". It is surprisingly good for me: 1.74 (but note: I don't have source code for base or packages on my machine, and /home is on a separate zfs file system).

It may be of more value than you think; but then, obviously YMMV.
 
similar question with lots of replies:

i'd be pissed if logs were not being compressed, so the spectrum here is wide.

Incidentally, my compression changed from on to lz4 whenever i created jails, which makes a ton of sense to me.
 
You’ll be very hard pressed to find a situation where lz4 compression with ZFS isn’t a good choice. The only time in well over a decade of mixed use (from low powered routers to dedicated NFS servers) where I think I’ve found benefit from disabling compression was on a filesystem that served as the simultaneous read/write destination for multiple streams of captured (broadcast) HDTV video.

Between the raw speed of lz4 (and effective increased payload BW from compressed data flowing to the disk), the early-abort behavior (saving CPU cycles automatically on incompressible data), and the boost in ARC capacity (by using the compressed blocks) that comes with compression, it’s no shock that the developers have chosen lz4 as the default state.
 
You’ll be very hard pressed to find a situation where lz4 compression with ZFS isn’t a good choice.
My Hyper-V VM cycles tell me otherwise.

It's not even my main point of concern: we don't get any bloody choice in the matter. The manual pages mention nothing about this nonsense, the installer just "goes right ahead". The ends don't justify the means.

(edit) => (copy/paste):

And the main reason I am reacting as annoyed as I do now... is because this takes me back: where software (often games) put too much strain on hardware requirements, more or less forcing people to upgrade their hardware to get things to work. Windows, as much as I love & respect it today, was a solid example of this crap methodology.

They also gave us no choice in the matter back then. MS clued up, and lo and behold... we're right back to square one: same mindset, different environment: "we know better than the user".
 
The manual pages mention nothing about this nonsense
zfsprops(7):
Code:
     compression=on|off|gzip|gzip-N|lz4|lzjb|zle|zstd|zstd-N|zstd-fast|zstd-fast-N
       Controls the compression algorithm used for this dataset.

       When set to on (the default), indicates that the current default
       compression algorithm should be used.

And overall, being a long time zfs user, I tend to strongly disagree, it wasn't really noticeable back then on much slower hardware than we have today.
the installer just "goes right ahead"
At least with 15 snapshots, installer shows you the option it will create the root dataset with.
 
You’ll be very hard pressed to find a situation where lz4 compression with ZFS isn’t a good choice.
I got faster boot with uncompressed initramfs on Linux vs LZ4 and all other compression :p

I'd rather hardware get bottlenecked before wondering if a logical core with HT/related scheduling is holding up compression actions. I think if I was seriously using ZFS I'd appreciate sane defaults, and compression sounds ok as a default (more average scenarios might benefit vs rare scenarios worth manually disabling on for efficiency gains).

My NVMe didn't feel any slower with Auto ZFS 14.2-R vs UFS and I didn't do anything special about compression. I don't really benefit from ZFS and usually use UFS though (afaik no compression; I want perf :p).
 
But ZFS is not at all made for small systems.
It works excellently on a 4-core 1.8 GHz machine with 4GB of memory (for most of its life, it ran on 3 of those GB). The oft-repeated story that ZFS is only for larger servers is mostly false, but contains a small grain of truth.
 
Again I learned something.
I just found out on my little homeserver compression is off. Okay.

My concern is: If I update my server to a new FreeBSD version this could/will also mean ZFS is being upgraded, too. So the pools will "complain" that an update is needed.
Besides I read on several posts here from you guys:"do not upgrade the pools", and I don't know yet how to tell the pools to stop complaining, my question is:
Will compression then be activated (by default)? By my understanding it's set in the pools' according zfs properties (maybe I deactivated it myself manually when I created the pools but don't remember anymore) which shall not be overwritten by an update (only new options by new ZFS versions may be added, right)?
Please tell me if I'm right or wrong, or if I miss something.
Thanks.
 
If I recall correctly, compression can be changed from pool default, per-dataset, isn't it?
But note that it should be only when the dataset is created and before any actual data is written.
If I'm not wrong, for example, enable compression on pool, and disable for example on /usr/ports/distfiles, /usr/ports/packages and any other directories to store compressed data (movie, jpeg,...) by creating independent dataset for them would be the best choice, IMHO.
 
for my different set of workloads, lz4 compression resulted in better results in every benchmark. Nowadays, I use zstd-6 or zstd-9 if I want my compressible data compressed. However, it should be noted in the docs that its default value is "on".
 
Back
Top