mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Add missing arcstats
The following useful values were missing the arcstats. This change adds them in to provide greater visibility in to the arcs behavior. arc_no_grow 4 0 arc_tempreserve 4 0 arc_loaned_bytes 4 0 arc_meta_used 4 624774592 arc_meta_limit 4 400785408 arc_meta_max 4 625594176
This commit is contained in:
parent
c85b224faf
commit
1834f2d8b7
@ -282,6 +282,12 @@ typedef struct arc_stats {
|
|||||||
kstat_named_t arcstat_l2_size;
|
kstat_named_t arcstat_l2_size;
|
||||||
kstat_named_t arcstat_l2_hdr_size;
|
kstat_named_t arcstat_l2_hdr_size;
|
||||||
kstat_named_t arcstat_memory_throttle_count;
|
kstat_named_t arcstat_memory_throttle_count;
|
||||||
|
kstat_named_t arcstat_no_grow;
|
||||||
|
kstat_named_t arcstat_tempreserve;
|
||||||
|
kstat_named_t arcstat_loaned_bytes;
|
||||||
|
kstat_named_t arcstat_meta_used;
|
||||||
|
kstat_named_t arcstat_meta_limit;
|
||||||
|
kstat_named_t arcstat_meta_max;
|
||||||
} arc_stats_t;
|
} arc_stats_t;
|
||||||
|
|
||||||
static arc_stats_t arc_stats = {
|
static arc_stats_t arc_stats = {
|
||||||
@ -337,7 +343,13 @@ static arc_stats_t arc_stats = {
|
|||||||
{ "l2_io_error", KSTAT_DATA_UINT64 },
|
{ "l2_io_error", KSTAT_DATA_UINT64 },
|
||||||
{ "l2_size", KSTAT_DATA_UINT64 },
|
{ "l2_size", KSTAT_DATA_UINT64 },
|
||||||
{ "l2_hdr_size", KSTAT_DATA_UINT64 },
|
{ "l2_hdr_size", KSTAT_DATA_UINT64 },
|
||||||
{ "memory_throttle_count", KSTAT_DATA_UINT64 }
|
{ "memory_throttle_count", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_no_grow", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_tempreserve", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_loaned_bytes", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_meta_used", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_meta_limit", KSTAT_DATA_UINT64 },
|
||||||
|
{ "arc_meta_max", KSTAT_DATA_UINT64 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ARCSTAT(stat) (arc_stats.stat.value.ui64)
|
#define ARCSTAT(stat) (arc_stats.stat.value.ui64)
|
||||||
@ -399,13 +411,12 @@ static arc_state_t *arc_l2c_only;
|
|||||||
#define arc_c ARCSTAT(arcstat_c) /* target size of cache */
|
#define arc_c ARCSTAT(arcstat_c) /* target size of cache */
|
||||||
#define arc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */
|
#define arc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */
|
||||||
#define arc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */
|
#define arc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */
|
||||||
|
#define arc_no_grow ARCSTAT(arcstat_no_grow)
|
||||||
static int arc_no_grow; /* Don't try to grow cache size */
|
#define arc_tempreserve ARCSTAT(arcstat_tempreserve)
|
||||||
static uint64_t arc_tempreserve;
|
#define arc_loaned_bytes ARCSTAT(arcstat_loaned_bytes)
|
||||||
static uint64_t arc_loaned_bytes;
|
#define arc_meta_used ARCSTAT(arcstat_meta_used)
|
||||||
static uint64_t arc_meta_used;
|
#define arc_meta_limit ARCSTAT(arcstat_meta_limit)
|
||||||
static uint64_t arc_meta_limit;
|
#define arc_meta_max ARCSTAT(arcstat_meta_max)
|
||||||
static uint64_t arc_meta_max = 0;
|
|
||||||
|
|
||||||
typedef struct l2arc_buf_hdr l2arc_buf_hdr_t;
|
typedef struct l2arc_buf_hdr l2arc_buf_hdr_t;
|
||||||
|
|
||||||
@ -3499,6 +3510,7 @@ arc_init(void)
|
|||||||
|
|
||||||
/* limit meta-data to 1/4 of the arc capacity */
|
/* limit meta-data to 1/4 of the arc capacity */
|
||||||
arc_meta_limit = arc_c_max / 4;
|
arc_meta_limit = arc_c_max / 4;
|
||||||
|
arc_meta_max = 0;
|
||||||
|
|
||||||
/* Allow the tunable to override if it is reasonable */
|
/* Allow the tunable to override if it is reasonable */
|
||||||
if (zfs_arc_meta_limit > 0 && zfs_arc_meta_limit <= arc_c_max)
|
if (zfs_arc_meta_limit > 0 && zfs_arc_meta_limit <= arc_c_max)
|
||||||
|
Loading…
Reference in New Issue
Block a user