From: A L <mail@lechevalier.se>
To: Eric Wong <e@80x24.org>, Hamish Moffatt <hamish-btrfs@moffatt.email>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: new database files not compressed
Date: Mon, 31 Aug 2020 05:15:08 +0200 (GMT+02:00) [thread overview]
Message-ID: <a09876c.a736cf94.1744282e338@lechevalier.se> (raw)
In-Reply-To: <20200831022019.GA27823@dcvr>
---- From: Eric Wong <e@80x24.org> -- Sent: 2020-08-31 - 04:20 ----
> 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.
Could also be that it is using Direct I/O. DirectIO prevents csum and compression too.
>
> 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.
I'd not agree with this in general. Nodatacow can help in the case you are really bottle necked by disk I/O. I think the general recommendation to use nocow is dangerous as it reduces the integrity of the filesystem for those files.
>
> 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.
This mostly depends on your application workload and not size of the files. I found that with MariaDB/Innodb it is possible to adjust its settings to achieve good performance on Btrfs.
I use both VM images and SQL databases on Btrfs with full cow without issues.
next prev parent reply other threads:[~2020-08-31 3:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-30 9:35 new database files not compressed Hamish Moffatt
2020-08-31 2:20 ` Eric Wong
2020-08-31 2:44 ` Hamish Moffatt
2020-08-31 3:15 ` A L [this message]
2020-08-31 3:47 ` Zygo Blaxell
2020-08-31 8:53 ` Hamish Moffatt
2020-08-31 9:25 ` Nikolay Borisov
2020-08-31 10:40 ` Hamish Moffatt
2020-08-31 10:47 ` Nikolay Borisov
2020-08-31 12:56 ` Hamish Moffatt
2020-08-31 11:15 ` Roman Mamedov
2020-08-31 12:54 ` Hamish Moffatt
2020-08-31 12:57 ` Nikolay Borisov
2020-08-31 23:50 ` Hamish Moffatt
2020-09-01 5:15 ` Nikolay Borisov
2020-09-01 8:55 ` Hamish Moffatt
2020-09-02 0:32 ` Hamish Moffatt
2020-09-02 5:57 ` Nikolay Borisov
2020-09-02 6:05 ` Hamish Moffatt
2020-09-02 6:10 ` Nikolay Borisov
2020-09-02 9:57 ` A L
2020-09-02 10:09 ` Nikolay Borisov
2020-09-03 15:04 ` A L
2020-09-02 16:16 ` Zygo Blaxell
2020-09-03 12:53 ` Hamish Moffatt
2020-09-03 19:44 ` Zygo Blaxell
2020-09-04 8:07 ` Hamish Moffatt
2020-09-05 4:07 ` Zygo Blaxell
2020-09-03 15:03 ` A L
2020-09-03 21:52 ` Zygo Blaxell
2020-09-01 1:43 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a09876c.a736cf94.1744282e338@lechevalier.se \
--to=mail@lechevalier.se \
--cc=e@80x24.org \
--cc=hamish-btrfs@moffatt.email \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox