Repository navigation
Description
Summary
E11 found knee=8, bound=replenishment on both arms at the tested configuration (StandbyDepth D=2, fixed guest RAM 256 MiB — see the e11-ladder-microvm-d2-ram256.json filename and the vmpool.Config defaults in remote-worker/internal/vmpool/config.go: DefaultStandbyDepth = 2). Before reaching for more worker processes (#259), this issue asks whether the knee is a property of that specific config default — one replenishment in flight per run pool, a shallow standby depth — rather than a structural ceiling.
Why this matters
- Cheapest possible lever: same experiment infrastructure as the existing E11 driver, just vary
SH_STANDBY_DEPTH(and possibly how many concurrent replenishments a singlerunPoolis allowed to have in flight — seeremote-worker/internal/vmpool/runpool.go'swarming int // replenishments in flightfield, which is currently a per-run-pool counter, not obviously multiplexed). - Host resource headroom (CPU 0.001, memory 0.41 GB at 128 VMs) suggests there's room to hold deeper standby pools or run more replenishments concurrently without hitting any hardware limit — the question is whether the code currently allows it.
- Directly complements P4: worker-process parallelism — does N microvm-worker processes give N× throughput? #259 (worker parallelism) rather than competing with it: this tests whether you can push the knee out on one worker before deciding you need more workers.
What's already known / where to look
remote-worker/internal/vmpool/config.go:StandbyDepth int // D,DefaultStandbyDepth = 2.ReplenishDelay time.Duration // grace before refilling a popped slot,DefaultReplenishDelay = 200 * time.Millisecond.remote-worker/internal/vmpool/runpool.go: eachrunPool(one per workspace_key/session) trackswarming int // replenishments in flightand has asettled chan struct{}that a cold acquire waits on "rather than starting a second warming" — i.e., the current code appears to cap replenishment concurrency at one in-flight rebuild per run pool, which may be exactly what's capping the pool's overall replenishment throughput once enough run pools are cycling standbys simultaneously. Worth confirming this reading against the actual acquire/replenish code path before designing the sweep.- E11 driver:
deploy/microvm/e11-density.shalready supports sweepingD_VALUESandRAM_MB_VALUES(seestart_microvm_stack "$d" "$ram_mb" "$max_c"and the nested loop inmain()) — the metal run only exercised one (D, RAM) point, so the sweep machinery for D already exists and is unused.
Open questions for the spec
- Is the "one warming in flight per run pool" reading above correct, and if so, is it a per-run-pool limit (would need more concurrent runs to see it bind) or is there also a pool-wide replenishment concurrency cap?
- Does raising D just delay the knee (more standbys to burn through before going cold) without raising the sustained throughput ceiling, or does it actually change the steady-state rate? These are different claims and the sweep should distinguish them (e.g., run long enough at each D to reach steady state, not just to exhaust a bigger initial buffer).
- What's the right independent variable — D alone, or also whatever governs per-run-pool replenishment concurrency (if that's a separate, changeable parameter)?
Suggested scope for a first cut
Repeat the existing c-sweep (1, 2, 4, 8, 16) at D=2 (baseline, already have this), D=4, and D=8, holding everything else fixed, and see whether the knee moves and by how much, and whether steady-state throughput past the old knee improves or just the point of first degradation shifts.
Part of rossoctl/moca-experiments#3 (P4 epic: next experiments after the metal STOP).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
pdettori commentedon Sep 17, 2026
Epic: rossoctl/rossoctl#2546 (Stream 2 — microVM sandbox tier, via sub-epic rossoctl/serverless-harness#256)
Status update (2026-09-17)
Still open, no PR yet. Directly motivated by E11 (
deploy/microvm/EXPERIMENTS.md):throughput peaks at c=16 then declines while p95 grows tenfold by c=64, and the bound
is replenishment on both the microVM and container arms — this issue is the sweep over
standby depth (
D) and replenishment concurrency needed to locate which of those twoknobs the c=8 knee actually traces to.
Assisted-By: Claude (Anthropic AI) [email protected]
pdettori commentedon Sep 21, 2026
Answered: the knee does not move with
D, and the bound is a rate, not capacityThis issue's suggested first cut has now been run on bare metal as part of the #291 re-run —
SH_E11_D_VALUES="2 4 8", microVM arm, c=1…64 (wider than the 1…16 suggested here), 21/21 rungs,exit 0, on
srv-r16b14s16with the Go Exec client andSH_E11_COLD_LATENCY_MS=94.Quadrupling
Dmoves nothing — knee, replenishment crossing and throughput peak all stay atc=8. AndDwas demonstrably in effect, which is what makes this a real negative rather than asilent no-op: resident standbys went 52 → 439 and Σ PSS 0.324 → 1.443 GB.
Open question 2, answered explicitly
Neither. It does not delay the knee and it does not raise the sustained ceiling.
Dhelps onlybelow the knee, which is the signature of a buffer against a rate limit:
A deeper buffer smooths bursts while demand is under the refill rate (c=1 p95 improves 73.0 →
55.8 ms). Past the knee it buys nothing, and at c=64 it is slightly worse while costing 4.5× the
memory.
Why:
replenish.gocaps supply structurallyRefills are one-at-a-time by design — "One timer per slot rather than a burst, so a finished Exec
does not create D VMs in the same instant" — and the next refill is only scheduled after the
previous completes, each behind a 200 ms
ReplenishDelay. So per-pool warm supply is roughly1/(200 + 23 ms) ≈ 4.5 VMs/s whatever
Dis. Buffering cannot fix a rate deficit. The flat~61–62 Exec/s plateau at every
Dsays the same thing.So standby-depth sizing is not the lever for this knee.
ReplenishDelayand theone-timer-per-slot serialization are.
Also worth recording: nothing else binds.
coresBusyis 4.8–5.2 of 72 at c=64 in every ladder, ΣPSS is 1.4 GB of 754 GiB, and admission refused nothing (
SH_MAX_COMMITTED_MBwas raised to409600 first, because a refused refill converts into a cold acquire by design and would have
corrupted the very metric this sweep reads).
Two caveats on the numbers above
baseline, which
Dimproves, so the limit tightens to 111.68 ms and c=8's 110.45 ms clears it by1.1%. The throughput peak is the robust indicator here and says 8 unambiguously at all
three D.
hostCpuSamplesat c=64 fell 272 → 223 → 155 as thePSS walk grew to ~500 processes. Every rung still cleared ≥16, so all figures are quotable, but
size cadence accordingly at high
D.Full write-up, with the audit fields per rung, in EXPERIMENTS.md §"Issue #291 — the re-run"
(PR #300).
Carried forward, not dropped
Closing this as answered on its stated scope (open question 2 and the suggested first cut).
Open questions 1 and 3 — whether replenishment concurrency is capped per run pool or pool-wide, and
what the right independent variable is if
Dis not it — are not answered here, and they are nolonger a c-sweep. One relevant code reading, for whoever picks it up:
replenishOnecallsp.mu.Unlock()beforep.warm(...), so restores are not serialized by the pool mutex andalready can overlap; yet 62 Exec/s against E10's 23.06 ms restore implies only ~1.4-way effective
restore concurrency. Something in the restore path serializes and it is not
pool.mu.Whether that serializer is per-process or host-wide is exactly what #259 tests, so that
diagnostic now belongs with #259's outcome rather than as a standalone sweep — plan in
docs/notes/e259-worker-parallelism-runbook.md(PR #301). If #259 comes back "host-wide", thisthread's remaining half becomes the main event and should be reopened or re-filed then.