Skip to content

bench(engine): adaptive vs static BufferPool under varying workloads (#1642) - #4254

Merged
oferchen merged 1 commit into
masterfrom
bench/adaptive-bufferpool-1642
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
bench/adaptive-bufferpool-1642

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • New Criterion bench crates/engine/benches/adaptive_bufferpool.rs comparing a static fixed-size BufferPool against the PID-controller-driven adaptive pool from buffer_controller.rs (Scan for placeholder markers on the first line #1834).
  • Four workload variants under the adaptive_bufferpool group: steady_uniform, bursty_small, growing, shrinking. Each runs once against static_pool and once against adaptive_pool.
  • Adaptive cell feeds record_transfer samples so the PID accumulator evolves the recommended buffer size, mirroring the production wiring in acquire_controlled_from.
  • Single-threaded measurement isolates sizing decisions from contention; buffer_pool_contention.rs already covers the contended axis.

Test plan

  • CI fmt + clippy
  • cargo bench -p engine --bench adaptive_bufferpool on a Linux runner produces the adaptive_bufferpool/{static_pool,adaptive_pool}/{steady_uniform,bursty_small,growing,shrinking} cells.
  • Workspace nextest passes (bench code is cfg(unix) via the existing criterion dev-dep gate).

Refs #1642

Adds a single-threaded Criterion benchmark that contrasts the fixed-size
BufferPool against the PID-controller-driven adaptive pool from
buffer_controller.rs across four workload shapes:

- steady_uniform - 1000 acquires of 64 KiB constant.
- bursty_small   - alternating bursts of 100 x 4 KiB and 10 x 1 MiB.
- growing        - 100 acquires each at 16 KiB, 64 KiB, 256 KiB, 1 MiB.
- shrinking      - reverse of growing.

The adaptive cell feeds record_transfer samples so the controller's PID
recommendation evolves over the run, mirroring the production wiring in
acquire_controlled_from. Companion to buffer_pool_contention.rs.

Refs #1642
@oferchen
oferchen merged commit 29c52d7 into master May 17, 2026
13 of 14 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
…4254)

Adds a single-threaded Criterion benchmark that contrasts the fixed-size
BufferPool against the PID-controller-driven adaptive pool from
buffer_controller.rs across four workload shapes:

- steady_uniform - 1000 acquires of 64 KiB constant.
- bursty_small   - alternating bursts of 100 x 4 KiB and 10 x 1 MiB.
- growing        - 100 acquires each at 16 KiB, 64 KiB, 256 KiB, 1 MiB.
- shrinking      - reverse of growing.

The adaptive cell feeds record_transfer samples so the controller's PID
recommendation evolves over the run, mirroring the production wiring in
acquire_controlled_from. Companion to buffer_pool_contention.rs.

Refs #1642
oferchen added a commit that referenced this pull request May 18, 2026
…4254)

Adds a single-threaded Criterion benchmark that contrasts the fixed-size
BufferPool against the PID-controller-driven adaptive pool from
buffer_controller.rs across four workload shapes:

- steady_uniform - 1000 acquires of 64 KiB constant.
- bursty_small   - alternating bursts of 100 x 4 KiB and 10 x 1 MiB.
- growing        - 100 acquires each at 16 KiB, 64 KiB, 256 KiB, 1 MiB.
- shrinking      - reverse of growing.

The adaptive cell feeds record_transfer samples so the controller's PID
recommendation evolves over the run, mirroring the production wiring in
acquire_controlled_from. Companion to buffer_pool_contention.rs.

Refs #1642
@oferchen
oferchen deleted the bench/adaptive-bufferpool-1642 branch May 19, 2026 19:28
oferchen added a commit that referenced this pull request Aug 24, 2026
…4254)

Adds a single-threaded Criterion benchmark that contrasts the fixed-size
BufferPool against the PID-controller-driven adaptive pool from
buffer_controller.rs across four workload shapes:

- steady_uniform - 1000 acquires of 64 KiB constant.
- bursty_small   - alternating bursts of 100 x 4 KiB and 10 x 1 MiB.
- growing        - 100 acquires each at 16 KiB, 64 KiB, 256 KiB, 1 MiB.
- shrinking      - reverse of growing.

The adaptive cell feeds record_transfer samples so the controller's PID
recommendation evolves over the run, mirroring the production wiring in
acquire_controlled_from. Companion to buffer_pool_contention.rs.

Refs #1642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant