Skip to content

Commit

Permalink
Obey arc_meta_limit default size when changing arc_max
Browse files Browse the repository at this point in the history
When decreasing the maximum ARC size preserve the 3/4 default
ratio for the arc_meta_limit.  Otherwise, the arc_meta_limit
may be set the same as arc_max.

Signed-off-by: AndCycle <andcycle@andcycle.idv.tw>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#4001
  • Loading branch information
AndCycle authored and Chunwei Chen committed Dec 14, 2015
1 parent 08bd474 commit 1716da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5244,7 +5244,7 @@ arc_tuning_update(void)
arc_c_max = zfs_arc_max;
arc_c = arc_c_max;
arc_p = (arc_c >> 1);
arc_meta_limit = MIN(arc_meta_limit, arc_c_max);
arc_meta_limit = MIN(arc_meta_limit, (3 * arc_c_max) / 4);
}

/* Valid range: 32M - <arc_c_max> */
Expand Down

0 comments on commit 1716da9

Please sign in to comment.