diff options
author | Prakash Surya <[email protected]> | 2014-01-03 10:36:26 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-02-21 16:10:49 -0800 |
commit | 624227854e619d1bf555445f3bc38730fb9278c4 (patch) | |
tree | 03139489a6b024a2a483523843a237ed60f9ecab | |
parent | f521ce1b9c6102f9175f26548d4c521e115f8d60 (diff) |
Disable arc_p adapt dampener by default
It's unclear why adjustments to arc_p need to be dampened as they are in
arc_adjust. With that said, it's removal significantly improves the arc's
ability to "warm up" to a given workload. Thus, I'm disabling by default
until its usefulness is better understood.
Signed-off-by: Prakash Surya <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2110
-rw-r--r-- | man/man5/zfs-module-parameters.5 | 11 | ||||
-rw-r--r-- | module/zfs/arc.c | 14 |
2 files changed, 23 insertions, 2 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 2acf68383..e0d44d22c 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -307,6 +307,17 @@ Use \fB1\fR for yes (default) and \fB0\fR to disable. .sp .ne 2 .na +\fBzfs_arc_p_dampener_disable\fR (int) +.ad +.RS 12n +Disable arc_p adapt dampener +.sp +Use \fB1\fR for yes (default) and \fB0\fR to disable. +.RE + +.sp +.ne 2 +.na \fBzfs_arc_shrink_shift\fR (int) .ad .RS 12n diff --git a/module/zfs/arc.c b/module/zfs/arc.c index f66eaa407..68496783d 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -175,6 +175,9 @@ int zfs_arc_grow_retry = 5; /* disable anon data aggressively growing arc_p */ int zfs_arc_p_aggressive_disable = 1; +/* disable arc_p adapt dampener in arc_adapt */ +int zfs_arc_p_dampener_disable = 1; + /* log2(fraction of arc to reclaim) */ int zfs_arc_shrink_shift = 5; @@ -2633,7 +2636,9 @@ arc_adapt(int bytes, arc_state_t *state) if (state == arc_mru_ghost) { mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ? 1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size)); - mult = MIN(mult, 10); /* avoid wild arc_p adjustment */ + + if (!zfs_arc_p_dampener_disable) + mult = MIN(mult, 10); /* avoid wild arc_p adjustment */ arc_p = MIN(arc_c, arc_p + bytes * mult); } else if (state == arc_mfu_ghost) { @@ -2641,7 +2646,9 @@ arc_adapt(int bytes, arc_state_t *state) mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ? 1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size)); - mult = MIN(mult, 10); + + if (!zfs_arc_p_dampener_disable) + mult = MIN(mult, 10); delta = MIN(bytes * mult, arc_p); arc_p = MAX(0, arc_p - delta); @@ -5554,6 +5561,9 @@ MODULE_PARM_DESC(zfs_arc_grow_retry, "Seconds before growing arc size"); module_param(zfs_arc_p_aggressive_disable, int, 0644); MODULE_PARM_DESC(zfs_arc_p_aggressive_disable, "disable aggressive arc_p grow"); +module_param(zfs_arc_p_dampener_disable, int, 0644); +MODULE_PARM_DESC(zfs_arc_p_dampener_disable, "disable arc_p adapt dampener"); + module_param(zfs_arc_shrink_shift, int, 0644); MODULE_PARM_DESC(zfs_arc_shrink_shift, "log2(fraction of arc to reclaim)"); |