]> git.hungrycats.org Git - bees/commit
extent scan: implement an experimental ordered scan mode
authorZygo Blaxell <bees@furryterror.org>
Tue, 4 Feb 2025 04:09:32 +0000 (23:09 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 7 Feb 2025 04:14:16 +0000 (23:14 -0500)
commitaa39bddb2d23144548237a236b973abd1232a8aa
tree240fb4a8b5acf4897737f603b52958855cd922e7
parent1aea2d2f968936eccaf57f3ff69d6a6a0bb5eb3e
extent scan: implement an experimental ordered scan mode

Parallel scan runs each extent size tier in a separate thread.  The
threads compete to process extents within the tier's size range.

Ordered scan processes each extent size tier completely before moving on
to the next.  In theory, this means large extents always get processed
quickly, especially when new ones appear, and the queue does not fill up
with small extents.

In practice, the multi-threaded scanner massively outperforms the
single-threaded scanner, unless the number of worker threads is very
small (i.e. one).

Disable most of the feature for now, but leave the code in place so it
can be easily reactivated for future testing.

Ordered scan introduces a parallelized extent mapper Task.  Keep that in
parallel scan mode, which further enhances the parallelism.  The extent
scan crawl threads now run at 'idle' priority while the map tasks run
at normal priority, so the map tasks don't flood the task queue.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-roots.cc