From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Gerhard Wiesinger <lists@wiesinger.com>, linux-btrfs@vger.kernel.org
Subject: Re: BTRFS doesn't compress on the fly
Date: Fri, 22 Dec 2023 16:43:27 +1030 [thread overview]
Message-ID: <ef780348-5570-4f5d-8c92-bf7bc4868752@gmx.com> (raw)
In-Reply-To: <0c644c25-7ec4-43da-a70b-1632e87490b3@wiesinger.com>
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
>
> Thnx.
>
> Ciao,
>
> Gerhard
>
next prev parent reply other threads:[~2023-12-22 6:14 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 [this message]
2024-08-11 9:39 ` Gerhard Wiesinger
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=ef780348-5570-4f5d-8c92-bf7bc4868752@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@wiesinger.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