aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-03-19 01:05:54 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-03-19 01:05:54 +0000
commitd3c6ba3214ca4dac7f8fed2cdd23cc8adff4fa83 (patch)
tree776115f19c563abcbefa953a84e0af2f791c5c31 /cddl/contrib/opensolaris/cmd
parentc98cae3bf3fa443348ac0a9171c1ca1d89fd3ce7 (diff)
downloadsrc-d3c6ba3214ca4dac7f8fed2cdd23cc8adff4fa83.tar.gz
src-d3c6ba3214ca4dac7f8fed2cdd23cc8adff4fa83.zip
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 MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=359112
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index be2f2cdd029f..65a4858b95d9 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -1544,7 +1544,7 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t *tx, lr_write_t *lr)
if (zil_replaying(zd->zd_zilog, tx))
return;
- if (lr->lr_length > ZIL_MAX_LOG_DATA)
+ if (lr->lr_length > zil_max_log_data(zd->zd_zilog))
write_state = WR_INDIRECT;
itx = zil_itx_create(TX_WRITE,