HomeFreeBSD

Reduce number of metaslab preload taskq threads.

Description

Reduce number of metaslab preload taskq threads.

Before this change ZFS created threads for 50% of CPUs for each top-
level vdev. Plus it created the same number of threads for embedded
log groups (that have only one metaslab and don't need any preload).
As result, on system with 80 CPUs and pool of 60 vdevs this resulted
in 4800 metaslab preload threads, that is absolutely insane.

This patch changes the preload threads to 50% of CPUs in one taskq
per pool, so on the mentioned system it will be only 40 threads.

Among other things this fixes zdb on the mentioned system and pool
on FreeBSD, that failed to create so many threads in one process.

Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15319

Details

Provenance
mavAuthored on Oct 6 2023, 4:04 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 7 2023, 4:08 PM
Parents
rGc27277daace5: CI: add FreeBSD build with Cirrus CI
Branches
Unknown
Tags
Unknown