core/mvcc: experimental_group_commit_delay_us#5686
Open
pereman2 wants to merge 1 commit intotursodatabase:mainfrom
Open
core/mvcc: experimental_group_commit_delay_us#5686pereman2 wants to merge 1 commit intotursodatabase:mainfrom
pereman2 wants to merge 1 commit intotursodatabase:mainfrom
Conversation
Implement group commit for MVCC: multiple concurrent transactions batch their fsync calls into a single fsync, trading commit latency for throughput - Add `PRAGMA experimental_group_commit_delay_us` to configure the batch window (0 = disabled, default) - Add `--group-commit-delay` flag to the write-throughput benchmark
Merging this PR will degrade performance by 15.72%
Performance Changes
Comparing Footnotes
|
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.
PRAGMA experimental_group_commit_delay_usto configure the batch window (0 = disabled, default)--group-commit-delayflag to the write-throughput benchmarkCurrently each MVCC commit holds the
pager_commit_lockfor the entire duration of: log write → fsync → offset advance. The fsync dominates (~milliseconds on SSD), serializing all concurrent commits.Group commit splits this: transactions write their log record and advance the offset under the lock (microseconds), then release the lock and join a SyncGroup to wait for a batched fsync. The first transaction to observe the batch window expired becomes the leader via CAS on
leader_claimed, seals the group, and issues a single fsync covering all pending writes. Followers pollsync_doneand proceed once set.New state machine flow (group commit enabled):