-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZIL: Improve next log block size prediction.
Detect single-threaded workloads by checking the previous block is fully written and flushed. It allows to make size prediction logic much more precise and skip commit delays, since we can give up on write aggregation in that case. Since single-threaded workloads are no longer delayed, increase zfs_commit_timeout_pct from 5 to 10%. Parallel workloads should less care about it, and it should provide more aggregation. Remove zil_min_commit_timeout tunable, since very fast ZILs should detect most of workloads as single-threaded. And when not, not delaying writes wastes extra block space allocated for aggregation. Track history in context of bursts, not individual log blocks. It allows to not blow away all the history by single large burst of many block, and same time allows optimizations covering multiple blocks in a burst and even predicted following burst. For each burst account its optimal block size and minimal first block size. Use that statistics from the last 8 bursts to predict first block size of the next burst. Remove predefined set of block sizes. Allocate any size we see fit, multiple of 4KB, as required by ZIL now. With compression enabled by default, ZFS already writes pretty random block sizes, so this should not surprise space allocator any more. Reduce max_waste_space from 12 to 6% and max_copied_data from 63KB to 8KB. It allows prediction to be more precise on large bursts, improve space efficiency and reduce extra memory copying. Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc.
- Loading branch information
Showing
4 changed files
with
261 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.