Skip to content

perf: add BufferPool lock contention benchmark - #3013

Merged
oferchen merged 1 commit into
masterfrom
perf/buffer-pool-contention-bench
Mar 23, 2026
Merged

oferchen merged 1 commit into
masterfrom
perf/buffer-pool-contention-bench

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add criterion benchmark comparing the lock-free ArrayQueue-backed BufferPool against a Mutex<Vec<Vec<u8>>> baseline
  • Measure concurrent acquire/release throughput at 1, 4, 8, and 16 threads (200 ops per thread per iteration)
  • Each thread acquires a buffer, writes to it, and releases it to simulate realistic contention patterns

Test plan

  • CI passes (fmt, clippy, nextest, all platform matrices)
  • Run cargo bench -p engine --bench buffer_pool_benchmark to verify benchmark executes correctly
  • Verify criterion HTML reports show throughput scaling across thread counts

@oferchen
oferchen force-pushed the perf/buffer-pool-contention-bench branch from 0b5ae6d to c129c1f Compare March 23, 2026 18:16
Compare ArrayQueue-backed BufferPool against Mutex<Vec> baseline
at 1, 4, 8, and 16 concurrent threads with throughput measurement.
@oferchen
oferchen force-pushed the perf/buffer-pool-contention-bench branch from c129c1f to b1e426a Compare March 23, 2026 19:22
@oferchen
oferchen merged commit fb96fbb into master Mar 23, 2026
4 of 10 checks passed
@oferchen
oferchen deleted the perf/buffer-pool-contention-bench branch March 23, 2026 19:22
oferchen added a commit that referenced this pull request May 1, 2026
Compare ArrayQueue-backed BufferPool against Mutex<Vec> baseline
at 1, 4, 8, and 16 concurrent threads with throughput measurement.
oferchen added a commit that referenced this pull request May 5, 2026
Compare ArrayQueue-backed BufferPool against Mutex<Vec> baseline
at 1, 4, 8, and 16 concurrent threads with throughput measurement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant