Add configurable BBolt sync interval for improved performance on network mounts#4169
Draft
Add configurable BBolt sync interval for improved performance on network mounts#4169
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
storage.bbolt.syncintervalconfiguration option that controls how often BBolt flushes committed transactions to disk.0), every transaction is flushed immediately (existing behaviour, no change)1s) batches flushes via a background goroutine, significantly improving write throughput on network mounts such as SMB/Azure FilesPerformance 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
go-stoabsdependency from the pseudo-version to the release tagTest plan
syncintervalset)storage.bbolt.syncinterval=1s, confirm log line appears on startup🤖 Generated with Claude Code