From 00212af493ddf55cffc57be72c2cc1700a97d7d9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 28 Apr 2017 16:43:15 -0400 Subject: [PATCH] Limit zfs_dirty_data_max_max to 4G Reinstate default 4G zfs_dirty_data_max_max limit. Signed-off-by: Brian Behlendorf Issue #6072 --- module/zfs/arc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index d6244d19e3a6..25fdbdd2bf14 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -6519,11 +6519,11 @@ arc_init(void) * If it has been set by a module parameter, take that. * Otherwise, use a percentage of physical memory defined by * zfs_dirty_data_max_percent (default 10%) with a cap at - * zfs_dirty_data_max_max (default 25% of physical memory). + * zfs_dirty_data_max_max (default 4G or 25% of physical memory). */ if (zfs_dirty_data_max_max == 0) - zfs_dirty_data_max_max = allmem * - zfs_dirty_data_max_max_percent / 100; + zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024, + allmem * zfs_dirty_data_max_max_percent / 100); if (zfs_dirty_data_max == 0) { zfs_dirty_data_max = allmem *