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 <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2110
This commit is contained in:
Prakash Surya 2014-01-03 10:36:26 -08:00 committed by Brian Behlendorf
parent f521ce1b9c
commit 624227854e
2 changed files with 23 additions and 2 deletions

View File

@ -304,6 +304,17 @@ Disable aggressive arc_p growth
Use \fB1\fR for yes (default) and \fB0\fR to disable. Use \fB1\fR for yes (default) and \fB0\fR to disable.
.RE .RE
.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 .sp
.ne 2 .ne 2
.na .na

View File

@ -175,6 +175,9 @@ int zfs_arc_grow_retry = 5;
/* disable anon data aggressively growing arc_p */ /* disable anon data aggressively growing arc_p */
int zfs_arc_p_aggressive_disable = 1; 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) */ /* log2(fraction of arc to reclaim) */
int zfs_arc_shrink_shift = 5; int zfs_arc_shrink_shift = 5;
@ -2633,6 +2636,8 @@ arc_adapt(int bytes, arc_state_t *state)
if (state == arc_mru_ghost) { if (state == arc_mru_ghost) {
mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ? mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ?
1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size)); 1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size));
if (!zfs_arc_p_dampener_disable)
mult = MIN(mult, 10); /* avoid wild arc_p adjustment */ mult = MIN(mult, 10); /* avoid wild arc_p adjustment */
arc_p = MIN(arc_c, arc_p + bytes * mult); arc_p = MIN(arc_c, arc_p + bytes * mult);
@ -2641,6 +2646,8 @@ arc_adapt(int bytes, arc_state_t *state)
mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ? mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ?
1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size)); 1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size));
if (!zfs_arc_p_dampener_disable)
mult = MIN(mult, 10); mult = MIN(mult, 10);
delta = MIN(bytes * mult, arc_p); delta = MIN(bytes * mult, arc_p);
@ -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_param(zfs_arc_p_aggressive_disable, int, 0644);
MODULE_PARM_DESC(zfs_arc_p_aggressive_disable, "disable aggressive arc_p grow"); 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_param(zfs_arc_shrink_shift, int, 0644);
MODULE_PARM_DESC(zfs_arc_shrink_shift, "log2(fraction of arc to reclaim)"); MODULE_PARM_DESC(zfs_arc_shrink_shift, "log2(fraction of arc to reclaim)");