]> git.proxmox.com Git - mirror_zfs.git/commit
Remove limit on number of async zio_frees of non-dedup blocks
authorMatthew Ahrens <mahrens@delphix.com>
Fri, 14 Feb 2020 16:39:46 +0000 (08:39 -0800)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2020 16:39:46 +0000 (08:39 -0800)
commit4fe3a842bb53e7cebcdcd69deae758ccfb0660e9
treedf78c88185c1d30038ffb7c633ba2774324f4073
parent0f1832106d66a309a9a5a6cc11edee6bb11ced98
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 <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10000
include/sys/dsl_scan.h
man/man5/zfs-module-parameters.5
module/zfs/dsl_scan.c