From: Gerhard Wiesinger <lists@wiesinger.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: BTRFS doesn't compress on the fly
Date: Sun, 11 Aug 2024 11:39:10 +0200 [thread overview]
Message-ID: <2eb00476-d956-4b02-85e1-2ceea77034e9@wiesinger.com> (raw)
In-Reply-To: <ef780348-5570-4f5d-8c92-bf7bc4868752@gmx.com>
On 22.12.2023 07:13, Qu Wenruo wrote:
>
>
> On 2023/12/22 16:28, Gerhard Wiesinger wrote:
>> On 03.12.2023 11:19, Qu Wenruo wrote:
>>>
>>>
>>>> BTW:
>>>>
>>>> if compression is forced, should be then just any "block" be
>>>> compressed?
>>>
>>> There is a long existing problem with compression with preallocation.
>>>
>>> One easy example is, if we go compression for the preallocated range,
>>> what we do with the gap (compressed size is always smaller than the
>>> real
>>> size).
>>>
>>> If we leave the gap, then the read performance can be even worse, as
>>> now
>>> we have to read several small extents with gaps between them, vs a
>>> large
>>> contig read.
>>>
>>> IIRC years ago when I was a btrfs newbie, that's the direction I tried
>>> to go, but never reached upstream.
>>>
>>> Thus you can see some of the reason why we do not go compression for
>>> preallocated range.
>>>
>>> But I still don't believe we should go as the current behavior.
>>> We should still try to go compression as long as we know the write
>>> still
>>> needs COW, thus we should fix it.
>>
>>
>> Any progress with the fix?
>
> Tried several solution, the best one would still lead to reserved space
> underflow.
>
> The proper fix would introduce some larger changes to the whole delalloc
> mechanism.
>
> Thus it's not something can be easily fixed yet.
>
> Thanks,
> Qu
Any update on the issue or plans to fix it?
Thanks.
Ciao,
Gerhard
prev parent reply other threads:[~2024-08-11 9:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 11:21 BTRFS doesn't compress on the fly Gerhard Wiesinger
2023-11-30 20:53 ` Qu Wenruo
2023-12-02 12:02 ` Gerhard Wiesinger
2023-12-02 20:07 ` Qu Wenruo
2023-12-02 21:56 ` Qu Wenruo
2023-12-03 8:24 ` Gerhard Wiesinger
2023-12-03 9:11 ` Qu Wenruo
2023-12-03 9:45 ` Gerhard Wiesinger
2023-12-03 10:19 ` Qu Wenruo
2023-12-22 5:58 ` Gerhard Wiesinger
2023-12-22 6:13 ` Qu Wenruo
2024-08-11 9:39 ` Gerhard Wiesinger [this message]
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=2eb00476-d956-4b02-85e1-2ceea77034e9@wiesinger.com \
--to=lists@wiesinger.com \
--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