diff options
author | Matthew Ahrens <[email protected]> | 2020-02-14 08:39:46 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-14 08:39:46 -0800 |
commit | 4fe3a842bb53e7cebcdcd69deae758ccfb0660e9 (patch) | |
tree | df78c88185c1d30038ffb7c633ba2774324f4073 /include/sys/dsl_scan.h | |
parent | 0f1832106d66a309a9a5a6cc11edee6bb11ced98 (diff) |
Remove limit on number of async zio_frees of non-dedup blocks
The module parameter zfs_async_block_max_blocks limits the number of
blocks that can be freed by the background freeing of filesystems and
snapshots (from "zfs destroy"), in one TXG. This is useful when freeing
dedup blocks, becuase each zio_free() of a dedup block can require an
i/o to read the relevant part of the dedup table (DDT), and will also
dirty that block.
zfs_async_block_max_blocks is set to 100,000 by default. For the more
typical case where dedup is not used, this can have a negative
performance impact on the rate of background freeing (from "zfs
destroy"). For example, with recordsize=8k, and TXG's syncing once
every 5 seconds, we can free only 160MB of data per second, which may be
much less than the rate we can write data.
This change increases zfs_async_block_max_blocks to be unlimited by
default. To address the dedup freeing issue, a new tunable is
introduced, zfs_max_async_dedup_frees, which limits the number of
zio_free()'s of dedup blocks done by background destroys, per txg. The
default is 100,000 free's (same as the old zfs_async_block_max_blocks
default).
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #10000
Diffstat (limited to 'include/sys/dsl_scan.h')
-rw-r--r-- | include/sys/dsl_scan.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/dsl_scan.h b/include/sys/dsl_scan.h index 032f7f3e2..bcb896da3 100644 --- a/include/sys/dsl_scan.h +++ b/include/sys/dsl_scan.h @@ -138,6 +138,7 @@ typedef struct dsl_scan { /* per txg statistics */ uint64_t scn_visited_this_txg; /* total bps visited this txg */ + uint64_t scn_dedup_frees_this_txg; /* dedup bps freed this txg */ uint64_t scn_holes_this_txg; uint64_t scn_lt_min_this_txg; uint64_t scn_gt_max_this_txg; |