public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Florac <eflorac@intellique.com>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: kmo@daterainc.com, linux-bcache@vger.kernel.org
Subject: Re: Bcache stuck at writeback of a key, consuming 100% CPU, not possible to detach
Date: Mon, 31 Aug 2015 16:39:37 +0200	[thread overview]
Message-ID: <20150831163937.00ca3f7a@harpe.intellique.com> (raw)
In-Reply-To: <20150830085442.GA31722@suse.com>

Le Sun, 30 Aug 2015 10:54:42 +0200
Vojtech Pavlik <vojtech@suse.cz> écrivait:

> Then I noticed that during those situations where the system was
> slow, and processes stuck in D, bcache_writeback CPU usage was
> soaring all the way to saturating a core,

In my experience, bcache_writeback stays in Wait state, therefore
always saturate a core: any machine I'm running bcache on has a
constant load of 1.00 even when completely idle.

> showing this backtrace,
> spending time in refill_keybuf_fn():
 <snip>
> Changing the configuration to writeback_percent=40 helped. For some
> time at least.
> 
> When the issue returned, without any further changes to the system, I
> started investigating deeper. Since writeback_percent was large, also
> the amount of dirty data was large.

In my case, when dirty data reaches the upper limit (i.e. when the
amount of dirty data equals the writeback_percent * backing device
size ), and it occurs regularly, the system just freezes...

> Before poking deeper, I decided I
> want to clear the dirty data entierly. So I set the system to
> cache_mode=writethrough and watched the dirty data trickle to the
> backing device.
> 
> But then it stopped at 2.8G and didn't progress any further. The
> bcache_writeback thread was at 100% CPU usage again and system was
> near unusable. Reverting to writeback made the system responsive
> again.

The bcache_writeback stays at 100% _even_ when in writethrough mode,
alas. So this looks normal. However dirty_data definitely should drop
to zero...

 <snip> 
> I consider this a rather serious bug, even though it is most likely
> caused by the cache device being corrupted. Any hints?

Did you check what "smartctl -a" has to say about your backing device,
and maybe your spinning drives too? Just in case...

-- 
------------------------------------------------------------------------
Emmanuel Florac     |   Direction technique
                    |   Intellique
                    |	<eflorac@intellique.com>
                    |   +33 1 78 94 84 02
------------------------------------------------------------------------

  reply	other threads:[~2015-08-31 14:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30  8:54 Bcache stuck at writeback of a key, consuming 100% CPU, not possible to detach Vojtech Pavlik
2015-08-31 14:39 ` Emmanuel Florac [this message]
2015-08-31 14:49   ` Vojtech Pavlik
2015-08-31 15:04     ` Kent Overstreet
2015-08-31 16:45       ` Vojtech Pavlik
2015-08-31 16:53         ` Kent Overstreet
2015-08-31 17:09           ` Vojtech Pavlik
2015-09-01 13:34           ` Vojtech Pavlik
2015-08-31 16:54       ` Vojtech Pavlik
2015-08-31 15:09     ` Emmanuel Florac
2015-08-31 15:54       ` Vojtech Pavlik
2015-09-05 11:06 ` Jens-U. Mozdzen
2015-09-05 11:29   ` Vojtech Pavlik
2015-09-07 15:13     ` Jens-U. Mozdzen
2015-09-07 15:52       ` Vojtech Pavlik
2015-09-07 16:01         ` Vojtech Pavlik
     [not found]           ` <B7A73681-AF9A-438C-9323-B2CE3BEFCA98@profihost.ag>
2015-09-07 18:56             ` Vojtech Pavlik
2015-09-08  9:04               ` Jens-U. Mozdzen
2015-09-08  9:10                 ` Vojtech Pavlik

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=20150831163937.00ca3f7a@harpe.intellique.com \
    --to=eflorac@intellique.com \
    --cc=kmo@daterainc.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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