From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Roland <devzero@web.de>, Qu Wenruo <quwenruo.btrfs@gmx.com>,
linux-btrfs@vger.kernel.org
Subject: Re: apply different compress/compress-force settings on different subvolumes ?
Date: Wed, 21 Feb 2024 12:45:00 -0500 [thread overview]
Message-ID: <469f04cd-0cde-4355-9299-9a9006aac2e2@gmail.com> (raw)
In-Reply-To: <2790f277-fc10-43fc-b7d3-9a3cef1eced2@web.de>
On 2/21/24 08:15, Roland wrote:
> Am 21.02.24 um 10:33 schrieb Qu Wenruo:
>
>> 在 2024/2/21 19:19, Roland 写道:
>>> and why is compress-force silently ignored? (see below)
>> Compress-force has no coresponding per-inode prop option though.
>>
>> But I don't think compress-force would cause much difference against
>> regular compress.
>
> apparently, force-compress can make a big difference (and compress only
> can lead to no compression at all):
>
> https://bugzilla.proxmox.com/show_bug.cgi?id=5250#c6
I can attest that this is indeed the case, though it’s very dependent on
the exact usage. For the case of large files with highly varied data
(think filesystem images, VM disk images, large databases, etc) that
don’t include inherent compression, it’s very normal for compression to
actually be a huge help, but the early parts of the file to have very
high entropy and thus not compress well, resulting in regular `compress`
not actually helping at all (because BTRFS quickly decides it’s not
worth it for that file and chooses to not compress it at all).
As an example, the VM disk images I’m storing on my home server take up
roughly 40% less space with `compress-force=zstd:1` compared to just
`compress=zstd:1`.
In comparison, I see no effective difference when doing it on the root
filesystem of said home server, so like I said above, it’s rather
dependent on exact usage.
There is of course some extra overhead to attempting compression n every
write, but at least for me, on the lower compression levels when dealing
with ‘slow’ storage, it’s not enough to cause problems.
next prev parent reply other threads:[~2024-02-21 17:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 8:49 apply different compress/compress-force settings on different subvolumes ? Roland
2024-02-21 9:33 ` Qu Wenruo
2024-02-21 13:15 ` Roland
2024-02-21 17:45 ` Austin S. Hemmelgarn [this message]
2024-02-22 3:25 ` Qu Wenruo
2024-02-23 1:06 ` Chris Murphy
2024-02-22 8:33 ` Roland
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=469f04cd-0cde-4355-9299-9a9006aac2e2@gmail.com \
--to=ahferroin7@gmail.com \
--cc=devzero@web.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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