]> git.proxmox.com Git - mirror_zfs.git/commit
zvol: use multiple taskq
authorAmeer Hamza <ahamza@ixsystems.com>
Thu, 4 Apr 2024 01:21:25 +0000 (06:21 +0500)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 01:21:25 +0000 (18:21 -0700)
commit99741bde59d1d1df0963009bb624ddc105f7d8dc
treef6efab10e93f61acb21273c007eec34c4a8a22db
parent30c4eba4eaaef92cbc1b8d2eed6689600a342386
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
man/man4/zfs.4
module/os/linux/zfs/zvol_os.c