]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve write issue taskqs utilization
authorAlexander Motin <mav@FreeBSD.org>
Wed, 1 May 2024 18:07:20 +0000 (14:07 -0400)
committerGitHub <noreply@github.com>
Wed, 1 May 2024 18:07:20 +0000 (11:07 -0700)
commit645b83307918085ab2f0e12618809e348635b34f
tree50ca528cdfced535d6e3d88999b71bda8d712f58
parent8fd3a5d02f3f6bad9e8e65b6aded694eae222bf2
Improve write issue taskqs utilization

- Reduce number of allocators on small system down to one per 4
CPU cores, keeping maximum at 4 on 16+ core systems. Small systems
should not have the lock contention multiple allocators supposed
to solve, while having several metaslabs open and modified each
TXG is not free.
 - Reduce number of write issue taskqs down to one per 16 CPU
cores and an integer fraction of number of allocators.  On mid-
sized systems, where multiple allocators already make sense, too
many write issue taskqs may reduce write speed on single-file
workloads, since single file is handled by only one taskq to
reduce fragmentation. On large systems, that can actually benefit
from many taskq's better IOPS, the bottleneck is less important,
since in worst case there will be at least 16 cores to handle it.
 - Distribute dnodes between allocators (and taskqs) in a round-
robin fashion instead of relying on sync taskqs to be balanced.
The last is not guarantied and may depend on scheduling.
 - Remove io_wr_iss_tq from struct zio.  io_allocator is enough.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16130
include/sys/spa.h
include/sys/spa_impl.h
include/sys/zio.h
man/man4/zfs.4
module/zfs/dmu_objset.c
module/zfs/spa.c
module/zfs/spa_misc.c
module/zfs/zio.c