linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aleksei Zakharov <zakharov.a.g@yandex.ru>
To: linux-bcache@vger.kernel.org
Subject: A lot of flush requests to the backing device
Date: Fri, 05 Nov 2021 14:21:19 +0300	[thread overview]
Message-ID: <10612571636111279@vla5-f98fea902492.qloud-c.yandex.net> (raw)

Hi all,
 
I've used bcache a lot for the last three years, mostly in writeback mode with ceph, and I faced a strange behavior. When there's a heavy write load on the bcache device with a lot of fsync()/fdatasync() requests, the bcache device issues a lot of flush requests to the backing device. If the writeback rate is low, then there might be hundreds of flush requests per second issued to the backing device.
 
If the writeback rate growths, then latency of the flush requests increases. And latency of the bcache device increases as a result and the application experiences higher disk latency. So, this behavior of bcache slows the application in it's I/O requests when writeback rate becomes high.
 
This workload pattern with a lot of fsync()/fdatasync() requests is a common for a latency-sensitive applications. And it seems that this bcache behavior slows down this type of workloads.
 
As I understand, if a write request with REQ_PREFLUSH is issued to bcache device, then bcache issues new empty write request with REQ_PREFLUSH to the backing device. What is the purpose of this behavior? It looks like it might be eliminated for the better performance.

--
Regards,
Aleksei Zakharov
alexzzz.ru

             reply	other threads:[~2021-11-05 11:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 11:21 Aleksei Zakharov [this message]
2021-11-08  5:38 ` A lot of flush requests to the backing device Dongdong Tao
2021-11-08  6:35   ` Kai Krakow
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=10612571636111279@vla5-f98fea902492.qloud-c.yandex.net \
    --to=zakharov.a.g@yandex.ru \
    --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).