ZIL: Reduce maximum size of WR_COPIED to 7.5K
commit9be8ddfb3c2587b41c3d6263be110ee77be6b710
authorAlexander Motin <mav@FreeBSD.org>
Fri, 6 Oct 2023 17:09:27 +0000 (6 13:09 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 7 Oct 2023 16:08:20 +0000 (7 09:08 -0700)
tree2508f5b83f7e1b3bf10290192636fe8df225f862
parent3755cde22a33df9f06839c9034af27d25f2bc2da
ZIL: Reduce maximum size of WR_COPIED to 7.5K

Benchmarks show that at certain write sizes range lock/unlock take
not so much time as extra memory copy.  The exact threshold is not
obvious due to other overheads, but it is definitely lower than
~63KB used before.  Make it configurable, defaulting at 7.5KB,
that is 8KB of nearest malloc() size minus itx and lr structs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15353
man/man4/zfs.4
module/zfs/zil.c