]> git.hungrycats.org Git - bees/commit
rewrite: default inode-locking to no
authorZygo Blaxell <bees@furryterror.org>
Wed, 24 Jun 2026 15:42:15 +0000 (11:42 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 5 Sep 2026 04:04:12 +0000 (00:04 -0400)
commitcd220d0de7527eaaedfcdf7f31a9b2f319cb8393
tree02866d744dd787acf7f1a619241b7ee5fd7e49c6
parenteb160d0e713e168a4f3de2c4f49ee1efed5b83c7
rewrite: default inode-locking to no

Inode locking serializes FIDEDUPERANGE on the same inode by taking
per-inode mutexes for every ref of the dst/src extents before planning.
Measured behaviour shows this lowers overall dedupe throughput and
worsens IO efficiency: the task queue fills with work deferred while
waiting for an inode, so worker threads stall waiting for queue space,
and the added lock contention triggers more planner restarts, each of
which re-reads blocks.

Default the [rewrite] inode-locking option to no.  The feature is
retained for operators who want to reduce bees' external impact on
heavily accessed large files, where serializing dedupe per inode lowers
bees' competition with other readers and writers of the same file.

Only the authoritative default in bees-config-v2.cc changes; the C++
member initializer in bees.h is deliberately not kept in sync with
config defaults and the loader always overwrites it.

Assisted-by: Claude-Code:claude-opus-4-8
docs/config-file.md
src/bees-config-v2.cc