From 347cdb6e611b595137671cf8f1897b2019964c7d Mon Sep 17 00:00:00 2001 From: AndCycle Date: Tue, 10 Nov 2015 22:01:26 +0800 Subject: [PATCH] Obey arc_meta_limit default size when changing arc_max 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 Signed-off-by: Brian Behlendorf Closes #4001 --- module/zfs/arc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index c53c01ea4b..2e66b50527 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -5250,7 +5250,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 - */