ZIO: Set minimum number of free issue threads to 32

Free issue threads might block waiting for synchronous DDT, BRT or
GANG header reads. So unlike other taskqs using ZTI_SCALE to scale
with number of CPUs, here we also need some amount of threads to
potentially saturate pool reads.  I am not sure we always want the
96 threads we had before ZTI_SCALE introduction at #11966 on small
systems, but lets make it at least 32.

While here, make free taskqs configurable, similar to read and
write ones.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #17903
This commit is contained in:
Alexander Motin
2025-11-08 14:41:53 -05:00
committed by GitHub
parent e26b9fc871
commit baefe098ee
3 changed files with 127 additions and 18 deletions
+38
View File
@@ -2660,12 +2660,50 @@ Set value only applies to pools imported/created after that.
Set the queue and thread configuration for the IO read queues.
This is an advanced debugging parameter.
Don't change this unless you understand what it does.
Each of the four values corresponds to the issue, issue high-priority,
interrupt, and interrupt high-priority queues.
Valid values are
.Sy fixed,N,M
(M queues with N threads each),
.Sy scale[,MIN]
(scale with CPUs, minimum MIN total threads),
.Sy sync ,
and
.Sy null .
Set values only apply to pools imported/created after that.
.
.It Sy zio_taskq_write Ns = Ns Sy sync null scale null Pq charp
Set the queue and thread configuration for the IO write queues.
This is an advanced debugging parameter.
Don't change this unless you understand what it does.
Each of the four values corresponds to the issue, issue high-priority,
interrupt, and interrupt high-priority queues.
Valid values are
.Sy fixed,N,M
(M queues with N threads each),
.Sy scale[,MIN]
(scale with CPUs, minimum MIN total threads),
.Sy sync ,
and
.Sy null .
Set values only apply to pools imported/created after that.
.
.It Sy zio_taskq_free Ns = Ns Sy scale,32 null null null Pq charp
Set the queue and thread configuration for the IO free queues.
This is an advanced debugging parameter.
Don't change this unless you understand what it does.
Each of the four values corresponds to the issue, issue high-priority,
interrupt, and interrupt high-priority queues.
Valid values are
.Sy fixed,N,M
(M queues with N threads each),
.Sy scale[,MIN]
(scale with CPUs, minimum MIN total threads),
.Sy sync ,
and
.Sy null .
The default uses a minimum of 32 threads to improve parallelism for
DDT and BRT metadata operations during frees.
Set values only apply to pools imported/created after that.
.
.It Sy zvol_inhibit_dev Ns = Ns Sy 0 Ns | Ns 1 Pq uint