From 37f03da8ba6e1ab074b503e1dd63bfa7199d0537 Mon Sep 17 00:00:00 2001 From: Sara Hartse Date: Fri, 26 Jul 2019 10:54:14 -0700 Subject: Fast Clone Deletion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deleting a clone requires finding blocks are clone-only, not shared with the snapshot. This was done by traversing the entire block tree which results in a large performance penalty for sparsely written clones. This is new method keeps track of clone blocks when they are modified in a "Livelist" so that, when it’s time to delete, the clone-specific blocks are already at hand. We see performance improvements because now deletion work is proportional to the number of clone-modified blocks, not the size of the original dataset. Reviewed-by: Sean Eric Fagan Reviewed-by: Matt Ahrens Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Sara Hartse Closes #8416 --- man/man5/zfs-module-parameters.5 | 92 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) (limited to 'man/man5/zfs-module-parameters.5') diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 62245f6a0..3b88d9748 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -1909,6 +1909,98 @@ Pattern written to vdev free space by \fBzpool initialize\fR. Default value: \fB16,045,690,984,833,335,022\fR (0xdeadbeefdeadbeee). .RE +.sp +.ne 2 +.na +\fBzfs_livelist_max_entries\fR (ulong) +.ad +.RS 12n +The threshold size (in block pointers) at which we create a new sub-livelist. +Larger sublists are more costly from a memory perspective but the fewer +sublists there are, the lower the cost of insertion. +.sp +Default value: \fB500,000\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_min_percent_shared\fR (int) +.ad +.RS 12n +If the amount of shared space between a snapshot and its clone drops below +this threshold, the clone turns off the livelist and reverts to the old deletion +method. This is in place because once a clone has been overwritten enough +livelists no long give us a benefit. +.sp +Default value: \fB75\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_condense_new_alloc\fR (int) +.ad +.RS 12n +Incremented each time an extra ALLOC blkptr is added to a livelist entry while +it is being condensed. +This option is used by the test suite to track race conditions. +.sp +Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_condense_sync_cancel\fR (int) +.ad +.RS 12n +Incremented each time livelist condensing is canceled while in +spa_livelist_condense_sync. +This option is used by the test suite to track race conditions. +.sp +Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_condense_sync_pause\fR (int) +.ad +.RS 12n +When set, the livelist condense process pauses indefinitely before +executing the synctask - spa_livelist_condense_sync. +This option is used by the test suite to trigger race conditions. +.sp +Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_condense_zthr_cancel\fR (int) +.ad +.RS 12n +Incremented each time livelist condensing is canceled while in +spa_livelist_condense_cb. +This option is used by the test suite to track race conditions. +.sp +Default value: \fB0\fR. +.RE + +.sp +.ne 2 +.na +\fBzfs_livelist_condense_zthr_pause\fR (int) +.ad +.RS 12n +When set, the livelist condense process pauses indefinitely before +executing the open context condensing work in spa_livelist_condense_cb. +This option is used by the test suite to trigger race conditions. +.sp +Default value: \fB0\fR. +.RE + .sp .ne 2 .na -- cgit v1.2.3