Re: A lot of flush requests to the backing device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/8/21 2:35 PM, Kai Krakow wrote:
Am Mo., 8. Nov. 2021 um 06:38 Uhr schrieb Dongdong Tao
<dongdong.tao@xxxxxxxxxxxxx>:
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.

Just an off topic question, when you experienced the above situation, what is the kernel version for this? We recently have a bkey oversize regression triggered in Linux v5.12 or v5.13, which behaved quite similar to the above description.
The issue was fixed in Linux v5.13 by the following commits,

commit 1616a4c2ab1a ("bcache: remove bcache device self-defined readahead")
commit 41fe8d088e96 ("bcache: avoid oversized read request in cache missing code path")

Coly Li



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux