Skip to content

docs: publish the Exec/s campaign results and preserve #303's ruled-out candidates - #327

Merged
pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:docs/phase2-record-corrections
Sep 22, 2026
Merged

pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:docs/phase2-record-corrections

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Two durable records so the campaign's outcome and its eliminated hypotheses both survive outside
issue threads. Docs only, purely additive.

docs/notes/2026-09-22-exec-throughput-campaign-results.md

62.99 → 580.60 Exec/s on one worker (9.2x) on srv-r16b14s16, where it came from, and where the
ceiling is now.

# change gain
#305 / PRs #312, #313 raise session.MaxConcurrent off its hard-coded 4 2.74x
#255 / PR #314 stop leaking a per-VM cgroup directory 5.3x
#258 / PR #319 reuse per-VM cgroups from a pool 3.25x
#304 / PR #315 replace the fixed 20 ms socket poll with backoff ~18%

Two of the largest wins were defects, not optimisations, and #255 was filed as hygiene with the
note that it affected no measurement.

The peak is 64 slots at 66% CPU (47.0 of 72 cores) and 8.3 GiB of 754.5 GiB. What binds is the
pool's replenishment rate, and it is host-wide — a second worker process is worth 1.00x:

arm total slots aggregate Exec/s vs anchor host CPU
1 × 64 64 580.60 1.00x 65.3%
2 × 32 64 580.58 1.00x 68.2%
1 × 64 (drift repeat) 64 563.66 0.97x 67.2%

0.02 Exec/s apart against 2.9% measured session drift, for +2.9 points of host CPU. This corrects
#259's interpretation: its 1.82x was real, but ran under MaxConcurrent=4, so the second process was
relieving a config cap. Per-worker coresBusy matched inside each arm (49.1/49.1) — since that
counter is host-wide, matching values are the proof the workers genuinely overlapped.

Also recorded: memory is not a constraint, by ~2 orders of magnitude. SH_MAX_COMMITTED_MB is
worst-case commitment accounting, while residency is ~0.9 MiB per VM (306 samples, max 2 MiB, the
288 MiB limit never approached) because guest memory is one MAP_SHARED snapshot file the worker pins
once via PinMemoryFile. "c=256 commits 216 GiB" is a budget reservation, not memory consumed.

The doc also keeps four proposals that were built, measured and rejected — deferring the cgroup
rmdir, memory.reclaim before rmdir, the 1 ms poll cap as a throughput cause, and the 16-slot knee
with its ~800 Exec/s extrapolation — plus the measurement lessons, each of which cost a wrong
conclusion first.

docs/notes/e11-restore-path-dead-ends.md

Issue #303's seven ruled-out candidates with their evidence, so they are not re-investigated: Go
ForkLock, fork cost under a 256 MiB mlock, jail-directory inode contention, the Node relay, the
single gRPC connection, every host-shared resource, and worker-side mutexes.

There is no restore-path serializer. What looked like one was a fixed 20 ms poll (#304); what looked
like a knee downstream of restore was the 4-slot cap (#305).

It also notes something uncomfortable and useful: the under-load SIGQUIT dump that correctly ruled
out a mutex also showed exactly 4 goroutines draining the Exec queue. The answer to the whole
question was present in the evidence and was dismissed as a sampling artifact.

Why these belong in the repo

Both are currently only in issue threads and a local plan file. The dead-ends table in particular is
the kind of negative result that gets silently re-derived, and #303 cannot close cleanly until it has
a home.

Testing

make lint and make fmt pass. No code changes.

Related

Pairs with the corrections to #300 (the c=8 knee is the 4-slot cap) and #301 (do not scale out).
Unblocks closing #303 and #259.

… dead ends

Two records, so the campaign's outcome and its eliminated hypotheses both
survive outside issue threads.

`2026-09-22-exec-throughput-campaign-results.md` — 62.99 to 580.60 Exec/s on
one worker (9.2x), where it came from, and where the ceiling now is. The peak
is 64 slots at 66% host CPU and 8.3 GiB of 754.5 GiB; what binds is the pool's
replenishment rate, and it is host-wide, so a second worker process is worth
1.00x (2x32 = 580.58 against 1x64 = 580.60, a 0.02 Exec/s difference against
2.9% session drift). Records the four proposals that were built, measured and
rejected, and the measurement lessons that each cost a wrong conclusion first.

Also records that memory is not a constraint by ~2 orders of magnitude:
`SH_MAX_COMMITTED_MB` is worst-case commitment accounting, while actual
residency is ~0.9 MiB per VM because guest memory is one MAP_SHARED snapshot
file the worker pins once. Read "c=256 commits 216 GiB" as a reservation.

`e11-restore-path-dead-ends.md` — issue rossoctl#303's seven ruled-out candidates with
their evidence, so they are not re-investigated: Go ForkLock, fork cost under
a 256 MiB mlock, jail-directory inode contention, the Node relay, the single
gRPC connection, every host-shared resource, and worker-side mutexes. There is
no restore-path serializer; what looked like one was a fixed 20 ms poll (rossoctl#304)
and what looked like a downstream knee was the 4-slot cap (rossoctl#305). Notes that
the SIGQUIT dump which ruled out a mutex also showed exactly 4 goroutines
draining the queue — the answer, present in the evidence and dismissed.

Refs rossoctl#255 rossoctl#258 rossoctl#259 rossoctl#274 rossoctl#291 rossoctl#295 rossoctl#303 rossoctl#304 rossoctl#305 #306 rossoctl#316

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

@huang195 huang195 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mamma mia, Paolo — this is a beautifully disciplined piece of record-keeping, and I went looking for holes in it.

The arithmetic holds up under audit. Every coresBusy↔CPU% pair reconciles to within 0.1pp (47.0/72 = 65.3%, 49.1/72 = 68.2%, 52.5/72 = 72.9%, 48.3/72 = 67.1%), the 2 x 32 aggregate really is precise to the claimed 0.02 Exec/s, 768 x 288 MiB = 216 GiB exactly, and 561.60/524.66 = 1.070 backs the "~7%". All 19 referenced issues and PRs exist and their titles match what you say about them; session.DefaultConcurrency, SerializesExecsPerRun, execGate, PinMemoryFile, PerVMBytes and waitForUnixSocket all check out against main.

The 2 x 32 arm as a slots-constant control is perfetto — it is the single design choice that makes the #259 correction airtight, and the note that summing the host-wide coresBusy would have destroyed exactly the evidence that proves overlap is the kind of detail most campaigns lose. Bellissimo. The "Measurement lessons this campaign paid for" section is worth more than the throughput number itself.

Findings below are all about precision, in a document whose entire value is precision. The one I would most want addressed is the cold rate column against open #306 — the doc leans on "acquires go cold" as its mechanism while #306 says that metric is a latency proxy overstated 13.6x–250x. The conclusion survives either way, because the Acquire 4.30 → 281.20 ms column carries it independently, but a reader who knows #306 will discount the column unless the provenance is stated. Nothing here blocks the merge.

Author: pdettori (MEMBER — maintainer)
Areas reviewed: Docs only (2 new files, 253 lines)
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing (13/13)

Assisted-By: Claude Code


Slots, on one worker, descending sweep with the cheapest rung repeated last:

| slots | Exec/s | p95 ms | host CPU | Acquire ms | Destroy ms | per-Exec ms | cold rate |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — which metric is the cold rate column?

#306 is still open, and it says the driver's coldAcquireRate is a latency-threshold proxy that overstated the true cold rate by 13.6x (0.7625 vs 0.056) and ~250x (~1.0 vs 0.0039), because the threshold is dominated by resume + destroy (~93% of the Exec) rather than by whether a standby was available. I checked main: coldAcquireRate and SH_E11_COLD_LATENCY_MS are both still in deploy/microvm/e11-density.sh, so the driver still emits the proxy.

This matters because the column is load-bearing for the mechanism: "acquires go cold, each then paying a full restore" below, and "the cold rate at 0.538" in the two-worker section. #306 appears in the Refs: line but is never addressed in the text.

The conclusion itself is safe — Acquire going 4.30 → 281.20 ms establishes the replenishment bound on its own, and it is the stronger evidence. So this is about labelling, not about redoing anything: one sentence saying whether these figures are the driver proxy or Phases.Cold, and if the proxy, that #306 means they are an upper bound. Otherwise the first reader who remembers #306 will quietly discount the whole column.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked, and the answer is better than "state the provenance": both columns already are the true metric. The driver emits two fields, and my analysis read coldAcquireRateTrue — diffed from the worker's vmpool.Stats counters over the rung — not the coldAcquireRate proxy.

Pulling both fields out of the same rung records makes the case for labelling it, though, because the proxy is not merely overstated here — it is saturated:

record slots proxy TRUE
high-c64 64 1.000 0.158
high-c128 128 1.000 0.553
high-c256 256 1.000 0.698
mw-1x64 64 1.000 0.138
mw-2x64 128 1.000 0.542

1.000 at every rung, carrying no information at all, while the true metric tracks the ladder. That is #306's point with no room left to argue.

Now labelled explicitly, and I took your framing that the conclusion does not need the column — the note says so directly: Acquire grows 65x while per-Exec grows 5.7x, which is sufficient however coldness is counted.

One thing your comment prompted that is worth more than the labelling: #306 and this document appear to contradict each other and do not. #306's ">99% warm at c=16, the restore was never on the hot path" was measured under the 4-slot cap, where demand was four slots' worth and the pool kept up easily. Past 64 slots demand outruns replenishment and the true cold rate reaches 0.698. So the restore is on the hot path in this regime and was not in that one — both right about their own configuration, which is this campaign's recurring lesson landing on itself again. That reconciliation is now in the doc rather than left for a reader to trip over.

pool restores VMs, so `Acquire` goes 4.30 to 281.20 ms and acquires go cold, each then paying a full
restore.

`throughput = slots / per-Exec total` predicts every measured point within ~4%, which is what makes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — the "~4%" does not hold at the rung that matters most.

Running your own model against your own table:

slots slots / per-Exec measured error
64 64 / 0.10411 = 614.73 577.55 +6.4%
128 128 / 0.23420 = 546.54 524.66 +4.2%
256 256 / 0.59615 = 429.42 417.24 +2.9%

So 128 and 256 are inside ~4%, but the peak — the rung the whole document is about — is off by 6.4%, and it is the worst of the three rather than the best.

There is a related crack worth closing at the same time: inverting the measured throughput gives 64/577.55 = 110.8 ms per Exec, and 64/580.60 = 110.2 ms, but the table's per-Exec ms column says 104.11. Line 123 then says Resume + Destroy are "94 of the 110 ms per Exec at the peak" — which agrees with the inverted figure and not with the column two tables above it. Two different per-Exec totals are in use without the difference being named.

I suspect the honest explanation is that the summed sub-phases do not account for all wall-clock time per Exec (overlap, or time outside the instrumented phases), which is exactly the ~6% gap. That is a fine thing for the record to say — and given this document's own lesson about treating an unexplained zero as absent data, an unexplained 6% probably deserves the same footnote. Either widen the claim to ~6% or state which of 104.11 / 110 is the wall-clock total and why they differ.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both right, and the second half is the more serious of the two.

Fixed as measured rather than by widening the claim:

slots predicted measured error
64 614.73 577.55 +6.4%
128 546.54 524.66 +4.2%
256 429.42 417.24 +2.9%

Your diagnosis of the crack is correct, and the numbers confirm it — the two per-Exec totals differ by exactly the prediction error, because they are the same fact:

slots summed sub-phases wall-clock (slots/tput) residual share
64 104.11 110.81 6.70 6.0%
128 234.20 243.97 9.77 4.0%
256 596.15 613.56 17.41 2.8%

So the column is the sum of instrumented sub-phases and the 110 ms figure is wall-clock; the residual is per-Exec time no instrumented phase covers. Both are now named as such, and I took the footnote you proposed: by this document's own rule about unexplained zeros, an unexplained 6% gets the same treatment, so the summed column is flagged as a lower bound and wall-clock is what to quote when the total matters.

Resume + Destroy now carries both denominators explicitly — 93.70 ms is 90.0% of the summed 104.11, or 84.6% of the 110.81 wall-clock — rather than an unlabelled "94 of 110".


## What this means for capacity planning

- **One worker process per host**, with `WORKER_MAX_CONCURRENT` raised. Fewer ports, relays, Redises,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — worth naming the shipped default here.

#313 landed const microvmDefaultConcurrency = 16 in remote-worker/cmd/microvm-worker/main.go, with the comment that "the default must not wander past the evidence." So the tier ships at 16 while this document establishes 64 as the measured peak.

As written, "One worker process per host, with WORKER_MAX_CONCURRENT raised" tells a reader to raise it but not from what, and "Do not raise slots past 64 on this host" reads as though 64 were the operating point. Someone acting on this section will not learn that the default is a deliberate 4x below the peak, or that getting to 64 requires setting the variable explicitly.

A half-sentence — "the tier defaults to 16 (#313); 64 needs WORKER_MAX_CONCURRENT set" — makes the capacity guidance actionable and records why the shipped default is conservative, which is itself a finding.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, with the reason as well as the number, since you're right that the why is itself a finding.

The section now says the tier ships at microvmDefaultConcurrency = 16 (#313), that this is a deliberate 4x below the measured peak on the principle that "the default must not wander past the evidence" — 16 was the value with a measured result behind it when #313 landed, and 64 came later — and that reaching 64 requires setting WORKER_MAX_CONCURRENT explicitly.

I also added that moving the default is a decision separate from this measurement, and should weigh p95 (145 ms at 64 slots) and the memory budget rather than throughput alone. This doc establishes where the peak is; it does not establish that the peak is the right operating point.

| #295 / PR #309 | stop counting a failed Exec as a success | — | instrument: it was inflating throughput |
| #258 / PR #317 | decompose `Destroy` into sub-phases | — | instrument: made everything after it measurable |

Gains are not multiplicative — each was measured against the tree that preceded it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — this sentence names the right fact but the reason given does not produce it.

If each gain were genuinely measured against the tree immediately preceding it, they would compose: that is what a sequential chain means. And they overshoot badly — 2.74 x 5.3 = 14.5x already exceeds the campaign's total 9.2x, with 3.25x and 1.18x still to come (2.74 x 5.3 x 3.25 x 1.18 ≈ 56x).

So "each was measured against the tree that preceded it" is the explanation for why they should multiply, offered as the explanation for why they do not. The real cause is presumably that the rungs were measured at different slot counts and under different configurations — which is precisely this document's own "an interpretation inherits every configuration it ran under" lesson, applied to its own headline table. One clause naming that would close it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, and it's worse than imprecise — the sentence gives as the explanation for non-composition the exact reason they should compose. Rewritten to name the real cause, with your 56x:

These gains do not multiply, and the reason is not that they were measured sequentially — had each been measured against the tree immediately before it, they would compose, because that is what a chain means. Composed they give 2.74 × 5.3 × 3.25 × 1.18 = 56x against an actual 9.2x.

They do not compose because each was measured at the slot count and configuration current when it landed, and those differ between rows. A fix worth 5.3x while the worker ran few slots against a leaking cleanup is not worth 5.3x at 64 slots with the leak gone, and several of these were partly relieving the same bottleneck from different sides. [...] Only the endpoints compose, and those are the claim: 62.99 → 580.60.

I kept your observation that this is the document's own lesson landing on its own headline table, because that is the useful part.


| # | change | gain | note |
| --------------------- | -------------------------------------------------- | --------- | ----------------------------------------------- |
| #305 / PRs #312, #313 | raise `session.MaxConcurrent` off its hard-coded 4 | **2.74x** | one environment variable |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — session.MaxConcurrent is not a thing.

The constant is session.DefaultConcurrency = 4 in remote-worker/internal/session/loop.go; the knob is the MaxConcurrent field on the worker's config, set from WORKER_MAX_CONCURRENT in cmd/microvm-worker/main.go. There is no MaxConcurrent exported at package scope in session.

Worth a fix because e11-restore-path-dead-ends.md in this same PR gets it exactly right ("session.DefaultConcurrency = 4"), so the two records disagree on the name of the campaign's single biggest lever — and this is the table people will grep for.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed against main: session/loop.go:41 has DefaultConcurrency = 4, and loop.go:100 assigns it to the cfg.MaxConcurrent field, which cmd/microvm-worker/main.go:144 sets from WORKER_MAX_CONCURRENT. There is no package-scope session.MaxConcurrent.

Fixed in both places it appeared — the headline table and the #259 section. The table row now avoids the symbol entirely ("raise the worker's slot count off its hard-coded 4") since the row is about the change rather than the identifier, and the prose names session.DefaultConcurrency.

Your reason for flagging it is the right one: the two records in this PR disagreeing on the name of the campaign's biggest lever is exactly the kind of thing that survives for years in a grep.

## Reproducing

`deploy/microvm/e11-density.sh` sets `WORKER_MAX_CONCURRENT` to the slot count and records it in each
rung record, so a rung is self-describing as of PR #313. High rungs need sizing: `c=256` commits

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — that attribution belongs to #312, not #313.

I checked the file lists on both PRs:

#313 never touched the driver, so the rung record becoming self-describing is #312's doing. Small thing, but the "Reproducing" section is the one a future person follows literally.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed from the file lists — #312 changed e11-density.sh and its test, #313 changed cmd/microvm-worker/main.go, its test and the design spec. #313 never touched the driver.

Corrected to #312, with the distinction stated inline so it doesn't drift back: "as of PR #312 (which is the one that changed the driver; #313 set the worker's per-tier default and never touched it)."

Agreed on why it matters — "Reproducing" is the section someone follows literally, and a wrong PR number there sends them to a diff that doesn't contain the thing they're looking for.

0.9 MiB mean and 2 MiB max, `memory.events` all zero, and nothing within 8 MiB of the 288 MiB limit.

So `SH_MAX_COMMITTED_MB` is worst-case **commitment** accounting — what it would cost if every VM
dirtied its whole guest RAM — not residency, and it is conservative by roughly 90x. Read "`c=256`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — where does 90x come from?

The two ratios the surrounding text supports are both something else:

  • against the sampled cgroups: 288 MiB / 0.9 MiB mean = 320x, and 288 / 2 max = 144x
  • against the host figure: ~18 GiB commitment for 64 VMs vs 8.3 GiB used = ~2.2x (and that 8.3 includes host baseline)

None of those round to 90. Given this document is the thing people will cite when they argue about SH_MAX_COMMITTED_MB sizing, showing the division — or picking the 144x worst-case bound, which is the defensible one to quote — would make the claim checkable instead of asking readers to take the factor on faith.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't derive it either — 90x doesn't follow from anything in the document, and I can't reconstruct where it came from. Removed.

Replaced with the divisions shown, so a reader arguing about SH_MAX_COMMITTED_MB sizing can check each one:

comparison ratio
per-VM limit against the worst VM observed: 288 MiB / 2 MiB 144x
per-VM limit against the mean: 288 MiB / 0.9 MiB 320x
this run's admission budget against host memory used: 480 GiB / 8.3 GiB 58x

Took your suggestion of the worst-case bound as the one to quote, since it's the defensible number for a sizing argument, and noted explicitly that an earlier draft said 90x and that it doesn't follow.

One qualifier added while checking this: the 8.3 GiB host figure includes an idle baseline of ~7 GiB, so the run's own footprint at 64 concurrent VMs is on the order of 1–2 GiB. That makes the "two orders of magnitude" claim comfortable but it also means the 58x row is the least clean of the three, and it's labelled as the budget comparison rather than a residency ratio.

@mrsabath mrsabath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with @huang195's approval — this is the kind of record that saves a team from re-deriving negative results, and the "Measurement lessons this campaign paid for" section is the most valuable part of it. I focused on what that review did not cover rather than re-auditing the arithmetic it already checked.

Independently confirmed: all 17 referenced issues and PRs exist with titles matching their descriptions here. The coresBusy↔CPU% reconciliation holds (47.0/72 = 65.28% vs 65.3% claimed, worst case 0.12pp on 48.3/72). 768 × 288 MiB = 216.00 GiB exactly. 561.60/524.66 = 1.0704, so "~7%" is right. Drift is 2.92%, matching the stated 2.9%. And 580.60/62.99 = 9.217, so the headline 9.2x checks out.

The 2 × 32 control is the right experimental design and I want to underline why: holding total slots constant is what makes the #259 correction airtight, and the coresBusy-matching-not-summing note is a real insight — summing a host-wide counter would have destroyed the only evidence that the workers overlapped.

Three precision findings, inline, none blocking. All three are in the same category: a document whose value is precision has three places where a reader can lose confidence in it without the conclusion being wrong. The most substantive is the cold-rate provenance against open #306 — same concern @huang195 raised, but I think it is sharper than "state the provenance," because #306 explicitly calls the narrative false, not just the metric imprecise.

Why none of them is a must-fix: the ceiling conclusion does not depend on the cold column at all. Acquire grows 65x across the ladder (4.30 → 281.20 ms) while per-Exec grows 5.7x, so Acquire is demonstrably the growing term and the replenishment-rate diagnosis stands on that alone. Likewise the 9.2x headline survives either anchor value (9.22x from 580.60, 9.17x from 577.55), and the model-fit claim is a parenthetical rather than load-bearing.

Summary

Author: pdettori (MEMBER) — cross-repository PR
Areas reviewed: Docs only (2 new files, 253 lines), plus cross-referencing against 17 linked issues/PRs
Commits: 1, signed-off: yes (DCO green), subject 71 chars
CI status: passing — 13/13
Prior review: @huang195 APPROVED at this same HEAD

No must-fix issues.


| slots | Exec/s | p95 ms | host CPU | Acquire ms | Destroy ms | per-Exec ms | cold rate |
| ------ | ---------- | ------ | -------- | ---------- | ---------- | ----------- | --------- |
| **64** | **577.55** | 145 | 66.3% | 4.30 | 61.51 | 104.11 | 0.142 |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — the 64-slot configuration appears twice with different numbers, and nothing says they are different runs.

This table (the slot ladder):

slots Exec/s p95 ms host CPU cold rate
64 577.55 145 66.3% 0.142

The scale-out table below (1 x 64 (anchor)):

arm aggregate p95 ms host CPU cold rate
1 x 64 (anchor) 580.60 144 65.3% 0.138

Every column differs slightly, which is consistent with these being two separate runs 2.9% apart — exactly the drift the doc measures and reports. But the doc never says so, and the headline quotes 580.60 while the table presented as "where the ceiling is now" says 577.55. A reader who reads top-to-bottom sees the peak change by 3 Exec/s with no explanation and starts wondering which figure to trust.

One clause fixes it — something like "the anchor below is a separate run of the same configuration; the 0.5% spread against the ladder is within the 2.9% session drift measured above." That turns an apparent inconsistency into another data point supporting the drift estimate.

Nothing downstream breaks either way: 9.2x holds from both (580.60/62.99 = 9.22, 577.55/62.99 = 9.17).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, and I took your clause almost verbatim because it says it better than I had:

This is a separate session from the slot ladder above, which is why its 64-slot anchor reads 580.60 against the ladder's 577.55. The 0.5% spread is well inside the 2.9% within-session drift this run measured directly by repeating the anchor last, so the two figures corroborate each other rather than conflict. Nothing downstream turns on which is used: 580.60/62.99 = 9.22 and 577.55/62.99 = 9.17, both 9.2x. Quoted per session: the ladder peak is 577.55, the two-worker anchor is 580.60.

Your framing is the right one — it turns an apparent inconsistency into a second, independent data point supporting the drift estimate, which is more useful than picking one number and hiding the other.


**The peak is 64 slots, and CPU is not the bound** — flat at 66-70% across a 4x slot range while
throughput falls. What binds is the replenishment rate: past 64 slots demand outruns the rate the
pool restores VMs, so `Acquire` goes 4.30 to 281.20 ms and acquires go cold, each then paying a full

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — this sentence asserts the specific claim that open #306 says is false, and the cold rate column has no stated provenance.

...so Acquire goes 4.30 to 281.20 ms and acquires go cold, each then paying a full restore.

#306 ("coldAcquireRate reported 0.76 where the true cold rate was 0.056 — the proxy does not measure pool coldness") does not merely call the metric imprecise. It states:

The narrative that "at c>=16 every Exec pays a restore" (#259's runbook, #291) is false. At c=16 more than 99% of acquires were warm. The restore was never on the hot path.

...and gives the mechanism: the proxy thresholds end-to-end latency, in which acquire is 0.3% of the signal while resume + destroy are ~93%, so no threshold can separate warm from cold.

#306 is in this doc's Refs: line but is never discussed, and the cold rate column in both tables is unlabelled as to source. The companion dead-ends doc cites coldAcquireRate ~0.998 by name, which is the discredited metric — so a reader who knows #306 will reasonably assume both columns are that proxy and discount them.

The conclusion is fine and I want to be clear about that. I checked whether it needs the cold column at all, and it does not: Acquire grows 65x (4.30 → 281.20 ms) while per-Exec grows 5.7x, going from 4.1% to 47.2% of per-Exec time. That is direct, sufficient evidence that acquisition is the binding term, regardless of how coldness was counted.

So the fix is to lean on the evidence that survives #306 and say so: state whether these figures are the driver's coldAcquireRate or the pool's Phases.Cold, and if the former, add a sentence noting #306 and that the Acquire column carries the argument independently. Given this doc's own lesson — "an interpretation inherits every configuration it ran under" — an unlabelled metric with a known 13.6x–250x overstatement is worth the one line.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your sharpening is the important part — #306 calls the narrative false, not just the metric imprecise — and it turns out both documents are right, about different configurations.

First, provenance: both columns here already are coldAcquireRateTrue, diffed from the worker's vmpool.Stats counters, not the proxy. Now labelled. Pulling both fields from the same records shows the proxy isn't just overstated, it's saturated at 1.000 at every rung (64/128/256 and every two-worker arm) while the true metric reads 0.138 → 0.698.

Second, the narrative. #306's ">99% of acquires were warm, the restore was never on the hot path" was measured under the 4-slot cap: demand was four slots' worth, so the pool kept up and the restore genuinely wasn't on the hot path. At 64+ slots demand outruns the replenishment rate and the true cold rate reaches 0.698 at 256 slots. So the restore is on the hot path in this regime. #306's statement is true of its configuration and false of this one — which is this campaign's own recurring lesson, arriving again.

That reconciliation is now in the doc explicitly, because you're right that a reader who knows #306 would otherwise conclude one of the two is wrong.

I also took your point that the column isn't load-bearing and said so in the text: Acquire grows 65x (4.30 → 281.20 ms) against per-Exec's 5.7x, moving from 4.1% to 47.2% of per-Exec time, which settles the diagnosis independently. And the "each then paying a full restore" phrasing is gone, replaced by the measured share.

In the companion dead-ends note, the coldAcquireRate ~0.998 citation you spotted is kept — it's the instrumentation-overhead comparison, where both arms were classified identically so the proxy's inaccuracy cancels — but it now says so, and points at coldAcquireRateTrue as the real statistic.

pool restores VMs, so `Acquire` goes 4.30 to 281.20 ms and acquires go cold, each then paying a full
restore.

`throughput = slots / per-Exec total` predicts every measured point within ~4%, which is what makes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — "within ~4%" does not hold for the row that matters most.

throughput = slots / per-Exec total predicts every measured point within ~4%, which is what makes the slot ladder trustworthy.

Running it against the table directly above:

slots predicted measured error
64 614.73 577.55 6.44%
128 546.54 524.66 4.17%
256 429.42 417.24 2.92%

The 64-slot row — the peak, and the number in the title — is the worst fit at 6.4%, and 128 is marginally over too. The trend is also the opposite of reassuring: the model fits best where throughput is collapsing and worst at the operating point being recommended.

"within ~7%" would be accurate as written. Better, since the sentence is there to justify trusting the ladder, would be to say what the residual means: the model omits whatever per-Exec time is not captured in the per-Exec ms column, and that unmodelled term is largest at the peak. That is a more interesting statement than the fit quality, and it is the honest version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same finding as @huang195's on this line and fixed together — the model over-predicts by 6.4% at the peak, 4.2% at 128, 2.9% at 256, now stated with the table rather than as "~4%".

The cause is named too: the per-Exec ms column is the sum of instrumented sub-phases (104.11 ms at 64 slots) while wall-clock per slot is slots/throughput (110.81 ms), and the 2.8–6.0% residual is per-Exec time no instrumented phase covers. That residual is the prediction error — same fact, two presentations. Flagged as a lower bound rather than passed over.

@aslom aslom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-only and purely additive; both files are well-evidenced and every code symbol they cite checks out against main (session.DefaultConcurrency = 4 / MaxConcurrent, waitForUnixSocket's new backoff, runPool.execGate, PinMemoryFile, PerVMBytes, SerializesExecsPerRun, and all seven SH_* separations). Findings are all non-blocking: one merge-order dependency on #300, one method note that main has since overtaken, and two internal-arithmetic points.

Areas reviewed: Docs (2 new files, +253/-0). Security, commit conventions, and doc accuracy checked.
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing (13/13)

**There is no restore-path serializer.** What looked like one was a fixed 20 ms retry in
`waitForUnixSocket`, which accounted for ~90% of every restore while the real work took 2.7 ms
(#304, fixed in PR #315). What looked like a knee "downstream of restore" was the worker's 4-slot
concurrency cap (#305) — see the correction in `deploy/microvm/EXPERIMENTS.md` section E11.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — This points at a correction that isn't on main yet. Today EXPERIMENTS.md §E11's banner is the 2026-09-17 / #291 one, which still lists the c=8 knee as "under repair… the falsifiable question for the re-run is whether it stays there."

The correction you're pointing to is in PR #300 (+280/-0 to EXPERIMENTS.md, still open, REVIEW_REQUIRED). If #327 merges first, a reader following this pointer lands on the open question instead of the answer.

Either merge #300 first, or soften this to "see #300 / issue #305".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right — this PR would have shipped a pointer to an answer that isn't there yet. Softened rather than creating a merge-order dependency, so the two PRs can land in either order:

For the corrected reading of E11's c=8 knee, see issue #305 and PR #300 — as of this note EXPERIMENTS.md section E11 still carries the 2026-09-17 banner that lists the knee as under repair, and #300 (which replaces it) is open. Follow #305 rather than the section until #300 merges.

That way a reader landing here before #300 merges is told what they'll find instead of being sent to it blind.

`SH_DIAG_PPROF`. Overhead was negligible — 61.00 Exec/s instrumented vs 58.26 uninstrumented at the
same `coldAcquireRate` ~0.998.

**`microvm-worker` had no pprof endpoint**, and adding one behind an env var would have saved most

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — This lesson has already been acted on, and the note now reads as stale. microvm-worker does have a pprof endpoint on main: remote-worker/cmd/microvm-worker/main.go:494-503 gates it on SH_DIAG_PPROF and sets exactly the two rates described on line 45 — SetBlockProfileRate(10000) and SetMutexProfileFraction(5) — with a comment citing #308 and the same "its absence cost a day" rationale.

Worth adding "since landed in #308" here and on line 45's "never pushed", so the next reader doesn't go re-add it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed on main — cmd/microvm-worker/main.go:501-505 gates it on SH_DIAG_PPROF with SetBlockProfileRate(10000) and SetMutexProfileFraction(5), the same two rates the note describes, plus the _ "net/http/pprof" import at line 24 and the security rationale at 478-480.

A stale "it has none" is worse than no note at all, since the obvious response is to go add it. Now:

microvm-worker had no pprof endpoint at the time [...] This has since landed in #308 [...] gates net/http/pprof on SH_DIAG_PPROF and sets the same two rates. Do not re-add it.

I also changed "never pushed" to "never pushed as such", since the substance did land — via #308 rather than off that branch.

While there I qualified the coldAcquireRate ~0.998 on the line above, which @mrsabath flagged on the other file: it's the discredited proxy (#306), but it's being used for an instrumentation-overhead comparison where both arms were classified identically, so the inaccuracy cancels. That now says so and names coldAcquireRateTrue as the real statistic.

0.9 MiB mean and 2 MiB max, `memory.events` all zero, and nothing within 8 MiB of the 288 MiB limit.

So `SH_MAX_COMMITTED_MB` is worst-case **commitment** accounting — what it would cost if every VM
dirtied its whole guest RAM — not residency, and it is conservative by roughly 90x. Read "`c=256`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion — I can't reconstruct "roughly 90x" from the figures just above. Line 61 gives 0.9 MiB mean / 2 MiB max against the 288 MiB limit, which is ~320x on the mean and ~144x on the max; amortising the shared 256 MiB snapshot across 64 VMs gets ~59x.

The "two orders of magnitude" on line 60 is consistent with 90x, but the specific ratio doesn't follow from the stated numbers — worth showing the derivation or correcting it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and your ~59x for the amortised-snapshot case is a fourth reading I hadn't computed — which rather makes the point that a bare "90x" was doing no work. Removed and replaced with the three divisions shown (144x worst observed, 320x mean, 58x budget-against-host-used), quoting 144x as the defensible bound since it's the worst case actually measured.

"Two orders of magnitude" stays, now resting on the 144x/320x per-VM comparison rather than on the unsourced figure.

- **Add hosts to add capacity** — nothing is shared between them, so that scales linearly where
processes do not.
- **Raising the per-host number requires needing fewer restores per Exec.** `Resume` + `Destroy` are
94 of the 110 ms per Exec at the peak, and both are per-VM rather than per-command. That is #274.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit — "110 ms per Exec at the peak" doesn't match the ceiling table, which gives per-Exec 104.11 ms at 64 slots; line 68 separately says a VM lives ~100 ms.

Relatedly, the peak appears as 577.55 Exec/s in the slot table and 580.60 in the worker table — reconcilable as the 2.9% session drift you document, but the two tables are never labelled as separate sessions. Given this doc's own lesson to "record the configuration next to the number", worth pinning which session each figure comes from.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both fixed, and the three figures you list are three different things that were sharing one label:

  • 104.11 ms — sum of instrumented sub-phases, which the column reports
  • 110.81 ms — wall-clock per slot per Exec (64 / 577.55), which "110 ms" was referring to
  • ~100 ms — VM lifetime, related but not the same quantity

The residual between the first two (6.70 ms, 6.0%) is per-Exec time no instrumented phase covers, and it's now named and flagged as making the summed column a lower bound. Resume + Destroy is given against both denominators: 93.70 ms = 90.0% of summed, 84.6% of wall-clock.

On the two peaks: labelled as separate sessions, with the 0.5% spread placed inside the 2.9% drift the run measured by repeating its anchor last. You and @mrsabath both landed on the same "record the configuration next to the number" point, and it was the right one to press.

@aslom

aslom commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

I got it approved just few small suggestions

… model fit and three ratios

All ten findings from @huang195, @mrsabath and @aslom were checked against
`main` and all were correct.

The cold-rate finding resolves better than the reviews assumed. Both tables
already used `coldAcquireRateTrue`, diffed from the worker's vmpool.Stats
counters, not the `coldAcquireRate` latency proxy #306 discredits. The records
show why that matters: across these rungs the proxy reads a saturated 1.000
everywhere, carrying no information, while the true metric tracks the ladder
0.142 -> 0.698. Now labelled, and #306 reconciled rather than hedged: its
">99% warm at c=16, the restore was never on the hot path" was measured under
the 4-slot cap where demand was four slots' worth. Past 64 slots demand
outruns replenishment and the true cold rate reaches 0.698, so the restore is
on the hot path in this regime and was not in that one. Both readings are
right about their own configuration. The "each then paying a full restore"
phrasing is replaced with the measured share, and the note now says the
argument stands on `Acquire` growing 65x regardless of how coldness is counted.

Corrected arithmetic:

- "within ~4%" was wrong and wrong at the peak: the model over-predicts by
  6.4% at 64 slots, 4.2% at 128, 2.9% at 256. Stated with the table.
- Two per-Exec totals were in use without the difference being named. The
  column is summed instrumented sub-phases (104.11 ms); wall-clock per slot is
  slots/throughput (110.81 ms). The 2.8-6.0% residual is uninstrumented time,
  and by this document's own rule about unexplained zeros it is now flagged as
  a lower bound rather than passed over. Resume+Destroy is given against both
  denominators: 90.0% of summed, 84.6% of wall-clock.
- "roughly 90x" on memory did not follow from any figure present. Replaced
  with the divisions shown: 144x worst observed VM, 320x mean, 58x budget
  against host memory used. 144x is the one to quote.
- The gains table explained its own non-composition with "each was measured
  against the tree that preceded it", which is the reason they *would* compose.
  Real cause named: each was measured at the slot count and configuration
  current when it landed. Composed they give 56x against an actual 9.2x.
- 577.55 and 580.60 are now labelled as separate sessions, with the 0.5%
  spread placed inside the measured 2.9% drift.

Also: the tier's shipped default is 16 (rossoctl#313), deliberately 4x below the
measured peak, and reaching 64 needs WORKER_MAX_CONCURRENT set — the capacity
section said "raised" without saying from what. The self-describing rung record
is rossoctl#312's work; rossoctl#313 never touched the driver. `session.MaxConcurrent` is not
a symbol; the constant is `session.DefaultConcurrency = 4`.

In the dead-ends note: `microvm-worker` does have a pprof endpoint on `main`
since rossoctl#308, so the "it had none" lesson is marked as acted on rather than left
to be re-added; and the pointer into EXPERIMENTS.md section E11 now directs
readers to rossoctl#305 and PR rossoctl#300, since the section still carries the pre-correction
banner until rossoctl#300 merges.

Refs rossoctl#305 #306 rossoctl#308 rossoctl#312 rossoctl#313

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants