From: Dave Chinner <david@fromorbit.com>
To: Lin Feng <linf@chinanetcenter.com>
Cc: xfs@oss.sgi.com
Subject: Re: [BUG REPORT] missing memory counter introduced by xfs
Date: Sat, 10 Sep 2016 09:13:20 +1000 [thread overview]
Message-ID: <20160909231320.GG30056@dastard> (raw)
In-Reply-To: <57D25772.3070304@chinanetcenter.com>
On Fri, Sep 09, 2016 at 02:32:18PM +0800, Lin Feng wrote:
> Hi Dave,
>
> A final not-clear concept about XFS, look beblow please.
>
> On 09/09/2016 04:44 AM, Dave Chinner wrote:
> >On Thu, Sep 08, 2016 at 06:07:45PM +0800, Lin Feng wrote:
....
> >>>So, you have *5.4 million* active metadata buffers. Each buffer will
> >>>hold 1 or 2 4k pages on your kernel, so simple math says 4M * 4k +
> >>>1.4M * 8k = 26G. There's no missing counter here....
> >>
> >>Does xattr contribute to such metadata buffers or there is something else?
> >
> >xattrs are metadata, so if they don't fit in line in the inode
> >(typical for ceph because it uses xattrs larger than 256 bytes) then
> >they are held in external blocks which are cached in the buffer
> >cache.
> >
>
> So the 'buffer cache' here you mean is the pages handled by xfs_buf
> struct,
Yes.
> used to hold the xattrs if the inode inline data space
> overflows,
And all other cached metadata that is accessed via struct xfs_buf.
> not the 'beffer/cache' seen via free command, they won't
> reflect in cache field by free command, right?
Correct. From the "free" man page:
buffers
Memory used by kernel buffers (Buffers in /proc/meminfo)
cache
Memory used by the page cache and slabs (Cached and
Slab in /proc/meminfo)
buff/cache
Sum of buffers and cache
So, "Buffers" is the amount of cached block device pages - this is
always zero for XFS filesystems as we don't use the block device
page cache at all (IIRC, that's where ext4 caches it's metadata).
"cache" is obvious, but it does not include memory attached to slab
objects. Hence it will account for struct xfs_buf memory usage, but
not the pages attached to each xfs_buf....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-09-09 23:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 10:36 [BUG REPORT] missing memory counter introduced by xfs Lin Feng
2016-09-07 21:22 ` Dave Chinner
2016-09-08 10:07 ` Lin Feng
2016-09-08 20:44 ` Dave Chinner
2016-09-09 6:32 ` Lin Feng
2016-09-09 23:13 ` Dave Chinner [this message]
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=20160909231320.GG30056@dastard \
--to=david@fromorbit.com \
--cc=linf@chinanetcenter.com \
--cc=xfs@oss.sgi.com \
/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).