aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/arc_summary
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2018-08-22 12:35:20 -0400
committerBrian Behlendorf <[email protected]>2018-08-22 09:35:20 -0700
commite8a8208eef3f2e256ddbf91e73add2e08705d482 (patch)
tree689ad0db73c612823fca24f0cbafc31244f8e84a /cmd/arc_summary
parent2711b1d05f30d4f6f54fe828e6b19c77e2ce2491 (diff)
Added metadata/dnode cache info to arc_summary
Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #7815
Diffstat (limited to 'cmd/arc_summary')
-rwxr-xr-xcmd/arc_summary/arc_summary.py40
-rwxr-xr-xcmd/arc_summary/arc_summary3.py23
2 files changed, 60 insertions, 3 deletions
diff --git a/cmd/arc_summary/arc_summary.py b/cmd/arc_summary/arc_summary.py
index f6dbb9bfb..642c94b69 100755
--- a/cmd/arc_summary/arc_summary.py
+++ b/cmd/arc_summary/arc_summary.py
@@ -204,6 +204,10 @@ def get_arc_summary(Kstat):
arc_size = Kstat["kstat.zfs.misc.arcstats.size"]
mru_size = Kstat["kstat.zfs.misc.arcstats.mru_size"]
mfu_size = Kstat["kstat.zfs.misc.arcstats.mfu_size"]
+ meta_limit = Kstat["kstat.zfs.misc.arcstats.arc_meta_limit"]
+ meta_size = Kstat["kstat.zfs.misc.arcstats.arc_meta_used"]
+ dnode_limit = Kstat["kstat.zfs.misc.arcstats.arc_dnode_limit"]
+ dnode_size = Kstat["kstat.zfs.misc.arcstats.dnode_size"]
target_max_size = Kstat["kstat.zfs.misc.arcstats.c_max"]
target_min_size = Kstat["kstat.zfs.misc.arcstats.c_min"]
target_size = Kstat["kstat.zfs.misc.arcstats.c"]
@@ -228,6 +232,22 @@ def get_arc_summary(Kstat):
'per': fPerc(target_size, target_max_size),
'num': fBytes(target_size),
}
+ output['arc_sizing']['meta_limit'] = {
+ 'per': fPerc(meta_limit, target_max_size),
+ 'num': fBytes(meta_limit),
+ }
+ output['arc_sizing']['meta_size'] = {
+ 'per': fPerc(meta_size, meta_limit),
+ 'num': fBytes(meta_size),
+ }
+ output['arc_sizing']['dnode_limit'] = {
+ 'per': fPerc(dnode_limit, meta_limit),
+ 'num': fBytes(dnode_limit),
+ }
+ output['arc_sizing']['dnode_size'] = {
+ 'per': fPerc(dnode_size, dnode_limit),
+ 'num': fBytes(dnode_size),
+ }
# ARC Hash Breakdown
output['arc_hash_break'] = {}
@@ -333,6 +353,26 @@ def _arc_summary(Kstat):
arc['arc_size_break']['frequently_used_cache_size']['num'],
)
)
+ sys.stdout.write("\tMetadata Size (Hard Limit):\t%s\t%s\n" % (
+ arc['arc_sizing']['meta_limit']['per'],
+ arc['arc_sizing']['meta_limit']['num'],
+ )
+ )
+ sys.stdout.write("\tMetadata Size:\t\t\t%s\t%s\n" % (
+ arc['arc_sizing']['meta_size']['per'],
+ arc['arc_sizing']['meta_size']['num'],
+ )
+ )
+ sys.stdout.write("\tDnode Size (Hard Limit):\t%s\t%s\n" % (
+ arc['arc_sizing']['dnode_limit']['per'],
+ arc['arc_sizing']['dnode_limit']['num'],
+ )
+ )
+ sys.stdout.write("\tDnode Size:\t\t\t%s\t%s\n" % (
+ arc['arc_sizing']['dnode_size']['per'],
+ arc['arc_sizing']['dnode_size']['num'],
+ )
+ )
sys.stdout.write("\n")
diff --git a/cmd/arc_summary/arc_summary3.py b/cmd/arc_summary/arc_summary3.py
index adcb78122..1cb71d47a 100755
--- a/cmd/arc_summary/arc_summary3.py
+++ b/cmd/arc_summary/arc_summary3.py
@@ -109,9 +109,14 @@ def draw_graph(kstats_dict):
arc_perc = f_perc(arc_stats['size'], arc_stats['c_max'])
mfu_size = f_bytes(arc_stats['mfu_size'])
mru_size = f_bytes(arc_stats['mru_size'])
-
- info_form = 'ARC: {0} ({1}) MFU: {2} MRU: {3}'
- info_line = info_form.format(arc_size, arc_perc, mfu_size, mru_size)
+ meta_limit = f_bytes(arc_stats['arc_meta_limit'])
+ meta_size = f_bytes(arc_stats['arc_meta_used'])
+ dnode_limit = f_bytes(arc_stats['arc_dnode_limit'])
+ dnode_size = f_bytes(arc_stats['dnode_size'])
+
+ info_form = 'ARC: {0} ({1}) MFU: {2} MRU: {3} META: {4} ({5}) DNODE {6} ({7})'
+ info_line = info_form.format(arc_size, arc_perc, mfu_size, mru_size,
+ meta_size, meta_limit, dnode_size, dnode_limit)
info_spc = ' '*int((GRAPH_WIDTH-len(info_line))/2)
info_line = GRAPH_INDENT+info_spc+info_line
@@ -483,6 +488,10 @@ def section_arc(kstats_dict):
arc_min = arc_stats['c_min']
mfu_size = arc_stats['mfu_size']
mru_size = arc_stats['mru_size']
+ meta_limit = arc_stats['arc_meta_limit']
+ meta_size = arc_stats['arc_meta_used']
+ dnode_limit = arc_stats['arc_dnode_limit']
+ dnode_size = arc_stats['dnode_size']
target_size_ratio = '{0}:1'.format(int(arc_max) // int(arc_min))
prt_2('ARC size (current):',
@@ -498,6 +507,14 @@ def section_arc(kstats_dict):
f_perc(mfu_size, caches_size), f_bytes(mfu_size))
prt_i2('Most Recently Used (MRU) cache size:',
f_perc(mru_size, caches_size), f_bytes(mru_size))
+ prt_i2('Metadata cache size (hard limit):',
+ f_perc(meta_limit, arc_max), f_bytes(meta_limit))
+ prt_i2('Metadata cache size (current):',
+ f_perc(meta_size, meta_limit), f_bytes(meta_size))
+ prt_i2('Dnode cache size (hard limit):',
+ f_perc(dnode_limit, meta_limit), f_bytes(dnode_limit))
+ prt_i2('Dnode cache size (current):',
+ f_perc(dnode_size, dnode_limit), f_bytes(dnode_size))
print()
print('ARC hash breakdown:')