From b8738257c2607c73c731ce8e0fd73282b266d6ef Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Mon, 10 Jun 2019 11:48:42 -0700 Subject: make zil max block size tunable We've observed that on some highly fragmented pools, most metaslab allocations are small (~2-8KB), but there are some large, 128K allocations. The large allocations are for ZIL blocks. If there is a lot of fragmentation, the large allocations can be hard to satisfy. The most common impact of this is that we need to check (and thus load) lots of metaslabs from the ZIL allocation code path, causing sync writes to wait for metaslabs to load, which can take a second or more. In the worst case, we may not be able to satisfy the allocation, in which case the ZIL will resort to txg_wait_synced() to ensure the change is on disk. To provide a workaround for this, this change adds a tunable that can reduce the size of ZIL blocks. External-issue: DLPX-61719 Reviewed-by: George Wilson Reviewed-by: Paul Dagnelie Reviewed-by: Brian Behlendorf Signed-off-by: Matthew Ahrens Closes #8865 --- man/man5/zfs-module-parameters.5 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'man') diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 282563f13..f9fc3e0f6 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -2826,6 +2826,18 @@ value of 100% will create a maximum of one thread per cpu. Default value: \fB100\fR%. .RE +.sp +.ne 2 +.na +\fBzil_maxblocksize\fR (int) +.ad +.RS 12n +This sets the maximum block size used by the ZIL. On very fragmented pools, +lowering this (typically to 36KB) can improve performance. +.sp +Default value: \fB131072\fR (128KB). +.RE + .sp .ne 2 .na -- cgit v1.2.3