Re: new database files not compressed

Eric Wong
2020-08-31T02:20:21Z

Hamish Moffatt <hamish-btrfs@moffatt.email> wrote:
> I am trying to store Firebird database files compressed on btrfs. Although I
> have mounted the file system with -o compress-force, new files created by
> Firebird are not being compressed according to compsize. If I copy them, or
> use btrfs filesystem defrag, they compress well.
>
> Other files seem to be compressed automatically OK. Why are the Firebird
> files different?

Maybe Firebird creates DB with the No_COW attribute?
"lsattr -l /path/to/file" to check.

I don't know much about Firebird; but No_COW is pretty much
required for big database, VM images, etc which are subject to
random writes. Unfortunately, neither compression nor
checksumming are available with No_COW set.

Big SQLite and Xapian DBs gave me trouble even on an SSD before
I recreated them with No_COW. Small DBs can probably get away
with autodefrag.