Repository navigation
Description
Summary
E11's density ladder reports a knee at c=8 on both arms — the microVM arm and the container
baseline — with nearly identical curve shape: throughput plateaus then declines, p95 grows 13-27x, and
coldAcquireRate climbs to 1.0. EXPERIMENTS.md concludes from this that "bound is
replenishment on both arms" and that "nothing resembling a CPU or memory ceiling was reached."
That two structurally different backends saturate at the same c with the same shape is itself the
tell. Reading deploy/microvm/e11-density.sh against the saved metal rung records turns up two
mechanical defects in the instrument, both of which affect both arms identically by construction,
and either of which is sufficient to produce the observed shape with no contribution from the backend
at all.
This issue is to fix the instrument and re-run, because the current E11 numbers cannot distinguish
"replenishment binds at c=8" from "the driver binds at c=8."
Defect 1: every host-side resource signal is sampled on an idle host
host_signals_snapshot is called at e11-density.sh:1051. By that point:
- line 957-959 —
for pid in "${pids[@]}"; do wait "$pid" ...— every slot subshell has exited - line 962 —
wall_t1="$(date +%s%N)"— the throughput window is already closed
Then host_cpu_fraction 1 (line 461-476) sleeps one second and diffs /proc/stat across that
window. So hostCpuFraction, memAvailableBytes, and pssBytes are all measurements of a quiesced
machine, taken after the load ended. The script's own comment states the timing without drawing the
consequence: "the microvm arm's IN-RUNG snapshot, taken immediately after the slots finish"
(line 1042-1043).
The recorded numbers contain their own falsification. hostCpuFraction is 0.0006 on a 72-cpu
host = 0.043 cores busy. The same rung completed ~41 Exec/sec, each of which spawns ~9 processes
(see Defect 2) — on the order of 370 process creations per second. That cannot happen on 4% of one
core. 0.0006 is not a low measurement; it is a measurement of nothing.
Consequently EXPERIMENTS.md:717 — "Nothing resembling a CPU or memory ceiling was reached" — has
no evidentiary basis, and the reasoning chain built on it (CPU ruled out → memory ruled out →
therefore replenishment) rests on two artifacts. "Replenishment" was then inferred from
coldAcquireRate, which the script itself discloses is only a ≥145 ms latency threshold
(proxyLimitations.coldAcquireRate, and header line 100-105: "not the real replenishment signal — no
stats endpoint exists") — a threshold applied identically to the container arm, which has no
replenishment mechanism whatsoever.
Defect 2: ~9 process spawns per Exec, two of them Python interpreters, inside the timed window
grpc_exec_record (line 586-615) does, per single Exec: mktemp, date, json_escape "$cmd",
json_escape "$workspace_key", grpcurl, date, rm — plus wc -l twice in the caller's loop
guard (lines 942, 946).
json_escape is python3 -c 'import json,sys; ...' (line 536-538). That is two full Python
interpreter startups per Exec, and because t0 is stamped at line 590 before the
if grpcurl ... compound whose argument list contains both command substitutions, both fall inside
the measured latency. grpcurl additionally re-parses the .proto from disk (-import-path /
-proto) and establishes a fresh connection on every call.
At c=64 that is ~64 concurrent slots × ~9 spawns, continuously — a fork/exec storm that
self-contends. Python interpreter startup under that contention inflates from ~20 ms to hundreds of
ms. The observed p95 at c=64 is 2138 ms.
Critically, run_density_rung's own comment (line 872-875) establishes that this cost is shared
identically: "Called identically for the container arm and the microvm arm (only sandbox_id,
relay_port, and whether workspace_key is empty differ at the CALL SITE) — this is what makes 'both
arms driven by the same code path' true structurally rather than by claim."
Defect 3 (minor): converge sits in the throughput denominator
wall_t0 is stamped at line 901, before the slot loop; each slot then runs converge_slot at line
927, inside the timed window; wall_t1 closes at line 962. So throughput = all_ok / wall_s
includes each slot's converge time. The header claims converge is recorded separately "so a slow
fetch cannot misread as a throughput ceiling" (line 51-56) — but that separation only ever applied to
p50/p95, never to throughput. At c=64 it inflates the denominator by roughly 4%.
The saved metal data, so this need not be re-derived
Raw per-rung records from the authoritative metal run (/tmp scratch — treat as ephemeral, the
table below is the durable copy): /tmp/kagenti/cleanup/metal-results/.results/e11-rung-*.json,
plus ladder aggregates e11-ladder-container.json and e11-ladder-microvm-d2-ram256.json (arrays of
the same records).
| arm | c | throughput | p95 ms | coldAcqRate | hostCpuFrac | procCount | standbysRes | memAvail GB | convergeMsP50 |
|---|---|---|---|---|---|---|---|---|---|
| container | 1 | 9.68 | 78 | 0.0 | 0.0216 | 0 | 0 | 802.38 | 236 |
| container | 2 | 20.96 | 73 | 0.0 | 0.0006 | 0 | 0 | 802.51 | 90 |
| container | 4 | 38.15 | 83 | 0.0 | 0.0006 | 0 | 0 | 802.44 | 109 |
| container | 8 | 55.32 | 124 | 0.0 | 0.0006 | 0 | 0 | 802.30 | 151 |
| container | 16 | 57.03 | 333 | 0.6531 | 0.0006 | 0 | 0 | 802.35 | 303 |
| container | 32 | 49.15 | 840 | 0.9719 | 0.0004 | 0 | 0 | 802.30 | 629 |
| container | 64 | 41.30 | 2138 | 0.9891 | 0.0006 | 0 | 0 | 802.31 | 1547 |
| microvm | 1 | 6.73 | 124 | 0.0 | 0.0006 | 2 | 1 | 802.69 | 153 |
| microvm | 2 | 13.01 | 121 | 0.0 | 0.0007 | 4 | 2 | 802.58 | 154 |
| microvm | 4 | 23.37 | 142 | 0.025 | 0.0006 | 8 | 4 | 802.08 | 201 |
| microvm | 8 | 39.04 | 175 | 0.2188 | 0.0007 | 16 | 8 | 801.97 | 205 |
| microvm | 16 | 43.31 | 353 | 0.8375 | 0.0006 | 31 | 15 | 801.89 | 399 |
| microvm | 32 | 35.00 | 788 | 1.0 | 0.0008 | 64 | 32 | 801.59 | 773 |
| microvm | 64 | 32.84 | 1686 | 1.0 | 0.0004 | 128 | 64 | 801.20 | 1624 |
Every published observation is reproduced by the driver artifacts alone, with no appeal to the
backend:
| observation | driver-artifact explanation |
|---|---|
| identical curve shape on both arms | run_density_rung is invoked identically (line 872-875) |
knee at c=8 on both arms |
the driver saturates at the same c regardless of backend |
| throughput plateaus then declines | fork-storm self-contention |
| p95 grows 13-27x | process-creation queueing |
hostCpuFraction flat at 0.0006 |
sampled after the storm ended |
coldAcquireRate → 1.0 on the container arm |
it is a latency threshold, and latency rose for driver reasons |
What the data does still support is the roughly constant offset between arms — container ~1.28x
faster at saturation, closely tracking E10's independently measured 1.29x ratio. The plausible reading
is that the offset is real microVM cost and the shape is the instrument. Confirming that is the
point of the re-run.
Honest statement of claim strength
Defects 1, 2, and 3 are mechanically verified against the file at the cited lines and against the
recorded values. That the defects cause the observed curve shape is a strong inference, not yet
a measurement — exactly the distinction rossoctl/moca-experiments#7 draws for E13. Proving it requires the fixed instrument
to be re-run: if the knee moves, flattens, or disappears once the driver stops dominating, the
inference is confirmed; if the knee survives at c=8 with real in-rung CPU data, then replenishment
was the answer all along and only the evidence was bad, not the conclusion.
What this invalidates, and which issues inherit it
deploy/microvm/EXPERIMENTS.md§E11 — the "bound is replenishment on both arms" claim
(~line 715), the "no CPU or memory ceiling was reached" claim (~line 717-719), and the knee
position. Sealed prediction 3's SUPPORTED score is also derived fromcoldAcquireRate's shape and
should be re-examined.- #262 (score sealed prediction 1) — its stated premise is "
hostCpuFractionstayed ~0.001 flat
and Σ PSS never exceeded 0.41 GB". Both figures are post-load samples. P4: test the admission gate directly — sealed prediction 1 cannot be scored by sweeping slots (memory 1%, CPU 66-70% at 256 slots) moca-experiments#6 may be differently
scoped, or already answerable, once real in-rung sampling exists. - P4: repeat the authoritative E10/E11 ladders on nested virtualization to get a metal/nested ratio #266 (repeat E10/E11 on nested for a metal/nested ratio) — ratios computed with this instrument
would inherit the artifact on both sides. Worth sequencing after this fix. - #275 (E8 VM density + saturation) and #261 (E11 with a real model in the loop) — both would
build on the same driver. - E10 rung 1 is partially affected:
grpc_exec_msine10-lifecycle.shalso callsjson_escape
inside its timed window (one Python startup per Exec, not two). E10 rung 1 is sequential, so there
is no fork storm and no concurrency artifact — but its 41 ms container baseline p50 does contain a
Python interpreter startup, which matters for the §7.2 ratio.
Do not edit deploy/microvm/predictions.json — it is SHA-256 pinned and enforced by
pnpm -C experiments exec vitest run microvm-predictions, sealed specifically so predictions cannot be
adjusted to fit results. Re-scoring happens by producing better rung records for the existing scorer
(analyzeLadder in experiments/src/microvm-density.ts), not by touching the seal.
Proposed fixes
- Sample host signals during the timed window. A background sampler at ~1 Hz across the rung,
recording peak and mean for CPU / MemAvailable / PSS / process count, replacing the post-hoc
snapshot. Keep the existing post-load snapshot too if useful, but as a separate, differently-named
field — an idle reading must never again be able to pass as an under-load one. - Hoist all payload construction out of the timed loop. The Exec mix is 7 fixed commands and
workspace_keyis fixed per slot, so all payloads can be built once per slot before timing starts.
This removes both Python startups per Exec. - Replace grpcurl-per-Exec with a persistent-connection client. A small Go binary under
remote-worker/cmd/reusing the existing proto codegen, holding one connection per slot and
reporting per-Exec latencies. Removes proto-parse, connection setup, and process spawn from every
sample. This is the largest change and the main design decision. - Add a driver-overhead control arm — the same harness driven against a null/no-op responder, so
the driver's own contribution is quantified and subtractable at everyc. This is the control
whose absence let the artifact through, and it is arguably the single highest-value item here. - Instrument the relay. It is a single Node.js process shared identically by both arms and is the
leading candidate for the next bottleneck once the driver stops being one. Per the E8 lesson
(e8-loop-lag-reads-its-resolution-floor), prefer per-turn worker CPU over an event-loop-lag
sampler that reads its own resolution floor. - Move
wall_t0past a converge barrier so throughput's denominator is the Exec window only.
Items 1, 2, 4, 6 are contained changes to e11-density.sh. Item 3 is new Go code. Item 5 touches the
relay.
Open questions for the planning session
- Is item 3 in the first cut? Items 1+2+6 alone may be enough to reveal whether the knee is real
— and they are cheap. But ifgrpcurl's per-call proto-parse and connection setup are a large
share of the remaining per-Exec cost, a fixed-but-still-grpcurl driver could show a knee that is
still an artifact, costing a second metal run to discover. Alternative: land 1+2+4+6, use the new
control arm (item 4) to measure exactly how much the driver still contributes, and let that number
decide whether item 3 is needed before the authoritative run. - Should the driver stay closed-loop? The header already declares the coordinated-omission bias
(line 33-43,drivingModel="closed-loop-per-slot") and notes it understates latency at
saturation. If a persistent-connection client is being written anyway (item 3), an open-loop
rate-based driver becomes much cheaper to build, and saturation is exactly the regime in question. - Where does the driver run? Everything is currently localhost — the driver, the relay, the
worker, and the VMMs contend for the same cores, so driver cost is not merely additive, it is
competing with the thing under test. Moving the load generator to a second host would remove that
coupling but adds a network hop to every sample and needs a second machine. Worth deciding
explicitly rather than inheriting. - Does E10 rung 1 get the same payload-hoisting fix? Its
json_escapeis inside the timed window
too. Fixing it changes the 41 ms container baseline that every §7.2 ratio is priced against — which
is desirable for accuracy but means E10's headline numbers move and the write-up needs revising. - Re-run scope on metal: just the E11 ladder both arms, or E10 as well (if question 4 is yes)?
METAL-RUNBOOK.mdapplies; the box is reserved but the snapshot may need rebuilding
(Firecracker snapshots only restore on identical hardware).
Suggested scope for a first cut
Land items 1, 2, 4, and 6 in e11-density.sh — real in-rung sampling, payloads hoisted out of the
timed window, a driver-overhead control arm, and a converge barrier — then re-run the existing ladder
(SH_E11_ACTIVE_RUNS="1 2 4 8 16 32 64") on metal and compare the knee against the table above. The
control arm's numbers then answer open question 1 with data instead of a guess, before committing to
the Go client.
The falsifiable question for that run, stated up front: does the knee stay at c=8? If it moves
or vanishes, the published E11 conclusion is an artifact and needs retraction. If it holds with real
under-load CPU data behind it, the conclusion was right and only its evidence was wrong.
Part of rossoctl/moca-experiments#3 (P4 epic: next experiments after the metal STOP). Found while tracing why E10's
"container baseline" and the E11 concurrency curves behaved so similarly — the near-identical shape
across two structurally different backends was the original tell.
Activity
fix(e11): stop awk printing MemAvailable in scientific notation
docs(e11): correct the scope of the MemAvailable awk defect
fix(e11): a smaps read failing after -r passed is a refusal, not a si…
fix(e11): a ladder may only contain rungs from the run that built it
fix(e11): suppress SC2034 on the lexically last E11_RUN_ID assignment
fix(e13): a malformed mem-timeline line is a refusal, not a skipped s…
fix(e11): record Exec latency to three decimal ms on both drivers
Merge rossoctl/main into fix/291-e11-driver-artifact
docs(specs): design for repairing E11's density instrument (#291)
docs(plans): implementation plan for repairing E11's density instrume…
fix(e11): move per-Exec payload construction out of the timed window
feat(e11): add a fork-free in-rung host sampler
fix(e11): put a converge barrier before the timed window
fix(e11): sample host signals during the timed window, not after it
1 remaining item
feat(e11): add the driver-control arm, on by default
fix(e11): verify the actual bound socket is loopback, add IPv6 cases
docs(e11): record what RungSample's four host signals now mean
docs(e11): caveat the conclusions that rest on the driver defects
fix(e11): remove remaining driver-cost artifacts from the density sweep
Merge pull request #293 from pdettori/fix/291-e11-driver-artifact
docs(e11): design a persistent-connection Go Exec client (rossoctl#294)
fix(e11): record Exec latency to three decimal ms on both drivers
docs(e259): the ~62 Exec/s ceiling is per-process — two workers give …
fix(e11): a dying VMM contributes 0 to Sigma PSS, it is not a refusal
docs(e11): correct the c=8 knee before merge — it is the 4-slot cap, …
docs: publish the Exec/s campaign results and preserve #303's dead ends
docs(e11): fix three factual errors found in review of rossoctl#300
docs(e11): the knee holds at c=8 -- resolve issue #291's caveat with …
docs(e259): runbook for the worker-parallelism experiment