]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r359112: MFOpenZFS: make zil max block size tunable
authorAlexander Motin <mav@FreeBSD.org>
Thu, 2 Apr 2020 00:30:01 +0000 (00:30 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 2 Apr 2020 00:30:01 +0000 (00:30 +0000)
commit8f9093d89ac958e23acf1b46aefea9bec2ebf77c
treead535432cf470b7200d3d4f2353f7a93549fe67d
parenteca73b55a9b3e036be047fab689b1328fa9d1148
MFC r359112: MFOpenZFS: 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 <george.wilson@delphix.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #8865
openzfs/zfs@b8738257c2607c73c731ce8e0fd73282b266d6ef
cddl/contrib/opensolaris/cmd/ztest/ztest.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c