HomeFreeBSD

Reduce ZIO io_lock contention on sorted scrub

Description

Reduce ZIO io_lock contention on sorted scrub

During sorted scrub multiple threads (one per vdev) are issuing many
ZIOs same time, all using the same scn->scn_zio_root ZIO as parent.
It causes huge lock contention on the single global lock on that ZIO.
Improve it by introducing per-queue null ZIOs, children to that one,
and using them instead as proxy.

For 12 SSD pool storing 1.5TB of 4KB blocks on 80-core system this
dramatically reduces lock contention and reduces scrub time from 21
minutes down to 12.5, while actual read stages (not scan) are about
3x faster, reaching 100K blocks per second per vdev.

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

Details

Provenance
mavAuthored on Jun 15 2022, 9:25 PM
GitHub <noreply@github.com>Committed on Jun 15 2022, 9:25 PM
Parents
rGbc00d2c711c5: Add support for ARCH=um for x86 sub-architectures
Branches
Unknown
Tags
Unknown