Repository navigation
Conversation
Both schedulers track a byte budget but expose nothing about it, so its actual behaviour is unobservable: the only available measurement is whole-process RSS, which cannot separate scheduler prefetch from decode buffers from a caller's own working set. Adds a high-water mark of bytes reserved and not yet released, the current value of the same quantity, and a count of chunks admitted although the budget did not cover them -- because nothing of lower priority was in flight, or because the chunk belonged to a request already in flight. That last number is where the budget is soft rather than hard, and the only evidence it happens at all was a debug log. It counts post-coalescing chunks, so one caller request may contribute several. Surfaced through `ScanScheduler::backpressure_stats()` alongside the existing `stats()`. Both the standard and the lite scheduler report it, so the numbers mean the same thing whichever is in use; reporting zeroes for one of them would be indistinguishable from a budget that was never approached. Two quantities stay deliberately outside these counters, and the struct doc says so: reads from a `bypass_backpressure` file scheduler, which are never debited and bounded by nothing, and everything under `io_buffer_size == 0`, which disables byte accounting altogether. Covered by extending four existing tests: `test_backpressure` for the peak and the over-budget count, `test_lite_scheduler_submits_eagerly` for the lite path, `test_file_scheduler_bypass_backpressure` for the bypass exemption, and `test_zero_buffer_size_no_backpressure` to pin that a disabled budget reports nothing rather than a measured zero. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Both schedulers track a byte budget but expose nothing about it. The only
available measurement is whole-process RSS, which cannot separate scheduler
prefetch from decode buffers from a caller's own working set.
ScanScheduler::backpressure_stats()reports, alongside the existingstats():max_bytes_in_flight— high-water mark of bytes reserved and not yet released.bytes_in_flight— the same quantity now.over_budget_admissions— chunks admitted although the budget did not coverthem, because nothing of lower priority was in flight or the chunk belonged to
a request already in flight. This is where the budget is soft rather than hard,
and the only evidence it happens at all was a debug log.
Both the standard and the lite scheduler report these, so the numbers mean the
same thing whichever is in use. Reads from a
bypass_backpressurefilescheduler are never debited and stay outside every field, as does everything
under
io_buffer_size == 0, which disables byte accounting; the struct docstates both.
Additive: one new public struct and one accessor, no behaviour change.
Tracking: Ported from rerun-io#63.