Skip to content

refactor(memory): size admissions from one resident-memory view - #2785

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fleet/one-admission-view
Oct 1, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fleet/one-admission-view

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Worker slab sizing, decode admission and text-artifact build sizing each combined the reservation ledger with a fresh RSS measurement on their own. They now all read ProcessResidentMemoryV1::headroom_below(ceiling). That view returns the ceiling minus the larger of the charged ledger and the measured process, or zero while latched, which are the bounds reserve() already enforces. The separate measured-RSS sizing path in reserve_worker_memory is deleted.

Measured RSS is still the view's single input for the runtime and allocator memory that no owner is charged for. That memory is not yet small or fixed: 135–250 MB at rest, depending on the corpus (see #2784). So it cannot become a constant allowance yet, and this PR does not claim it has.

Tests

  • resident_memory (50 passed): the new test walks the view through ledger reservation, a ceiling, a refused oversize reserve, a measurement over the limit (latched) and the latch holding.
  • code_index_scheduler (445 passed, 1 ignored): covers slab, decode and text-budget admission.

Refs #2490, #2525

Worker slabs, decode admission, and text-artifact builds each combined
the ledger and a fresh RSS measurement themselves. They now all read
ProcessResidentMemoryV1::headroom_below: the ceiling less the larger of
the charged ledger and the measured process, zero while latched, the
same bounds reserve() enforces.

Measured RSS remains that view's input for the runtime and allocator
memory no owner is charged for; it is not yet a small fixed allowance
(155-180 MB at rest on the heavy corpus), so it cannot be replaced by a
constant.
@changeset-bot

changeset-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fec3b19

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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