]> git.proxmox.com Git - mirror_zfs.git/commit
ZIL: Improve next log block size prediction
authorAlexander Motin <mav@FreeBSD.org>
Thu, 21 Dec 2023 18:54:44 +0000 (13:54 -0500)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 18:54:44 +0000 (10:54 -0800)
commiteff77a802dc14e91f9fba0dda1403aeb65889814
tree8ef8ea59eb38a8acc0ec08c5466fcdabb013788c
parenta9520e6e5961d9fc58d71b97652773d0f5fee1ff
ZIL: Improve next log block size prediction

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.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15635
include/sys/zil_impl.h
module/zfs/zil.c