Thread (3 messages) 3 messages, 3 authors, 2021-08-27

Re: xs_ig_attempts ≠ xs_ig_found + xs_ig_missed

From: Dave Chinner <david@fromorbit.com>
Date: 2021-08-26 21:17:58

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help