linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A lot of flush requests to the backing device
@ 2021-11-05 11:21 Aleksei Zakharov
  2021-11-08  5:38 ` Dongdong Tao
  0 siblings, 1 reply; 6+ messages in thread
From: Aleksei Zakharov @ 2021-11-05 11:21 UTC (permalink / raw)
  To: linux-bcache

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-10 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).