All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <bo.li.liu@oracle.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: throttle delayed refs better
Date: Fri, 24 Jan 2014 09:53:01 -0500	[thread overview]
Message-ID: <52E27E4D.6070107@fb.com> (raw)
In-Reply-To: <20140124073448.GC31638@localhost.localdomain>


On 01/24/2014 02:34 AM, Liu Bo wrote:
> On Thu, Jan 23, 2014 at 01:07:52PM -0500, Josef Bacik 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,
> Which version of btrfs is the patch made for?
>
> I checked the code and it doesn't seem to be btrfs-next, either...we don't
> have a __btrfs_run_delayed_refs().

It depends on the patch I sent before where I move delayed refs onto a 
delayed ref head rb tree.  Thanks,

Josef

  reply	other threads:[~2014-01-24 14:53 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 [this message]
2014-02-03 18:28 ` Johannes Hirte
2014-02-03 21:08   ` Josef Bacik
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=52E27E4D.6070107@fb.com \
    --to=jbacik@fb.com \
    --cc=bo.li.liu@oracle.com \
    --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.