Files
src/include
Alexander Motin 5fea0c838a Parallelize metaslab_sync_done() calls
Some of our random write benchmarks on a fragmented pool show that
single-threaded portion of sync process (txg_sync_thread) can use
up to 45% of CPU time.  Most of it is consumed by metaslab_sync()
and metaslab_sync_done(), during which time the pool is not doing
anything else.

While metaslab_sync() is not trivial to parallelize due to having
single spacemap log, metaslab_sync_done() is doing only per-metaslab
accounting and they can run in parallel.  Even better, we can run
them while waiting for vdev label update and cache flush I/Os.

With this patch on my test system similar test randomly writing 12
100GB files with 4KB blocks shows IOPS increase from 176K to 220K.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18622
2026-06-04 13:25:40 -07:00
..
2025-03-13 17:56:54 -07:00
2025-03-13 17:56:27 -07:00
2024-02-05 10:00:41 -08:00
2026-04-08 10:09:47 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-08-06 10:31:21 -07:00
2025-09-12 09:53:31 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00