Watch
0
0
Fork
You've already forked hyperhive
0

subagent and bash daemons: the runs' memory ceiling sits on their cgroup node, not on the unit

This commit is contained in:
damocles 2026-11-26 14:22:57 +01:00
commit 897f8af77d

View file

@ -480,10 +480,12 @@ the last drop-in because it can't read the swarm caps file,
the file carries that drop-in's `MemoryMax=`.
At boot the container derives two values from a byte count:
`BUN_JSC_forceRAMSize` (75%, claude-code's heap ceiling) and `MemoryHigh=` on
`hive-subagent-daemon` and on `hive-bash-daemon` (two thirds each; the bash
daemon's covers every bash task, so a build storm throttles before the
container's cap). Neither is in the agent's build, so a
`BUN_JSC_forceRAMSize` (75%, claude-code's heap ceiling) and
`HIVE_RUNS_MEMORY_HIGH` in `hive-subagent-daemon`'s and `hive-bash-daemon`'s
environment (two thirds each). Each daemon writes it to `memory.high` of the
cgroup node its runs live in, so a build storm throttles before the
container's cap, and the daemon itself, in a sibling cgroup, is never
throttled for what its runs use. Neither is in the agent's build, so a
changed cap reaches them at the next container start without a rebuild.
`infinity` sets neither. A missing or malformed file sets neither as well, and
`hyperhive-memory-cap-check.service` logs a warning naming the path in the