Scan for placeholder markers on the first line#1834
Merged
Conversation
4 tasks
oferchen
added a commit
that referenced
this pull request
May 1, 2026
) (#3499) Add an audit doc designing EMA-driven adaptive sizing for the io_uring registered buffer pool, plus the lightweight telemetry counters that the design depends on. The audit (docs/audits/io-uring-adaptive-buffer-sizing.md) covers: - Where the current sizing constants live (IoUringConfig defaults, for_large_files, for_small_files) and how they reach the pool. - Where to measure miss rate without a syscall on the hot path. - Proposed EMA design: alpha=0.2, WARMUP_SAMPLES=8, geometric grow / linear shrink, hysteresis cooldown, MIN/MAX clamps. - Integration points: Phase 1 (telemetry) lands now; Phase 2 (AdaptiveBufferSizer + resize driver) follows. - Risks: registered-buffer reallocation cost, RLIMIT_MEMLOCK, the 1024-buffer kernel cap, Drop ordering, in-flight SQEs, SQPOLL, per-checkout fetch_add overhead. Telemetry (Phase 1): - RegisteredBufferGroup carries total_acquires / total_misses AtomicU64 counters bumped inside checkout(). Cost is two Relaxed fetch_add per call; sub-percent at line rate. - A new RegisteredBufferStats snapshot type with miss_rate(), modeled on BufferPoolStats in the engine. - RegisteredBufferGroup::stats() accessor. - The stub module mirrors the API so adaptive-sizing logic compiles on non-Linux targets. - Five new unit tests cover the zero state, hit path, miss path, return-does-not-decrement invariant, and the helper math. Phase 2 (the actual AdaptiveBufferSizer + resize cycle) is intentionally not in this PR. The doc is the contract.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
) (#3499) Add an audit doc designing EMA-driven adaptive sizing for the io_uring registered buffer pool, plus the lightweight telemetry counters that the design depends on. The audit (docs/audits/io-uring-adaptive-buffer-sizing.md) covers: - Where the current sizing constants live (IoUringConfig defaults, for_large_files, for_small_files) and how they reach the pool. - Where to measure miss rate without a syscall on the hot path. - Proposed EMA design: alpha=0.2, WARMUP_SAMPLES=8, geometric grow / linear shrink, hysteresis cooldown, MIN/MAX clamps. - Integration points: Phase 1 (telemetry) lands now; Phase 2 (AdaptiveBufferSizer + resize driver) follows. - Risks: registered-buffer reallocation cost, RLIMIT_MEMLOCK, the 1024-buffer kernel cap, Drop ordering, in-flight SQEs, SQPOLL, per-checkout fetch_add overhead. Telemetry (Phase 1): - RegisteredBufferGroup carries total_acquires / total_misses AtomicU64 counters bumped inside checkout(). Cost is two Relaxed fetch_add per call; sub-percent at line rate. - A new RegisteredBufferStats snapshot type with miss_rate(), modeled on BufferPoolStats in the engine. - RegisteredBufferGroup::stats() accessor. - The stub module mirrors the API so adaptive-sizing logic compiles on non-Linux targets. - Five new unit tests cover the zero state, hit path, miss path, return-does-not-decrement invariant, and the helper math. Phase 2 (the actual AdaptiveBufferSizer + resize cycle) is intentionally not in this PR. The doc is the contract.
3 tasks
oferchen
added a commit
that referenced
this pull request
May 17, 2026
…4204) Add a Criterion benchmark that synthesises 100K, 500K, and 1M out-of-order inserts across drift windows of 32, 256, 2048, and 16K, then reports insert+drain throughput together with the peak occupancy via the `metrics().max_depth` accessor. The benchmark pre-allocates the drifted permutation outside the timed section and prints `max_depth` once per (count, drift) pair so operators can compare against in-flight dispatch capacity and decide whether the spill (#1884) or adaptive-sizing (#1834) paths are warranted. The 1M case is gated behind `BENCH_REORDER_MEMORY_1M=1` to keep default runs fast.
oferchen
added a commit
that referenced
this pull request
May 17, 2026
…#1834) (#4216) Records the design and explicit defer recommendation for an EMA-throughput feedback loop over BufferPool soft capacity. Cites current sizing knobs in crates/engine/src/local_copy/buffer_pool/, leverages the existing ThroughputTracker (alpha=0.1) and AdaptiveBufferController instead of introducing parallel state, and lists the bench thresholds prerequisite to shipping the loop.
3 tasks
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4204) Add a Criterion benchmark that synthesises 100K, 500K, and 1M out-of-order inserts across drift windows of 32, 256, 2048, and 16K, then reports insert+drain throughput together with the peak occupancy via the `metrics().max_depth` accessor. The benchmark pre-allocates the drifted permutation outside the timed section and prints `max_depth` once per (count, drift) pair so operators can compare against in-flight dispatch capacity and decide whether the spill (#1884) or adaptive-sizing (#1834) paths are warranted. The 1M case is gated behind `BENCH_REORDER_MEMORY_1M=1` to keep default runs fast.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#1834) (#4216) Records the design and explicit defer recommendation for an EMA-throughput feedback loop over BufferPool soft capacity. Cites current sizing knobs in crates/engine/src/local_copy/buffer_pool/, leverages the existing ThroughputTracker (alpha=0.1) and AdaptiveBufferController instead of introducing parallel state, and lists the bench thresholds prerequisite to shipping the loop.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4204) Add a Criterion benchmark that synthesises 100K, 500K, and 1M out-of-order inserts across drift windows of 32, 256, 2048, and 16K, then reports insert+drain throughput together with the peak occupancy via the `metrics().max_depth` accessor. The benchmark pre-allocates the drifted permutation outside the timed section and prints `max_depth` once per (count, drift) pair so operators can compare against in-flight dispatch capacity and decide whether the spill (#1884) or adaptive-sizing (#1834) paths are warranted. The 1M case is gated behind `BENCH_REORDER_MEMORY_1M=1` to keep default runs fast.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#1834) (#4216) Records the design and explicit defer recommendation for an EMA-throughput feedback loop over BufferPool soft capacity. Cites current sizing knobs in crates/engine/src/local_copy/buffer_pool/, leverages the existing ThroughputTracker (alpha=0.1) and AdaptiveBufferController instead of introducing parallel state, and lists the bench thresholds prerequisite to shipping the loop.
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
Testing
https://chatgpt.com/codex/tasks/task_e_6905623dcbcc8323ba83d38b782a4ca9