Re: new database files not compressed

Zygo Blaxell
2020-09-03T19:45:00Z

On Thu, Sep 03, 2020 at 10:53:23PM +1000, Hamish Moffatt wrote:
> On 3/9/20 2:16 am, Zygo Blaxell wrote:
> >
> > fallocate doesn't make a lot of sense on btrfs, except in the special
> > case of nodatacow files without snapshots. fallocate breaks compression,
> > and snapshots/reflinks break fallocate.
>
>
> I recompiled Firebird with fallocate disabled (it has a fallback for
> non-linux OSs), and now I have compressed database files.
>
> It may be that de-duplication suits my application better anyway. Will
> compsize tell me how much space is being saved by de-duplication, or is
> there another way to find out?

Compsize reports "Uncompressed" and "Referenced" columns. "Uncompressed"
is the physical size of the uncompressed data (i.e. how many bytes
you would need to hold all of the extents on disk without compression
but with dedupe). "Referenced" is the logical size of the data, after
counting each reference (i.e. how many bytes you would need to hold all
of the data without compression or dedupe).

The "none" and "zstd" rows will tell you how much dedupe you're getting
on uncompressed and compressed extents separately.

>
> Hamish
>