Skip to content

Commit 46bdf5e

Browse files
author
gluck
committed
storm-triage: S6 -- the open turn recomposes whole per frame (157MB of the live heap), and GOMEMLIMIT keeps the arena
1 parent fd83ef8 commit 46bdf5e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎plans/storm-triage.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,3 +736,32 @@ for this), or better (b) attending a ROLE attends its target-aria --
736736
the semantic that matches "send @role reaches whoever holds it", and
737737
which would have put Gluck on 6ec957ee. Either way the autoCreate must
738738
not fire when the attended id EXISTS but is not a conversation.
739+
740+
### S6 (2026-08-15, live daemon at RSS 1.86 GB): the OPEN turn is unbounded
741+
742+
doctor mem said `ui window resident=9.1 MiB of 16.0` while the heap
743+
profile put compose.Nodes at 157.7 MB cumulative (44% of live heap).
744+
Both are true: the turn cache bounds SEALED turns; the profile's mass is
745+
the OPEN one. pprof -traces names the path:
746+
747+
driveOneRound -> composeTurn -> projNodes -> compose.Nodes
748+
749+
The producer recomposes the WHOLE streaming region on every frame (it
750+
reads the turn's messages back from the log; see server.go's baseTurn
751+
comment). For a long agentic turn -- many tool calls, large outputs --
752+
that is O(turn size) per frame, live, and nothing bounds it. Four such
753+
arias reached 157 MB of composed nodes.
754+
755+
Second half of the RSS number: heap inuse 854.7 MiB but sys 2.2 GiB,
756+
against GOMEMLIMIT 2.0 GiB. The runtime has no reason to return arena
757+
below its own ceiling, and RSS tracks sys, not inuse.
758+
759+
PRESCRIPTIONS:
760+
1. NOW, no code: soft_limit_mb 512-1024 in [memory]. Go then collects
761+
harder and hands the arena back; expect RSS to track inuse far more
762+
closely.
763+
2. THE FIX: make the live region incremental -- recompose only the
764+
nodes past the last frame's boundary instead of the whole region --
765+
or bound it the way the sealed section is bounded. This belongs in
766+
plans/ui-ir-tree.md's scope: that design bounds sealed turns and
767+
assumed the open one was small. It is not.

0 commit comments

Comments
 (0)