summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorchrisrd <[email protected]>2017-09-30 08:49:19 +1000
committerBrian Behlendorf <[email protected]>2017-09-29 15:49:19 -0700
commite71cade67d48495db46fb6eed29b88b895bcb2d8 (patch)
tree27868fb2da175673cddc274967dcecd82f47f1de /include
parentb59b22972db5913000ca157c24a254182df8d957 (diff)
Scale the dbuf cache with arc_c
Commit d3c2ae1 introduced a dbuf cache with a default size of the minimum of 100M or 1/32 maximum ARC size. (These figures may be adjusted using dbuf_cache_max_bytes and dbuf_cache_max_shift.) The dbuf cache is counted as metadata for the purposes of ARC size calculations. On a 1GB box the ARC maximum size defaults to c_max 493M which gives a dbuf cache default minimum size of 15.4M, and the ARC metadata defaults to minimum 16M. I.e. the dbuf cache is an significant proportion of the minimum metadata size. With other overheads involved this actually means the ARC metadata doesn't get down to the minimum. This patch dynamically scales the dbuf cache to the target ARC size instead of statically scaling it to the maximum ARC size. (The scale is still set by dbuf_cache_max_shift and the maximum size is still fixed by dbuf_cache_max_bytes.) Using the target ARC size rather than the current ARC size is done to help the ARC reach the target rather than simply focusing on the current size. Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Chris Dunlop <[email protected]> Issue #6506 Closes #6561
Diffstat (limited to 'include')
-rw-r--r--include/sys/arc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h
index 6edf4ea56..7428a1629 100644
--- a/include/sys/arc.h
+++ b/include/sys/arc.h
@@ -289,7 +289,7 @@ void arc_flush(spa_t *spa, boolean_t retry);
void arc_tempreserve_clear(uint64_t reserve);
int arc_tempreserve_space(uint64_t reserve, uint64_t txg);
-uint64_t arc_max_bytes(void);
+uint64_t arc_target_bytes(void);
void arc_init(void);
void arc_fini(void);