Skip to content

P4: repeat the authoritative E10/E11 ladders on nested virtualization to get a metal/nested ratio #266

Closed

Description

@pdettori

Summary

Repeat the authoritative E10/E11 ladders (the same ones run on bare metal for PR #251) on a nested-virtualization VM, and report the metal-vs-nested ratio for each key metric. Not to re-decide anything — the design already treats nested numbers as non-authoritative for stopping-rule purposes — but because a ratio is exactly the kind of thing this branch has already learned to trust when an absolute number can't travel: "The repair is always to find the ratio the property implies and assert that... Ratios survive a change of machine; absolute times do not."

Why this matters

  • Regression-testing velocity. Bare metal is scarce and its use is deliberate/announced (see METAL-RUNBOOK.md). If a future code change to resume/destroy (P4: decompose resume (28.58 ms) and destroy (21.31 ms) into their sub-costs #258) or replenishment (P4: standby-depth / replenishment-concurrency sweep to locate the true cause of the c=8 knee #260) needs a before/after comparison, waiting for metal every time is expensive. A known nested/metal ratio would let a nested run stand in for a quick regression check, with the metal-authoritative ladder reserved for the numbers that actually go in a decision.
  • Realistic deployment sizing. The stated goal is a sandbox service, and a real deployment is far more likely to run on a cloud VM (itself virtualized) than on literal bare metal. Every number in the epic (#256) and its sub-issues is a bare-metal floor — nested virtualization "taxes exactly the VM-exit-heavy work restore consists of," so production latency on a typical cloud host could be meaningfully worse than 52.74 ms. We don't currently know by how much.
  • The instrumentation risk this branch already learned to fear. Three analysis-machinery defects were only caught by running at real scale (see the epic's linked PR feat(microvm): P4 microVM sandbox tier — one ephemeral microVM per Exec #251 discussion) — a fresh nested run is also a chance to catch anything the metal-only code path never exercised, the same way the original nested runs caught the three scorer defects before metal ever ran.

What's already known / where to look

  • The rig already exists and is characterized. Both drivers were already run on this exact substrate before metal: SH_SUBSTRATE=nested-m8i, an EC2 m8i.xlarge — see deploy/microvm/e10-lifecycle.sh and deploy/microvm/e11-density.sh, both of which require SH_SUBSTRATE as an explicit, rig-labeled string (nested-m8i, nested-c8i, or metal — never bare "nested", per hardware-corrections F3). Reusing nested-m8i specifically gives the cleanest comparison, since it's the same rig whose instrumentation defects are already fixed and understood.
  • A real bug was already found and fixed on this substrate. The whole-branch review's H2 found mem_available_bytes's awk emitted two lines on Linux, which corrupted every rung record while the driver exited 0 (see deploy/microvm/EXPERIMENTS.md, "What a validation run on the nested box can and cannot establish"). Fixed, with a require_numeric guard and an explicit per-rung die on a rung that writes no record. This means a nested run today should actually produce trustworthy per-rung records — that wasn't true the first time it was tried.
  • The design already anticipates a looser nested threshold, but only as a pre-metal gate, never a stopping rule. The original decision table carried nested variants only for the "proceed as designed" row (< 8 ms nested vs. < 5 ms metal for warm hot path; < 40 ms nested vs. < 25 ms metal for replenishment CPU) — the STOP and mandatory-split rows have no nested variant at all. Structurally, e10-lifecycle.sh only prints a STOP/MANDATORY verdict when substrate is exactly "metal". This experiment should not try to make nested numbers trigger a verdict — it should report ratios, not a second decision.
  • Known substrate difference already documented: nested virtualization is expected to tax VM-exit-heavy work disproportionately, which is exactly what resume/destroy are (EXPERIMENTS.md: "nested virtualization taxes exactly the VM-exit-heavy work restore consists of"). A large resume/destroy ratio would corroborate that; a small one would be a surprise worth flagging.

Open questions for the spec

  1. Which metrics get a ratio — just the headline warm-hot-path/replenishment-CPU pair, or the full E10 decomposition (acquire/resume/run/destroy) and the full E11 ladder (knee position, throughput ceiling, cold-acquire curve)? I'd lean toward the full set, since knowing which sub-cost inflates most under nesting is more useful than one aggregate ratio.
  2. Should this reuse the exact nested-m8i rig (cleanest comparison, already characterized) or also add a second nested instance type (e.g., nested-c8i, explicitly never used so far) to see whether the ratio is rig-specific or a more general nested-virtualization tax?
  3. Does the knee even land at the same c on nested, or does replenishment saturate earlier/later given the VM-exit tax? If it moves, that's independently useful for P4: standby-depth / replenishment-concurrency sweep to locate the true cause of the c=8 knee #260 (standby-depth sweep) — a nested rig might be a cheaper place to iterate on that sweep before spending metal time on it.
  4. Same golden snapshot, or does a snapshot need rebuilding for the nested rig (Firecracker snapshots only restore on identical hardware, per METAL-RUNBOOK.md step 2)?

Suggested scope for a first cut

Run the exact authoritative E10 (ITERS=200 WARMUP=20) and E11 (SH_E11_ACTIVE_RUNS="1 2 4 8 16 32 64") ladders on nested-m8i, identically to how they ran on metal, and publish a side-by-side table: metal value, nested value, ratio, for every field in the E10 summary and every rung of the E11 ladder. No new driver code should be needed — this is the existing instrumentation pointed at a different SH_SUBSTRATE.


Part of rossoctl/moca-experiments#3 (P4 epic: next experiments after the metal STOP).

Activity

  1. pdettori commented on Sep 17, 2026

    @pdettori
    MemberAuthor

    Epic: rossoctl/rossoctl#2546 (Stream 2 — microVM sandbox tier, via sub-epic rossoctl/serverless-harness#256)

    Status update (2026-09-17)

    Nearly resolved. #269 (open PR, Closes rossoctl/moca#266) repeats
    both E10 and E11 on nested-m8i and reports the metal/nested ratio for every field with
    a metal baseline. Headline findings:

    • E10: warm hot path is 3.81x metal, but the container baseline itself moved 0.61x
      of metal — most of the naive ratio-of-ratios is a baseline shift, not nesting tax.
      The real signal is in the decomposition: destroy is taxed harder than resume
      (5.56x vs. 2.74x).
    • E11: the microVM arm's p95 ratio is a clean, load-independent ~2x at every
      concurrency level; the knee lands at the same c=8 on both substrates, directly
      answering this issue's open question 3.
    • c=64 is deliberately absent from the nested sweep — 64 concurrent 256MiB VMs need
      ~18GiB against the m8i.xlarge's 15GiB, a real memory ceiling this rig hits before
      metal's replenishment ceiling does.
    • The PR also fixes a real relay-teardown bug in e11-density.sh found while producing
      this run.

    Open until #269 merges.

    Assisted-By: Claude (Anthropic AI) [email protected]

  2. added 3 commits that reference this issue on Sep 18, 2026
  3. added a commit that references this issue on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions