From 85ec5cbae228defb4332da4cf0ebb64d53aea157 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Mon, 17 Aug 2020 20:04:04 -0700 Subject: Include scatter_chunk_waste in arc_size The ARC caches data in scatter ABD's, which are collections of pages, which are typically 4K. Therefore, the space used to cache each block is rounded up to a multiple of 4K. The ABD subsystem tracks this wasted memory in the `scatter_chunk_waste` kstat. However, the ARC's `size` is not aware of the memory used by this round-up, it only accounts for the size that it requested from the ABD subsystem. Therefore, the ARC is effectively using more memory than it is aware of, due to the `scatter_chunk_waste`. This impacts observability, e.g. `arcstat` will show that the ARC is using less memory than it effectively is. It also impacts how the ARC responds to memory pressure. As the amount of `scatter_chunk_waste` changes, it appears to the ARC as memory pressure, so it needs to resize `arc_c`. If the sector size (`1< Reviewed-by: Brian Behlendorf Reviewed-by: George Wilson Reviewed-by: Ryan Moeller Signed-off-by: Matthew Ahrens Closes #10701 --- include/sys/arc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/arc.h') diff --git a/include/sys/arc.h b/include/sys/arc.h index f322d6328..3fdf36e2a 100644 --- a/include/sys/arc.h +++ b/include/sys/arc.h @@ -203,6 +203,7 @@ typedef enum arc_space_type { ARC_SPACE_DBUF, ARC_SPACE_DNODE, ARC_SPACE_BONUS, + ARC_SPACE_ABD_CHUNK_WASTE, ARC_SPACE_NUMTYPES } arc_space_type_t; -- cgit v1.2.3