diff options
author | Matthew Ahrens <[email protected]> | 2019-06-10 11:48:42 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-06-10 11:48:42 -0700 |
commit | b8738257c2607c73c731ce8e0fd73282b266d6ef (patch) | |
tree | d73e90809b9f413b8894d8ee7fc6ad8a11bff7fe /include/sys/zil.h | |
parent | 5a902f5aaa1fbf6f7e459ec29f6d1d988ec78b0a (diff) |
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 <[email protected]>
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #8865
Diffstat (limited to 'include/sys/zil.h')
-rw-r--r-- | include/sys/zil.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sys/zil.h b/include/sys/zil.h index fb7b38a06..cfa5e3995 100644 --- a/include/sys/zil.h +++ b/include/sys/zil.h @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 by Delphix. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -515,6 +515,9 @@ extern void zil_set_sync(zilog_t *zilog, uint64_t syncval); extern void zil_set_logbias(zilog_t *zilog, uint64_t slogval); +extern uint64_t zil_max_copied_data(zilog_t *zilog); +extern uint64_t zil_max_log_data(zilog_t *zilog); + extern int zil_replay_disable; #ifdef __cplusplus |