HomeFreeBSD

zvol: use multiple taskq

Description

zvol: use multiple taskq

Currently, zvol uses a single taskq, resulting in throughput bottleneck
under heavy load due to lock contention on the single taskq. This patch
addresses the performance bottleneck under heavy load conditions by
utilizing multiple taskqs, thus mitigating lock contention. The number
of taskqs scale dynamically based on the available CPUs in the system,
as illustrated below:

taskq   total

cpus taskqs threads threads


1 1 32 32
2 1 32 32
4 1 32 32
8 2 16 32
16 3 11 33
32 5 7 35
64 8 8 64
128 11 12 132
256 16 16 256

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15992

Details

Provenance
Ameer Hamza <ahamza@ixsystems.com>Authored on Apr 4 2024, 1:21 AM
Tony Hutter <hutter2@llnl.gov>Committed on Apr 17 2024, 5:10 PM
Parents
rG7ad2616d378f: vdev_disk: fix alignment check when buffer has non-zero starting offset
Branches
Unknown
Tags
Unknown