Skip to content

Add configurable BBolt sync interval for improved performance on network mounts#4169

Draft
reinkrul wants to merge 3 commits intoV5.4from
bbolt-lockremoval-v5
Draft

Add configurable BBolt sync interval for improved performance on network mounts#4169
reinkrul wants to merge 3 commits intoV5.4from
bbolt-lockremoval-v5

Conversation

@reinkrul
Copy link
Copy Markdown
Member

@reinkrul reinkrul commented Apr 10, 2026

Summary

Adds a storage.bbolt.syncinterval configuration option that controls how often BBolt flushes committed transactions to disk.

  • By default (0), every transaction is flushed immediately (existing behaviour, no change)
  • Setting a positive interval (e.g. 1s) batches flushes via a background goroutine, significantly improving write throughput on network mounts such as SMB/Azure Files

Performance tests on Azure ACI with an SMB volume mount showed ~4× improvement in transaction throughput (55 → 212 tx/s average) when combined with the read lock removal (go-stoabs#146). See the analysis in #4162 for full details.

The risk of data loss on a hard crash is low for network-replicated data, since any transactions not yet flushed will be re-synced from peers on restart.

Depends on go-stoabs#4 (WithSyncInterval).

Fixes #4162

TODO before merging

  • Release go-stoabs with go-stoabs#146 and go-stoabs#4, then update the go-stoabs dependency from the pseudo-version to the release tag

Test plan

  • Verify default behaviour is unchanged (no syncinterval set)
  • Set storage.bbolt.syncinterval=1s, confirm log line appears on startup
  • Verify data survives graceful shutdown with sync interval set
  • Performance test on SMB/network mount

🤖 Generated with Claude Code

reinkrul and others added 3 commits April 10, 2026 10:23
…ork mounts

Adds storage.bbolt.syncinterval config option that controls how often BBolt
flushes committed transactions to disk. By default (0) every transaction is
flushed immediately. Setting a positive interval (e.g. 1s) batches flushes
via a background goroutine, significantly improving write throughput on
network mounts such as SMB/Azure Files.

Relates to: #4162

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@reinkrul reinkrul changed the base branch from master to V5.4 April 10, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network notifiers fail to start, causing node to shut down

1 participant