linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Krakow <kai@kaishome.de>
To: Dongdong Tao <dongdong.tao@canonical.com>
Cc: Aleksei Zakharov <zakharov.a.g@yandex.ru>, linux-bcache@vger.kernel.org
Subject: Re: A lot of flush requests to the backing device
Date: Mon, 8 Nov 2021 07:35:35 +0100	[thread overview]
Message-ID: <CAC2ZOYu36PAJO-b-vWYJftFT2PQ-JwiP9q79yqXDS_1z6V7M3g@mail.gmail.com> (raw)
In-Reply-To: <CAJS8hV+KdLA6c8c5OV=z_KmJN2TSWROR6k9Y6_qut4EavJ0=tA@mail.gmail.com>

Am Mo., 8. Nov. 2021 um 06:38 Uhr schrieb Dongdong Tao
<dongdong.tao@canonical.com>:
>
> My understanding is that the bcache doesn't need to wait for the flush
> requests to be completed from the backing device in order to finish
> the write request, since it used a new bio "flush" for the backing
> device.

That's probably true for requests going to the writeback cache. But
requests that bypass the cache must also pass the flush request to the
backing device - otherwise it would violate transactional guarantees.
bcache still guarantees the presence of the dirty data when it later
replays all dirty data to the backing device (and it can probably
reduce flushes here and only flush just before removing the writeback
log from its cache).

Personally, I've turned writeback caching off due to increasingly high
latencies as seen by applications [1]. Writes may be slower
throughput-wise but overall latency is lower which "feels" faster.

I wonder if maybe a lot of writes with flush requests may bypass the cache...

That said, initial releases of bcache felt a lot smoother here. But
I'd like to add that I only ever used it for desktop workflows, I
never used ceph.

Regards,
Kai

[1]: And some odd behavior where bcache would detach dirty caches on
caching device problems, which happens for me sometimes at reboot just
after bcache was detected (probably due to a SSD firmware hiccup, the
device temporarily goes missing and re-appears) - and then all dirty
data is lost and discarded. In consequence, on next reboot, cache mode
is set to "none" and the devices need to be re-attached. But until
then, dirty data is long gone.

  reply	other threads:[~2021-11-08  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 11:21 A lot of flush requests to the backing device Aleksei Zakharov
2021-11-08  5:38 ` Dongdong Tao
2021-11-08  6:35   ` Kai Krakow [this message]
2021-11-08  8:11     ` Coly Li
2021-11-08 11:29       ` Latency, performance, detach behavior (was: A lot of flush requests to the backing device) Kai Krakow
2021-11-10 14:35   ` A lot of flush requests to the backing device Aleksei Zakharov

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=CAC2ZOYu36PAJO-b-vWYJftFT2PQ-JwiP9q79yqXDS_1z6V7M3g@mail.gmail.com \
    --to=kai@kaishome.de \
    --cc=dongdong.tao@canonical.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=zakharov.a.g@yandex.ru \
    /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).