Repository navigation
docs(audits): BufferPool current state - sharding bench precondition (#1297) - #4179
Merged
Merged
Conversation
The #1297 task assumed a Mutex<Vec<Vec<u8>>> baseline for a single-mutex vs sharded contention bench. The production BufferPool already uses a thread-local single-slot cache in front of a lock-free crossbeam_queue::ArrayQueue with a CAS-admission soft cap. This audit documents the current architecture, lists the remaining (non-storage) mutexes, explains why the originally-scoped comparison cannot be authored, and records what is already measured vs the gaps that the sharded-queue follow-up plan would address.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
The #1297 task assumed a Mutex<Vec<Vec<u8>>> baseline for a single-mutex vs sharded contention bench. The production BufferPool already uses a thread-local single-slot cache in front of a lock-free crossbeam_queue::ArrayQueue with a CAS-admission soft cap. This audit documents the current architecture, lists the remaining (non-storage) mutexes, explains why the originally-scoped comparison cannot be authored, and records what is already measured vs the gaps that the sharded-queue follow-up plan would address.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
The #1297 task assumed a Mutex<Vec<Vec<u8>>> baseline for a single-mutex vs sharded contention bench. The production BufferPool already uses a thread-local single-slot cache in front of a lock-free crossbeam_queue::ArrayQueue with a CAS-admission soft cap. This audit documents the current architecture, lists the remaining (non-storage) mutexes, explains why the originally-scoped comparison cannot be authored, and records what is already measured vs the gaps that the sharded-queue follow-up plan would address.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
The #1297 task assumed a Mutex<Vec<Vec<u8>>> baseline for a single-mutex vs sharded contention bench. The production BufferPool already uses a thread-local single-slot cache in front of a lock-free crossbeam_queue::ArrayQueue with a CAS-admission soft cap. This audit documents the current architecture, lists the remaining (non-storage) mutexes, explains why the originally-scoped comparison cannot be authored, and records what is already measured vs the gaps that the sharded-queue follow-up plan would address.
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
BufferPoolagainst a sharded prototype at 1/4/16/64 threads.BufferPoolno longer usesMutex<Vec<Vec<u8>>>on the buffer storage hot path; it uses athread_local!single-slot cache in front of acrossbeam_queue::ArrayQueuewith a CAS-admission soft cap. The originally-scoped baseline does not exist in this tree.docs/audits/bufferpool-current-state.md, lists the remaining (non-storage) mutexes (MemoryCapcondvar partner lock,AdaptiveBufferControllerPID state), records what the existingcrates/engine/benches/buffer_pool_contention.rsalready measures, and notes the coverage gaps (1- and 64-thread points, 4 KB / 64 KB payload axis) that the sharded-queue follow-up plan would address.Test plan
git statusclean except for the new doc file