From: Robert Pang <robertpang@google.com>
To: Coly Li <colyli@suse.de>
Cc: Dongsheng Yang <dongsheng.yang@easystack.cn>,
Bcache Linux <linux-bcache@vger.kernel.org>
Subject: Re: [PATCH v2] bcache: allow allocator to invalidate bucket in gc
Date: Wed, 10 Apr 2024 23:44:11 -0700 [thread overview]
Message-ID: <CAJhEC05hzf2zVyJabVExFNF0esiLovc+WLHOY_YhV22OUdGFZw@mail.gmail.com> (raw)
In-Reply-To: <C787D2E8-6D03-4F4D-9633-2237AA0B2BE7@suse.de>
HI Coly
Thank you for submitting it in the next merge window. This patch is
very critical because the long IO stall measured in tens of seconds
every hour is a serious issue making bcache unusable when it happens.
So we look forward to this patch.
Speaking of this GC issue, we gathered the bcache btree GC stats after
our fio benchmark on a 375GB SSD cache device with 256kB bucket size:
$ grep . /sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_gc_*
/sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_gc_average_duration_ms:45293
/sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_gc_average_frequency_sec:286
/sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_gc_last_sec:212
/sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_gc_max_duration_ms:61986
$ more /sys/fs/bcache/31c945a7-d96c-499b-945c-d76a1ab0beda/internal/btree_nodes
5876
However, fio directly on the SSD device itself shows pretty good performance:
Read IOPS 14,100 (110MiB/s)
Write IOPS 42,200 (330MiB/s)
Latency: 106.64 microseconds
Can you shed some light on why CG takes so long (avg 45 seconds) given
the SSD speed? And is there any way or setting to reduce the CG time
or lower the GC frequency?
One interesting thing we observed is when the SSD is encrypted via
dm-crypt, the GC time is shortened ~80% to be under 10 seconds. Is it
possible that GC writes the blocks one-by-one synchronously, and
dm-crypt's internal queuing and buffering mitigates the GC IO latency?
Thanks
Robert
On Fri, Mar 29, 2024 at 6:00 AM Coly Li <colyli@suse.de> wrote:
>
>
>
> > 2024年3月29日 02:05,Robert Pang <robertpang@google.com> 写道:
> >
> > Hi bcache developers
> >
> > Greetings. Any update on this patch? How are things going with the
> > testing and submission upstream?
>
> Hi Peng,
>
> As I said, it will be in next merge window, not this one. If there is help necessary, I will ask :-)
>
> Thanks.
>
> Coly Li
>
>
> >
> >
> > On Sun, Mar 17, 2024 at 11:16 PM Robert Pang <robertpang@google.com> wrote:
> >>
> >> Hi Coly
> >>
> >> Thank you for confirming. It looks like the 6.9 merge window just
> >> opened last week so we hope it can catch it. Please update in this
> >> thread when it gets submitted.
> >>
> >> https://lore.kernel.org/lkml/CAHk-=wiehc0DfPtL6fC2=bFuyzkTnuiuYSQrr6JTQxQao6pq1Q@mail.gmail.com/T/
> >>
> >> BTW, speaking of testing, mind if you point us to the bcache test
> >> suite? We would like to have a look and maybe give it a try also.
> >>
> >> Thanks
> >> Robert
> >>
> >> On Sun, Mar 17, 2024 at 7:00 AM Coly Li <colyli@suse.de> wrote:
> >>>
> >>>
> >>>
> >>>> 2024年3月17日 13:41,Robert Pang <robertpang@google.com> 写道:
> >>>>
> >>>> Hi Coly
> >>>>
> >>>
> >>> Hi Robert,
> >>>
> >>>> Thank you for looking into this issue.
> >>>>
> >>>> We tested this patch in 5 machines with local SSD size ranging from
> >>>> 375 GB to 9 TB, and ran tests for 10 to 12 hours each. We observed no
> >>>> stall nor other issues. Performance was comparable before and after
> >>>> the patch. Hope this info will be helpful.
> >>>
> >>> Thanks for the information.
> >>>
> >>> Also I was told this patch has been deployed and shipped for 1+ year in easystack products, works well.
> >>>
> >>> The above information makes me feel confident for this patch. I will submit it in next merge window if some ultra testing loop passes.
> >>>
> >>> Coly Li
> >>>
> >
>
> [snipped]
>
next prev parent reply other threads:[~2024-04-11 6:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 11:21 [PATCH] bcache: allow allocator to invalidate bucket in gc Dongsheng Yang
2020-09-10 11:28 ` [PATCH v2] " Dongsheng Yang
2020-09-18 9:53 ` Coly Li
2024-03-15 22:45 ` Robert Pang
2024-03-16 2:48 ` Coly Li
2024-03-17 5:41 ` Robert Pang
2024-03-17 13:59 ` Coly Li
2024-03-18 6:16 ` Robert Pang
2024-03-28 18:05 ` Robert Pang
2024-03-29 13:00 ` Coly Li
2024-04-11 6:44 ` Robert Pang [this message]
2024-05-03 18:23 ` Coly Li
2024-05-03 18:28 ` Coly Li
2024-05-04 2:04 ` Robert Pang
2024-05-04 3:08 ` Coly Li
2024-05-08 2:34 ` Dongsheng Yang
2024-05-12 5:43 ` Robert Pang
2024-05-12 9:41 ` Kernel error with 6.8.9 Pierre Juhen (IMAP)
2024-05-13 7:57 ` Coly Li
2024-05-17 0:34 ` Eric Wheeler
2024-05-17 15:57 ` Coly Li
2024-05-13 7:43 ` [PATCH v2] bcache: allow allocator to invalidate bucket in gc Coly Li
2024-05-14 5:15 ` Robert Pang
2024-05-14 23:39 ` Coly Li
2024-05-17 0:30 ` Eric Wheeler
2024-05-17 16:06 ` Coly Li
2024-05-17 21:47 ` Eric Wheeler
2024-05-24 7:14 ` Robert Pang
2024-05-27 18:14 ` Coly Li
2024-05-28 5:50 ` Robert Pang
2024-05-29 16:24 ` Coly Li
2024-06-03 7:04 ` Robert Pang
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=CAJhEC05hzf2zVyJabVExFNF0esiLovc+WLHOY_YhV22OUdGFZw@mail.gmail.com \
--to=robertpang@google.com \
--cc=colyli@suse.de \
--cc=dongsheng.yang@easystack.cn \
--cc=linux-bcache@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;
as well as URLs for NNTP newsgroup(s).