From d766ae211c0ab268a038c92c2fedde3bcda96017 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 10 Jan 2024 11:36:02 +0100 Subject: [PATCH] System: Settings: Tunables - change zfs transcation group defaults. (timeout from 5 --> 90 seconds, dirty data sync percentage from 20 --> 5) Usually firewalls are not processing a lot of disk write operations, in which case a forced every 5 second flush will lead to quite some wear on the underlying storage device (usually a solid state one these days). Roughly 20GB per day is being written when using the upstream defaults and without much actual load. To compensate a bit for the reduction of forced syncs, we lower the threshold on the dirty data. --- src/etc/inc/system.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 366b3896e..4596d3cbc 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -122,6 +122,8 @@ function system_sysctl_defaults() 'security.bsd.see_other_gids' => [ 'default' => '0' ], 'security.bsd.see_other_uids' => [ 'default' => '0' ], 'vfs.read_max' => [ 'default' => '32' ], + 'vfs.zfs.txg.timeout' => [ 'default' => '90' ], + 'vfs.zfs.dirty_data_sync_percent' => [ 'default' => '5' ], 'vm.pmap.pti' => [ 'default' => '1' ], ]; }