Illumos 6322 ZFS indirect block predictive prefetch #5040
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For quite some time I was thinking about possibility to prefetch ZFS indirection tables while doing sequential reads or writes. Recent changes in predictive prefetcher made that much easier to do. My
tests on zvol with 16KB block size on 5x striped and 2x mirrored pool of 10 disks show almost double throughput on sequential read, and almost tripple on sequential rewrite. While for read alike effect
can be received from increasing maximal prefetch distance (though at higher memory cost), for rewrite there is no other solution so far.
Porting notes:
Change from upstream in module/zfs/dbuf.c in 'int dbuf_read' due to commit 'Handle block pointers with a corrupt logical size'
5f6d0b6
difference from upstream in module/zfs/dmu_zfetch.c , uint32_t zfetch_max_idistance -> unsigned int zfetch_max_idistance
Variables have been initialized at the beginning of the function (void dmu_zfetch) to resemble the order of occurence and account for C99, C11 mode errors.
Authored by: Alexander Motin [email protected]
Reviewed by: Matthew Ahrens [email protected]
Reviewed by: Paul Dagnelie [email protected]
Approved by: Robert Mustacchi [email protected]
Ported-by: kernelOfTruth [email protected]
OpenZFS-issue: https://www.illumos.org/issues/6322
OpenZFS-commit: illumos/illumos-gate@cb92f41