linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: xs_ig_attempts ≠ xs_ig_found + xs_ig_missed
Date: Fri, 27 Aug 2021 07:17:52 +1000	[thread overview]
Message-ID: <20210826211752.GN3657114@dread.disaster.area> (raw)
In-Reply-To: <e9072acd-2daa-96da-f1f2-bca7870d6b55@molgen.mpg.de>

On Thu, Aug 26, 2021 at 10:36:41AM +0200, Paul Menzel wrote:
> Dear Linux folks,
> 
> 
> In the internal statistics [1] the attempts to look up an inode in the inode
> cache (`xs_ig_attempts`) is a little bigger (35) than the sum of found and
> missed entries minus duplicates (`xfs.inode_ops.ig_dup`): 651067226 =
> 651067191 + 35 > 651067191 = 259143798 + 391923706 - 313.
> 
>     $ grep ^ig /sys/fs/xfs/sdc/stats/stats # hardware RAID
>     ig 651067226 259143798 75 391923706 313 391196609 8760483
> 
> For the software RAID device there is no difference: 794085909 = 293058663 +
> 501027325 - 79.
> 
>     $ grep ^ig /sys/fs/xfs/md0/stats/stats
>     ig 794085909 293058663 18555 501027325 79 500997366 320679
> 
> Is the first difference expected?

Yes. XFS stats are low overhead unsynchronised per-cpu counters,
never guaranteed to be perfectly accurate or consistent because,
well, unsycnhronised per-cpu counters are neither.

IOWs, individual counters are never "point in time" accurate because of
counter update races during aggregation. Multiple counters are never
"point in time" synchronised, either, as individual
counters are aggregated sequentially and hence have different,
unsynchronised sampling times.

IOWs, the stats are not really meaningful as aboslute values - they
are generally used for monitoring purposes via delta sampling (e.g.
"how many of these events happened in the last second") or checking
that certain operations have occurred as a basic code coverage check
for developers (e.g. did we split the freespace inode btree at all
during a fstests run?).....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2021-08-26 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  8:36 Paul Menzel
2021-08-26 21:17 ` Dave Chinner [this message]
2021-08-27  6:22 ` xs_ig_attempts ??? " Christoph Hellwig

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=20210826211752.GN3657114@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --subject='Re: xs_ig_attempts ≠ xs_ig_found + xs_ig_missed' \
    /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

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).