Skip to content

docs(audits): BufferPool current state - sharding bench precondition (#1297) - #4179

Merged
oferchen merged 1 commit into
masterfrom
bench/bufferpool-shard-comparison-1297
May 16, 2026
Merged

oferchen merged 1 commit into
masterfrom
bench/bufferpool-shard-comparison-1297

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Task Handle extended ASCII whitespace in remote shell parser #1297 asked for a Criterion bench comparing the current single-mutex BufferPool against a sharded prototype at 1/4/16/64 threads.
  • The production BufferPool no longer uses Mutex<Vec<Vec<u8>>> on the buffer storage hot path; it uses a thread_local! single-slot cache in front of a crossbeam_queue::ArrayQueue with a CAS-admission soft cap. The originally-scoped baseline does not exist in this tree.
  • Per the task fallback path, this PR documents the current state in docs/audits/bufferpool-current-state.md, lists the remaining (non-storage) mutexes (MemoryCap condvar partner lock, AdaptiveBufferController PID state), records what the existing crates/engine/benches/buffer_pool_contention.rs already 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.
  • No production code changes. No bench code added; the existing bench file is referenced as-is.

Test plan

  • git status clean except for the new doc file
  • CI: docs-only change, no compile impact expected; standard fmt+clippy and platform matrices should pass unchanged

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
oferchen merged commit a98fa67 into master May 16, 2026
8 checks passed
@oferchen
oferchen deleted the bench/bufferpool-shard-comparison-1297 branch May 16, 2026 20:39
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 16, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant