You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
investigate: CPU/memory load over time + parallelism sweet spot on the sandbox VM #7011
Execution issue for tracked goal CPU/memory load over time + parallelism efficiency (goal_8c75ed164542). Filed 2026-11-07 on Drew's ruling that the census "dead" goals were dormant because the fleet never ran work against them.
Question
What concurrency level makes the sandbox VM (and the laptop executors) finish the most work per credit? Drew's framing: CPU near 99% because it's performing at peak is the target — 95% while 35 things complete beats 8-vs-6 things grinding the whole box to a halt. Find the concurrency sweet spot empirically, then fold the answer into delegation/orchestration practice.
Plan
Baseline: load profile snapshot (done — first comment on this issue, 2026-11-07 18:49 CST)
Sampled profile over time: load average, run-queue depth, CPU user/sys/idle/iowait/steal, memory + swap pressure, sampled across busy and quiet windows (not just one evening snapshot)
Concurrency sweep: run controlled parallel work at several lane/agent concurrency levels and measure completed-work throughput + latency degradation per level
Identify the noisy-neighbor cliff: the level where context-switch / iowait / steal growth eats the gains
Write the delegation battle plan: who orchestrates, how work is tracked, concurrency defaults per machine, coordination-chatter budget
Fold the defaults into the orchestration / lane runbooks so the finding changes behavior, not just this issue
Acceptance
A measured sweet-spot number (per machine class) with the data behind it
Runbook/orchestration defaults updated to the measured number
The swarm delegation battle plan recorded and linked from the goal
First empirical data point, taken while the evening fleet was running hot (post-registry-fix claim surge). This is the baseline the investigation compares against.
Load: load average 11.84 / 9.20 / 7.85 on 4 cores — roughly 2–3× oversubscribed.
vmstat (2s × 6 samples):
Run queue r: 15, 15, 16, 4, 12, 8 — deep queues against 4 cores
CPU: user 56–69%, sys 18–25%, idle only 7–11%, iowait 5–9%, steal 1–3%
Context switches: 25k–53k per interval — heavy churn
Memory: 3,650 MB used, 4,284 MB available, ~4.6–4.8 GB page cache; no swap-in/out during the window
Top consumers at snapshot:
hatch daemon (the agent runtime): 47% CPU, 684 MB RSS — the single largest consumer
hatch-execd: 7% CPU, 62 MB RSS
A du -sb /home/hatch/nix-persist scan: ~6% CPU
Multiple concurrent lane execs visible in flight via laptop-agent (research-workflow reads, an mcpx conformance commit/push, gh API calls)
Read: the box already runs near Drew's "CPU busy" target, but with run queues 2–4× core count and sys% at 18–25%, a real share of that busy is coordination overhead rather than completed work — exactly the noisy-neighbor question this goal exists to answer with a controlled sweep rather than one snapshot.
agent-note:v1
state: filed + enqueued
Agent: dead-goals-kickoff lane (Drew ruling 2026-11-07 18:47 CST — the census 'dead' goals were dormant, not dead; this is the CPU/memory + parallelism investigation goal's first execution work order)
Queue: repo-health-code-pilot task 11420
Baseline at filing (18:49 CST): load 11.84/9.20/7.85 on 4 vCPU, idle 7–11%, sys 18–25% — box busy but coordination-heavy.
Agent note - handed off. Agent: queue worker repo-worker-code, lane code-w. Session/ID: task 11420. Found via: queue claim. Task: task 11420 triage for issue #7011 claimed by lane code-w and revalidated fresh via gh: issue #7011 OPEN, no hard-stop labels. Execution-lane assignment returned assigned_lane=opencode, so per instruction 1b this task is handed off to the opencode claimant; parked 1200s pending claimant launch. Expectation: claimant launches the bound opencode session and drives task 11420 to a terminal state; if no launch before park expiry, task 11420 returns to the queue. Links: issue #7011. agent-note:v1 agent=repo-worker-code lane=code-w state=handed-off task=11420
Reason: no direct sandbox-VM status path is available from this laptop; ssh sandbox failed DNS resolution. The laptop is not a valid proxy for sandbox load/memory, and no load was generated.
Resume condition: direct read-only sandbox access becomes available; verify >1h uptime, sustained load below core count, and MemAvailable in the recorded steady-state band before any remaining representative lane-level check.
agent-note:v1 — pickup by lane oc-code-08, task 14822, 2026-11-22T12:43Z. Fresh verification: #7011 OPEN; #12388 merged as 7466c4e. Existing per-cell measurement and reversible runbook defaults are complete. This laptop has no direct sandbox status route (ssh sandbox fails DNS resolution); laptop load is not a proxy. No load was generated. I am re-parking on direct sandbox-read access, not an owner decision.
🤖 Agent note · quiet-window gate NOT met again — passive sampling only, no sweep run (task 14822, issue #7011)
Agent: fleet seat xaltha; task 14822 claimed from queue repo-health-code-pilot. Issue investigate: CPU/memory load over time + parallelism sweet spot on the sandbox VM #7011 OPEN, no hard-stop labels, no PRs attached. Per-cell measurement program remains complete (four corroborating windows); no synthetic sweep re-run, no load generated this shift.
New data point — sandbox VM, read directly from /proc, 2026-11-22 13:51:20–13:53:00Z (4 vCPU / 7934 MiB total; VM uptime 8,854 → 8,945 s, ~2h28m — no restart in the preceding hour):
Series 1 (7 samples, 15 s apart): load1 0.60, 0.61, 0.54, 0.50, 0.46, 0.36, 1.25. MemAvailable 1,101,352 → 945,180 kB (1.05 → 0.90 GiB), falling through the whole series.
Both series corroborate each other (raw logs kept in the session, /tmp/load-series1.log and /tmp/load-series2.log).
Gate reading: uptime leg PASSES, load leg PASSES (sustained <4, mostly <1.5), memory leg FAILS decisively — MemAvailable crossed below the sweep design's 1 GiB abort threshold during the window and sits far below the 1.5 GiB admission gate now on main. A spot read minutes later recovered to ~1.17 GiB, still below the gate.
New sharpening of the memory finding: this is the first window where load is QUIET (load1 0.36–1.45) while memory still drains ~200 MB over two minutes. The MemAvailable gate catches what load alone would miss — again, and now at low load, so the pressure is not load-driven. No single hog: largest RSS is the hatch daemon at ~288 MB (down from 684 MB in the 2026-11-07 baseline); tailscaled ~35 MB; fleet daemons a few MB each. The drain is aggregate across lanes plus ~1.3 GB page cache — consistent with memory being the VM-level constraint while CPU is not the binding limit here.
Verification done this shift — one acceptance item is already met: the runbook defaults are on main. doc/agents/owner-preferences.md carries "Resource defaults (provisional, 2026-11-22; evidence: investigate: CPU/memory load over time + parallelism sweet spot on the sandbox VM #7011)": sandbox exec cell ≤2 CPU-bound workers, MemAvailable admission gate 1.5 GiB, laptop ≤ logical-core count — committed 2026-11-21 by Drewry Pope (e25c374d0 sandbox defaults, 9314e6dcc laptop guidance). The issue's "runbook/orchestration defaults updated" checkbox can be ticked on that basis.
Remaining acceptance unchanged: representative lane-level sweep + noisy-neighbor cliff (needs a genuinely quiet steady-state window — load <4 sustained AND MemAvailable at steady-state levels, not ~1 GiB — or a Drew-approved window; a single lane cannot vary fleet-wide lane concurrency alone), and the swarm delegation battle plan (draft in comment 6815969433) linked from goal goal_8c75ed164542 — the goal record lives in the PM system, not the repo, so that link needs a lane with goal access.
Resume condition: on park expiry, re-test the quiet-window gate passively; resume for the lane-level sweep only if the gate passes cleanly or a Drew-approved window exists.
Activity
developing-today commentedon Nov 8, 2026
CODE-2225
dezren39 commentedon Nov 8, 2026
Baseline snapshot — sandbox VM, 2026-11-07 18:49 CST (00:49:45Z)
First empirical data point, taken while the evening fleet was running hot (post-registry-fix claim surge). This is the baseline the investigation compares against.
Machine: 4 vCPU, 7,934 MB RAM, 1,023 MB swap (350 MB used).
Load: load average 11.84 / 9.20 / 7.85 on 4 cores — roughly 2–3× oversubscribed.
vmstat (2s × 6 samples):
r: 15, 15, 16, 4, 12, 8 — deep queues against 4 coresTop consumers at snapshot:
hatch daemon(the agent runtime): 47% CPU, 684 MB RSS — the single largest consumerhatch-execd: 7% CPU, 62 MB RSSdu -sb /home/hatch/nix-persistscan: ~6% CPURead: the box already runs near Drew's "CPU busy" target, but with run queues 2–4× core count and sys% at 18–25%, a real share of that busy is coordination overhead rather than completed work — exactly the noisy-neighbor question this goal exists to answer with a controlled sweep rather than one snapshot.
dezren39 commentedon Nov 8, 2026
agent-note:v1
state: filed + enqueued
Agent: dead-goals-kickoff lane (Drew ruling 2026-11-07 18:47 CST — the census 'dead' goals were dormant, not dead; this is the CPU/memory + parallelism investigation goal's first execution work order)
Queue: repo-health-code-pilot task 11420
Baseline at filing (18:49 CST): load 11.84/9.20/7.85 on 4 vCPU, idle 7–11%, sys 18–25% — box busy but coordination-heavy.
developing-today commentedon Nov 8, 2026
Agent note - handed off. Agent: queue worker repo-worker-code, lane code-w. Session/ID: task 11420. Found via: queue claim. Task: task 11420 triage for issue #7011 claimed by lane code-w and revalidated fresh via gh: issue #7011 OPEN, no hard-stop labels. Execution-lane assignment returned assigned_lane=opencode, so per instruction 1b this task is handed off to the opencode claimant; parked 1200s pending claimant launch. Expectation: claimant launches the bound opencode session and drives task 11420 to a terminal state; if no launch before park expiry, task 11420 returns to the queue. Links: issue #7011. agent-note:v1 agent=repo-worker-code lane=code-w state=handed-off task=11420
209 remaining items
dezren39 commentedon Nov 22, 2026
🤖 Agent note · parked task 14822 for #7011
ssh sandboxfailed DNS resolution. The laptop is not a valid proxy for sandbox load/memory, and no load was generated.7466c4e50839ea67a062d5c425f077ee06889e39; provisional defaults/runbook work and per-cell measurements are already recorded.dezren39 commentedon Nov 22, 2026
agent-note:v1 — pickup by lane oc-code-08, task 14822, 2026-11-22T12:43Z. Fresh verification: #7011 OPEN; #12388 merged as 7466c4e. Existing per-cell measurement and reversible runbook defaults are complete. This laptop has no direct sandbox status route (
ssh sandboxfails DNS resolution); laptop load is not a proxy. No load was generated. I am re-parking on direct sandbox-read access, not an owner decision.dezren39 commentedon Nov 22, 2026
🤖 Agent note · quiet-window gate NOT met again — passive sampling only, no sweep run (task 14822, issue #7011)
doc/agents/owner-preferences.mdcarries "Resource defaults (provisional, 2026-11-22; evidence: investigate: CPU/memory load over time + parallelism sweet spot on the sandbox VM #7011)": sandbox exec cell ≤2 CPU-bound workers, MemAvailable admission gate 1.5 GiB, laptop ≤ logical-core count — committed 2026-11-21 by Drewry Pope (e25c374d0sandbox defaults,9314e6dcclaptop guidance). The issue's "runbook/orchestration defaults updated" checkbox can be ticked on that basis.