mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
fat zap should prefetch when iterating
When iterating over a ZAP object, we're almost always certain to iterate over the entire object. If there are multiple leaf blocks, we can realize a performance win by issuing reads for all the leaf blocks in parallel when the iteration begins. For example, if we have 10,000 snapshots, "zfs destroy -nv pool/fs@1%9999" can take 30 minutes when the cache is cold. This change provides a >3x performance improvement, by issuing the reads for all ~64 blocks of each ZAP object in parallel. Reviewed-by: Andreas Dilger <andreas.dilger@whamcloud.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> External-issue: DLPX-58347 Closes #8862
This commit is contained in:
committed by
Tony Hutter
parent
812c36fc71
commit
516a08ebb4
@@ -104,6 +104,18 @@ to a log2 fraction of the target arc size.
|
||||
Default value: \fB6\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fBdmu_prefetch_max\fR (int)
|
||||
.ad
|
||||
.RS 12n
|
||||
Limit the amount we can prefetch with one call to this amount (in bytes).
|
||||
This helps to limit the amount of memory that can be used by prefetching.
|
||||
.sp
|
||||
Default value: \fB134,217,728\fR (128MB).
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
@@ -502,6 +514,19 @@ regular reads (but there's no reason it has to be the same).
|
||||
Default value: \fB32,768\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fBzap_iterate_prefetch\fR (int)
|
||||
.ad
|
||||
.RS 12n
|
||||
If this is set, when we start iterating over a ZAP object, zfs will prefetch
|
||||
the entire object (all leaf blocks). However, this is limited by
|
||||
\fBdmu_prefetch_max\fR.
|
||||
.sp
|
||||
Use \fB1\fR for on (default) and \fB0\fR for off.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
|
||||
Reference in New Issue
Block a user