Repository navigation
Make the system's memory reserve a setting the agent can move - #10
Merged
Merged
Conversation
The cap of all groups together was a fixed formula. The reserve for the system is now a setting (Settings → Memory, `genco memory reserve <size|default>`), 512 MB to half the RAM, the formula stays the default; it applies at once and is refused when a group's own limit would be above the new cap. `genco memory` shows the split and what the groups (now and their peak) and the system use. genco's agent may move it in small steps when the system runs short while the groups have room, or groups hit the cap while the reserve sits unused, and the daily health check looks at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `genco memory` works without a subcommand, as the docs, the agent's instructions and the health check use it; `reserve` is long-running like apply, so a closed pipe doesn't kill it halfway. - A reserve that leaves the groups less than they use now without their page cache is refused: the kernel would kill in the groups at once. - "groups now" leaves out their page cache like the system's number, so the system's use is no longer undercounted. - Limit checks take the cap from memory::groups_cap instead of a second unchecked subtraction. - Offline tests for the bounds and the clamping instead of the host's RAM. - Webui: requests in lib/api.ts, applyErrors shared with the quarantine, newest() for the reload, the tab reloads after a failed apply, the input takes digits only. - PLAN.md entry, OPERATIONS.md wrapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Follow-up to #9 (operator 2026-11-12: genco's agent should be able to raise or lower the combined limit).
memoryin settings): Settings → Memory,genco memory reserve <size|default>, POST /settings/memory (runs apply). Bounds 512 MB to half the RAM; the old formula is the default. A limit a group already has stays allowed above the new cap (as in Cap all groups together and alert on real memory shortage #9).genco memory/ GET /settings/memory: RAM, swap, reserve (set or default, bounds), cap, the groups' limits added up, groups now and peak (genco.slice memory.current/peak), system now.genco memory.Tested on the test server: 1G and 100M refused (max 986 MB on 2 GB), 900M -> genco.slice MemoryMax 1073M, default -> 1205M, sites up.
🤖 Generated with Claude Code