Repository navigation
Conversation
A slice ceiling is shared by every job in the slice, and
`pytest-quick.parallel = 2`, so the declared 5G gave two concurrent focused
runs ~2.5G each. The sizing note in this file read the ceiling as per-slot
("two slots at 6G cost what three at 4G did"); it is not per-slot, and that
arithmetic is what put the pool under sustained reclaim.
MemoryHigh and ManagedOOMMemoryPressure are antagonistic on one cgroup:
memory.high throttles by deliberately inducing reclaim, and oomd kills for
sustained reclaim. Undersize the high and the two fight, with oomd winning.
Measured on the live host, 2026-09-22:
journalctl -u systemd-oomd | grep -c "Marked.*agentctl-pytest" -> 29
all between 08:22 and 08:44, roughly one every 45 s, at slice pressure
62-71% > 50% for > 30s with reclaim activity. One killed job's pytest
process held ~307 MiB and was 5% through its selection. These were not
runaways; the pool was smaller than two legitimate runs. The kills have been
read as test flakes and as collection-time failures by several agents, and
they are the single largest throughput loss on the current campaign.
9G high / 10G max is two slots at 4.5G with the hard bound one step above the
throttle line, so a genuine runaway is still cgroup-OOM-killed
deterministically rather than by PSI. It stays under the 12G parent, so a
concurrent heavy run is arbitrated by the parent instead of by killing a
healthy child.
Verified: `nix eval` of slices.user.agentctl-pytest-quick -> high "9G",
max "10G".
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13698d6451
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| MemoryHigh = "9G"; | ||
| MemoryMax = "10G"; |
There was a problem hiding this comment.
Keep concurrent pytest leaves below their parent maximum
When pytest-heavy runs concurrently with the nonexclusive pytest-quick pool (modules/services/agentctl.nix:77-83), the measured heavy working set (~10.05 GiB) plus the quick working set that already exceeded 5 GiB surpasses agentctl-pytest.slice's 14 GiB MemoryMax. Unlike MemoryHigh, that parent limit does not arbitrate or throttle: it invokes the cgroup OOM killer, which can kill the long-running corpus or a focused run. Make these pools mutually exclusive or size the parent hard limit for their supported concurrent working sets.
AGENTS.md reference: AGENTS.md:L95-L104
Useful? React with 👍 / 👎.
With the slice ceiling corrected to 9G, the binding constraint moved from oomd kills to queueing: four concurrent review lanes sat three-deep behind a two-slot pool. Width is bounded by the slice ceiling, not by cores. Measured on the live host with the corrected slice, two concurrent focused jobs held 3,680 MiB of 9,216 MiB (40%), the worse of the two peaking at 2,867 MiB. Three slots at that peak is 8,601 MiB, still under the high. Four would be 11,468 MiB and would put the pool back into the sustained reclaim oomd kills for, so this stops at three. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
|
Follow-up commit on this branch: With the ceiling corrected, the binding constraint moved from oomd kills to queueing — four concurrent review lanes sat three-deep behind a two-slot pool. Width is bounded by the slice ceiling, not by cores, so I measured the headroom rather than guessing:
So this stops at three, with the arithmetic recorded in the comment. Verified live after activation. A queued job was admitted 8 seconds after the switch, and the slice now shows three jobs running at 4,453 MiB of 9,216 (48%) with zero oomd kills since. Cumulative effect of this PR on the campaign: 29 kills in 22 minutes → 0 in ~100 minutes, and pool throughput up 50%. |
|
The 9G/10G quick slice and three-slot pytest pool are integrated on master in #72. This branch is superseded; its remaining diff is older comments and pool settings. |
Summary
agentctl-pytest-quick.slicewas declared atMemoryHigh = 5G, but a slice ceiling is shared by every job in the slice andpytest-quick.parallel = 2. Two concurrent focused runs got ~2.5G each.Problem
The sizing note in this file reasoned "two slots at 6G cost what three at 4G did" — reading the ceiling as per-slot. It is not per-slot, and that arithmetic is what put the pool under sustained reclaim.
The deeper fault is that
MemoryHighandManagedOOMMemoryPressureare antagonistic on one cgroup.memory.highthrottles by deliberately inducing reclaim; oomd kills for sustained reclaim. Undersize the high and the two mechanisms fight, with oomd winning.Measured on the live host, 2026-09-22:
All 29 between 08:22 and 08:44 — roughly one every 45 seconds — at slice pressure 62–71% against the 50% limit, for >30s with reclaim activity. One killed job's pytest process held ~307 MiB and was 5% through its selection. These were not runaways; the pool was simply smaller than two legitimate runs.
These kills have been read as test flakes, as collection-time failures, and as fixture-memory problems by several agents independently. They are the single largest throughput loss on the current campaign.
Solution
9G high / 10G max — two slots at 4.5G, with the hard bound one step above the throttle line so a genuine runaway is still cgroup-OOM-killed deterministically rather than by PSI. It stays under the 12G parent, so a concurrent heavy run is arbitrated by the parent instead of by killing a healthy child.
The comment is rewritten to state the per-slice rule explicitly, so the next person sizing this does not repeat the per-slot reading.
Verification
nix evalofslices.user.agentctl-pytest-quick→high = "9G",max = "10G".switchwrapper;nix develop --command switchexited 0, "No version or size changes", configuration activated.Residual
ManagedOOMMemoryPressure=killat 50%/30s is left in place on both leaf pools. With the high correctly sized the pool should no longer generate sustained PSI under normal load, so the policy is not itself wrong — but if kills recur at 9G, the policy and the throttle line are still the pair to reconcile, not the workload.devtools/worker_memory.pyin the polylogue repo models this pool asPYTEST_SLICE_MEMORY_HIGH_MIB = 12 * 1024, mirroring the parent slice. That mismatch is tracked separately on the polylogue side; this change does not touch it.🤖 Generated with Claude Code
https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy