DEPLOY: tell Bridge what to do about memory, and what not to - #74
Open
emooreatx wants to merge 1 commit into
Open
DEPLOY: tell Bridge what to do about memory, and what not to#74emooreatx wants to merge 1 commit into
emooreatx wants to merge 1 commit into
Conversation
Three questions the ansible role now has to answer, none of which were written down anywhere it looks. **Don't set MALLOC_ARENA_MAX in compose.** 0.3.63 caps arenas in the binary before the runtime is built, which keeps §2's zero-env contract intact — the one knob this process needs is not a CIRIS env var — and puts the setting where it cannot be lost by a stack redeploy or a new host. An explicit value still wins, and the boot log says which path ran, so it is checkable rather than assumed. **Size mem_limit from a measurement.** The 1.5GB on the US node was sized against an uncapped process holding ~1.46GB committed, of which ~1.4GB was allocator free-list and 44MB was live. Capped, the same work settles near 611MB. The runbook now gives the two commands — /api/v1/debug/memory for the allocator's own accounting, and the cgroup's memory.events for whether the limit is being enforced continuously — rather than a number that will be wrong the next time something changes. **Don't copy the cap to ciris-server.** Same pathology, different composition: its largest region is a ~706MB brk heap that an arena cap does not consolidate (CIRISServer#551). Better to say so here than to have someone try it and find a third of the win. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012B5ebRpgmkqskVYLZ7DH67
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Docs only. Three questions the ansible role now has to answer, none of which were written down anywhere it looks.
Don't set
MALLOC_ARENA_MAXin compose. 0.3.63 caps arenas in the binary before the runtime is built, which keeps §2's zero-env contract intact — the one knob this process needs is not a CIRIS env var — and puts the setting somewhere a stack redeploy or a new host can't quietly drop it. An explicit value in the environment still wins, and the boot log says which path ran, so it's checkable rather than assumed.Size
mem_limitfrom a measurement, not from history. The 1.5 GB on the US node was sized against an uncapped process holding ~1.46 GB committed — of which ~1.4 GB was allocator free-list and 44 MB was live. Capped, the same work settles near 611 MB. The runbook now gives the two commands rather than a number that will be wrong the next time something changes:/api/v1/debug/memoryfor the allocator's own accounting, and the cgroup'smemory.eventsfor whether the limit is being enforced continuously. Headroom reclaimed here isn't free money — it's headroomciris-serverneeds on the same host.Don't copy the cap to
ciris-server. Same pathology, different composition: its largest single region is a ~706 MB brk[heap]that an arena cap does not consolidate (CIRISServer#551). Better said here than discovered by someone trying it and finding a third of the win.🤖 Generated with Claude Code
https://claude.ai/code/session_012B5ebRpgmkqskVYLZ7DH67