Re: worse than expected compression ratios with -o compress

Jim Faulkner
2010-01-18T22:11:53Z

On Mon, 18 Jan 2010, Chris Mason wrote:

>> Currently the only compression algorithm we support is gzip, so try gzipp'ing
>> your database to get a better comparison. The plan is to eventually support
>> other compression algorithms, but currently we do not. Thanks,
>
> The compression code backs off compression pretty quickly if parts of
> the file do not compress well. This is another way of saying it favors
> CPU time over the best possible compression. If gzip ends up better
> than what you're getting from btrfs, I can give you a patch to force
> compression all the time.

Yes, gzip compresses much better than btrfs. I'd greatly appreciate a
patch to force compression all the time.

It would be nice if such an ability were merged in the mainline. Perhaps
there could be a mount option or tunable parameter to force compression?