> If a file has portions which are not easily compressible does that imply all
> future writes are also incompressible. IMO no, so I think what will be prudent
> is remove FORCE_COMPRESS altogether and make the code act as if it's
> always on.
>
> Any opinions?
That is a good idea. If I turn on compression I would expect
everything
to be compressed, except in cases where there is no size benefit.
I expect that the vast majority of files consist of blocks of similar
compressibility. Thus, finding a block that fails to compress strongly
suggests other blocks are either incompressible as well or compress
only
minimally. Refusing to waste time, electricity and fragmentation in
such
case is a good default, I think.
Please see this thread for an example where btrfs compression fails to
detect that text files compress very well:
https://marc.info/?t=144905015000003&r=1&w=4
To put it short - with rsync server receiving text logs from remote
servers, sometimes at slow speeds (due to how logfiles are appended):
- compress + zlib - some 20% compression ratio
- compress-force + zlib - some 80% compression ratio
Tomasz Chmielewski
https://lxadm.com