Re: new database files not compressed

Hamish Moffatt
2020-09-01T08:55:16Z

On 1/9/20 3:15 pm, Nikolay Borisov wrote:
>
> On 1.09.20 г. 2:50 ч., Hamish Moffatt wrote:
>> On 31/8/20 10:57 pm, Nikolay Borisov wrote:
>>> This means the data being passed to btrfs is not compressible. I.e after
>>> coompression the data is not smaller than the original, input data.
>> It is though - if I copy it, or run defrag, it compresses very well:
>>
>>
> As Zygo explained - with 16k writes you'd need at least 25% compression
> in order for btrfs to deem it useful. If firebird's 16k writes are not
> 25% compressible then it won't compress. It also depends on whether it
> issues fsync after every write to ensure consistency meaning it won't
> allow more data to accumulate.

I understand, but I think these conditions are being met.

1. strace shows Firebird is writing sequential 16k blocks. I don't see
fsync either. Example trace: https://hastebin.com/ecayosilog.pl

2. Copying the file with 'dd if=foo.fdb of=copy bs=16k', even with
'oflag=sync' or 'flag=direct', results in a compressed copy.

There are no special attributes on the file according to lsattr. What
else could Firebird be doing that would cause the file not to compress?

Hamish