Skip to content

feat: a lane's memory counts what it owns and names its builds; main stops when only what serves its lanes runs (ADR-0119) - #626

Merged
7schmiede merged 1 commit into
mainfrom
feat/lane-memory-honest
Nov 24, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/lane-memory-honest

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

A lane of a .NET and Angular stack on a pool node showed 21.2 GB; its groups added up to 11.6 GB. The rest was the build job (51 MSBuild nodes kept warm after three rounds of parallel builds), counted in the lane but in no group. The numbers were also too high: summed resident sets count the .NET runtime's shared pages once per process (the build servers: 9.3 GB resident, 5.8 GB proportional). Stopping main while that lane ran kept companion (a singleton) for the lane, and the dashboard still showed main running with its Stop button.

Builds on #625 (its commit is the first one here until it is merged).

Review card

Approved by the owner in the conversation on 2026-11-24, points 1–4. This pull request builds 1, 2 and 4; point 3 follows in its own pull request.

# Category Point Beats Reversing costs
1 contract A native service's memory is what its processes own: Linux Pss instead of RSS, Windows the private working set instead of the whole, macOS phys_footprint instead of resident_size (CI only). Shared pages counted again with every process. Low; telemetry and stored needs drop once, old ones leave after five runs.
2 term "Builds" is a part of its own: the lane card says "of it builds X", the overview lists Builds beside the groups. 10 GB in no group. Low, dashboard only.
3 contract The need a lane reports to the pool names its builds apart; placement takes the sum, the log names the part. Needs nobody can explain. Medium: a field through node, coordinator, hub.
4 term Main counts as stopped when only what it keeps for running lanes runs; the stop names what keeps running. A stop that looks as if it did nothing. Low.

Decided on my own: a cgroup's memory is memory.current less inactive_file (as docker stats); unreadable smaps_rollup falls back to RSS, a Windows before 10 21H2 to the whole working set; a container a kept singleton comes after still counts as main running; point 3 split off, since the node measures a lane as one container and must ask the lane's daemon for its builds.

How it was checked

  • devstack-proc: per-platform tests (private part above zero and below the whole); Windows locally, Linux in rust:1.98 (clippy and tests), macOS by CI.
  • Dashboard: a store test for main with a singleton and a running lane (red with the rule switched off), the stop's toast from kept; 321 tests, typecheck, build. Seen in the worktree's lane against the mock hub: "of it builds 990 MB" in the lane card, Builds (4) below the groups.
  • cargo fmt, cargo clippy --workspace --all-targets -D warnings.

🤖 Generated with Claude Code

…stops when only what serves its lanes runs (ADR-0119)

A native service's memory is what its processes own: Linux the
proportional set (and a cgroup's memory.current without inactive_file),
Windows the private working set, macOS the physical footprint. Shared
pages, such as the .NET runtime's, no longer count once per process.

The dashboard names the build job's memory: the lane card says "of it
builds", the overview lists Builds below the groups. The mock hub keeps
its build servers warm after a build, as the daemon does.

main counts as stopped when only a singleton it keeps for running lanes
runs; its stop says what keeps running and for which lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the feat/lane-memory-honest branch from 7e90f9f to ed4f661 Compare November 24, 2026 11:51
@7schmiede
7schmiede merged commit 2ad197f into main Nov 24, 2026
14 checks passed
@7schmiede
7schmiede deleted the feat/lane-memory-honest branch November 24, 2026 12:20
@7schmiede 7schmiede mentioned this pull request Nov 26, 2026
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