All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Johannes Hirte <johannes.hirte@datenkhaos.de>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: throttle delayed refs better
Date: Mon, 3 Feb 2014 16:08:08 -0500	[thread overview]
Message-ID: <52F00538.3010505@fb.com> (raw)
In-Reply-To: <20140203192811.72866921@datenkhaos.de>


On 02/03/2014 01:28 PM, Johannes Hirte wrote:
> On Thu, 23 Jan 2014 13:07:52 -0500
> Josef Bacik <jbacik@fb.com> wrote:
>
>> On one of our gluster clusters we noticed some pretty big lag
>> spikes.  This turned out to be because our transaction commit was
>> taking like 3 minutes to complete.  This is because we have like 30
>> gigs of metadata, so our global reserve would end up being the max
>> which is like 512 mb.  So our throttling code would allow a
>> ridiculous amount of delayed refs to build up and then they'd all get
>> run at transaction commit time, and for a cold mounted file system
>> that could take up to 3 minutes to run.  So fix the throttling to be
>> based on both the size of the global reserve and how long it takes us
>> to run delayed refs. This patch tracks the time it takes to run
>> delayed refs and then only allows 1 seconds worth of outstanding
>> delayed refs at a time.  This way it will auto-tune itself from cold
>> cache up to when everything is in memory and it no longer has to go
>> to disk.  This makes our transaction commits take much less time to
>> run. Thanks,
>>
>> Signed-off-by: Josef Bacik <jbacik@fb.com>
> This one breaks my system. Shortly after boot the btrfs-freespace
> thread goes up to 100% CPU usage and the system is nearly unresponsive.
> I've seen it first with the full pull request for 3.14-rc1 and was able
> to track it down to this patch.
Could you turn on the softlockup timer and see if you can get a 
backtrace of where it is stuck?  In the meantime I will go through and 
see if I can pinpoint where it may be happening.  Thanks,

Josef

  reply	other threads:[~2014-02-03 21:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 18:07 [PATCH] Btrfs: throttle delayed refs better Josef Bacik
2014-01-24  7:34 ` Liu Bo
2014-01-24 14:53   ` Josef Bacik
2014-02-03 18:28 ` Johannes Hirte
2014-02-03 21:08   ` Josef Bacik [this message]
2014-02-03 22:53     ` Johannes Hirte
2014-02-04 14:12       ` Josef Bacik
2014-02-05  8:14         ` Johannes Hirte
2014-02-05 15:49           ` Josef Bacik
2014-02-05 17:34             ` Johannes Hirte
2014-02-05 19:00               ` Josef Bacik
2014-02-05 19:30                 ` Johannes Hirte
2014-02-05 19:36                   ` Josef Bacik
2014-02-05 21:42                     ` Johannes Hirte
2014-02-05 21:46                       ` Josef Bacik
2014-02-05 22:57                         ` Johannes Hirte
2014-02-06 15:14                           ` Josef Bacik
2014-02-06 21:19                           ` Josef Bacik
2014-02-14 19:25                             ` Johannes Hirte
2014-02-14 19:29                               ` Josef Bacik
2014-02-15 17:42                                 ` Johannes Hirte
2014-02-05 22:22                       ` Josef Bacik
2014-02-27 15:38 ` 钱凯
2014-02-27 15:56   ` Josef Bacik
2015-10-14 15:46     ` Alex Lyakas

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=52F00538.3010505@fb.com \
    --to=jbacik@fb.com \
    --cc=johannes.hirte@datenkhaos.de \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.