Bug #5445


Add more visibility via arcstats; specifically arc_state_t stats and differentiate between "data" and "metadata"

Added by Matthew Ahrens almost 7 years ago. Updated almost 7 years ago.

zfs - Zettabyte File System
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


We should start exporting the arc_state_t statistics via the arcstats interface.

Proper page caching is critical to maintain good performance, and without more visibility into the ARC, it's difficult to determine if it's behaving correctly.

First patch commit message ( :

Add arc_state_t stats to arcstats

To ensure the arc is behaving properly we need greater visibility
in to exactly how it's managing the systems memory. This patch
takes one step in that direction be adding the current arc_state_t
for the anon, mru, mru_ghost, mfu, and mfs_ghost lists. The l2
arc_state_t is already well represented in the arcstats.

Signed-off-by: Brian Behlendorf

Second patch commit message (

Split "data_size" into "meta" and "data"

Previously, the "data_size" field in the arcstats kstat contained the
amount of cached "metadata" and "data" in the ARC. The problem is this
then made it difficult to extract out just the "metadata" size, or just
the "data" size.

To make it easier to distinguish the two values, "data_size" has been
modified to count only buffers of type ARC_BUFC_DATA, and "meta_size"
was added to count only buffers of type ARC_BUFC_METADATA. If one wants
the old "data_size" value, simply sum the new "data_size" and
"meta_size" values.

Signed-off-by: Prakash Surya
Signed-off-by: Brian Behlendorf
Issue #2110

Added a third patch:

Add comments for various arcstat parameters

This is a simple patch to add comments to some of the arcstat values:

  • arcstat_hdr_size
  • arcstat_data_size
  • arcstat_meta_size
  • arcstat_other_size
  • arcstat_anon_size
  • arcstat_anon_evict_data
  • arcstat_anon_evict_metadata
  • arcstat_mru_size
  • arcstat_mru_evict_data
  • arcstat_mru_evict_metadata
  • arcstat_mru_ghost_size
  • arcstat_mru_ghost_evict_data
  • arcstat_mru_ghost_evict_metadata
  • arcstat_mfu_size
  • arcstat_mfu_evict_data
  • arcstat_mfu_evict_metadata
  • arcstat_mfu_ghost_size
  • arcstat_mfu_ghost_evict_data
  • arcstat_mfu_ghost_evict_metadata

Signed-off-by: Prakash Surya

And a fourth patch:

Rename a few arcstat parameters

A few of the arcstat parameters were renamed to try and give them a more
meaningful name, and more closely align their names with exactly what
information they contain. The specific parameters renamed are:

------------------------------------------------------+ | Old Name | New Name |
------------------------------------------------------+ | meta_size | metadata_size | | anon_evict_data | anon_evictable_data | | anon_evict_metadata | anon_evictable_metadata | | mru_evict_data | mru_evictable_data | | mru_evict_metadata | mru_evictable_metadata | | mru_ghost_evict_data | mru_ghost_evictable_data | | mru_ghost_evict_metadata | mru_ghost_evictable_metadata | | mfu_evict_data | mfu_evictable_data | | mfu_evict_metadata | mfu_evictable_metadata | | mfu_ghost_evict_data | mfu_ghost_evictable_data | | mfu_ghost_evict_metadata | mfu_ghost_evictable_metadata |

Actions #1

Updated by Electric Monk almost 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 4076b1bf41cfd9f968a33ed54a7ae76d9e996fe8

commit  4076b1bf41cfd9f968a33ed54a7ae76d9e996fe8
Author: Prakash Surya <>
Date:   2014-12-31T17:04:02.000Z

    5445 Add more visibility via arcstats; specifically arc_state_t stats and differentiate between "data" and "metadata" 
    Reviewed by: Basil Crow <>
    Reviewed by: George Wilson <>
    Reviewed by: Matthew Ahrens <>
    Reviewed by: Bayard Bell <>
    Approved by: Robert Mustacchi <>


Also available in: Atom PDF