From: Dave Chinner <david@fromorbit.com>
To: Lucas Stach <dev@lynxeye.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs: use rhashtable to track buffer cache
Date: Wed, 19 Oct 2016 12:15:12 +1100 [thread overview]
Message-ID: <20161019011512.GH23194@dastard> (raw)
In-Reply-To: <1476821653-2595-2-git-send-email-dev@lynxeye.de>
On Tue, Oct 18, 2016 at 10:14:12PM +0200, Lucas Stach wrote:
> On filesystems with a lot of metadata and in metadata intensive workloads
> xfs_buf_find() is showing up at the top of the CPU cycles trace. Most of
> the CPU time is spent on CPU cache misses while traversing the rbtree.
>
> As the buffer cache does not need any kind of ordering, but fast lookups
> a hashtable is the natural data structure to use. The rhashtable
> infrastructure provides a self-scaling hashtable implementation and
> allows lookups to proceed while the table is going through a resize
> operation.
>
> This reduces the CPU-time spent for the lookups to 1/3 even for small
> filesystems with a relatively small number of cached buffers, with
> possibly much larger gains on higher loaded filesystems.
>
> The minimum size of 4096 buckets was chosen as it was the size of the
> xfs buffer cache hash before it was converted to an rbtree.
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
This fails to compile on CONFIG_XFS_DEBUG=y kernels due to various
ASSERT statements not being updated appropriately. When making XFS
changes to core infrastructure like this, it is highly recommended
that you use CONFIG_XFS_DEBUG=y so that it catches mistakes and
assumptions that your changes violate at runtime....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-10-19 1:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 20:14 [PATCH 0/2] XFS buffer cache scalability improvements Lucas Stach
2016-10-18 20:14 ` [PATCH 1/2] xfs: use rhashtable to track buffer cache Lucas Stach
2016-10-18 22:18 ` Dave Chinner
2016-10-22 18:01 ` Lucas Stach
2016-10-24 2:15 ` Dave Chinner
2016-10-24 11:47 ` Lucas Stach
2016-10-19 1:15 ` Dave Chinner [this message]
2016-10-18 20:14 ` [PATCH 2/2] xfs: switch buffer cache entries to RCU freeing Lucas Stach
2016-10-18 22:43 ` Dave Chinner
2016-10-22 18:52 ` Lucas Stach
2016-10-24 2:37 ` Dave Chinner
2016-10-18 21:21 ` [PATCH 0/2] XFS buffer cache scalability improvements Dave Chinner
2016-10-22 17:51 ` Lucas Stach
2016-11-10 23:02 ` Dave Chinner
2016-12-02 21:54 ` Lucas Stach
2016-12-04 21:36 ` Dave Chinner
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=20161019011512.GH23194@dastard \
--to=david@fromorbit.com \
--cc=dev@lynxeye.de \
--cc=linux-xfs@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 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).