From 534688948c395619af328c60ba3b863bfcf2ef20 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 19 Nov 2024 10:00:16 -0500 Subject: Remove hash_elements_max accounting from DBUF and ARC Those values require global atomics to get current hash_elements values in few of the hottest code paths, while in all the years I never cared about it. If somebody wants, it should be easy to get it by periodic sampling, since neither ARC header nor DBUF counts change so fast that it would be difficult to catch. For now I've left hash_elements_max kstat for ARC, since it was used/reported by arc_summary and it would break older versions, but now it just reports the current value. Reviewed-by: Brian Behlendorf Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. Closes #16759 --- cmd/arc_summary | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/arc_summary b/cmd/arc_summary index c24d400fa..72381d266 100755 --- a/cmd/arc_summary +++ b/cmd/arc_summary @@ -662,10 +662,7 @@ def section_arc(kstats_dict): print() print('ARC hash breakdown:') - prt_i1('Elements max:', f_hits(arc_stats['hash_elements_max'])) - prt_i2('Elements current:', - f_perc(arc_stats['hash_elements'], arc_stats['hash_elements_max']), - f_hits(arc_stats['hash_elements'])) + prt_i1('Elements:', f_hits(arc_stats['hash_elements'])) prt_i1('Collisions:', f_hits(arc_stats['hash_collisions'])) prt_i1('Chain max:', f_hits(arc_stats['hash_chain_max'])) -- cgit v1.2.3