Exact scheduler driver slots: RRT processing rounds
The exact slot-table candidate reduces complete Nyxus Heavy16 instructions by 381,415,094 (0.40955%). Completion remains 49 rounds, workflow latency and grown memory match the qualified control, and exact work passes unchanged. The gain is modest. Callback and global-timer page costs regress, as recorded below. This experiment adds no business analytics or approximate work decisions.
Source and artifact identity
The isolated branch starts at Main
a65d1b8012900388d8da1e9fc9c27eb0733533ab. Its sole Rust change is
rrt/crates/cdk-rsx-reactor/src/scheduler.rs, SHA-256
e89facaff1398d4266b056cb8f1ffe190633fde6f140cdc2d59fa6cd1d73fc7e.
The qualified source is the base plus that patch, as captured by the canonical
source archive; the experiment commit is created afterward without changing Rust.
| Identity | SHA-256 |
|---|---|
| Reused qualified control Wasm | 3545d06da4cab6272b0ee8b3668e72da8b4a7b6f155378ce9c7fb6e2b4acce4c |
| Candidate prepared Wasm | 44fe65d2c4a9b43d839001c9414b4e50c7b3febc59c0671bdb9586789bba61ed |
| Candidate manifest | 8b42b71d6cf5a411825fdab4aebbecd3f1f6515499515b9f4dee5a1054f24c91 |
| PocketIC binary | 2e1dae35a83d8169533630c06fb0a7cb4086f71fa10fa60a5fd4137ea5f3672f |
| Control complete audit | d56d71fb7af4f436d1c9f2d57148e7cc7f183d4940ef3b30d0d4220651cdfb91 |
| Candidate complete audit | 8da20b56a9b34e677c5ad148241dee5541020dc540fcade1046daab9ea6b4579 |
The control's existing receipt records Main 904f811d with selected SDK source
c5c905dc. Of 780 shared project source paths in the two manifests, only the
scheduler Rust file and an unrelated Candid probe README differ. The complete
public Wire contract matches, and all seven workflow graphs are byte-identical.
Prepared Wasm decreases from 3,249,600 to 3,237,141 bytes.
After the canonical build ended, the pending-local host fixture's expected
private DriverId debug text was updated for the new representation. That file,
this report and the maintained call-path documentation are outside the compiled
source closure. The Heavy16 runner reports unchanged inputs throughout the run.
No Rust changed after qualification.
Diagnosis and exact design
The existing control attributes 47.91B instructions to timer-executor calls, including 9.30B page fees. Rechain has 27,600 dispatches alongside 594,000 workflow steps. Its successful replay misses immediately insert the same exact key synchronously. A negative Bloom guard can skip the first tree search but cannot eliminate the map pages needed by that insertion. It adds read/update work and a retained lifetime. An additive guard can safely retain stale bits, but it eventually saturates unless rebuilt from the complete exact set or cleared only when that set is empty. Reactor's normal completion lookups are expected hits. No Bloom guard was implemented or measured; this is a workload and code-trace rejection, not a claimed measured filter regression.
Scheduler control repeatedly looks up private driver IDs during readiness, publication, ready-ticket validation, selection and post-step membership. Replace its transient BTreeMap with a dense reusable slot table. Each ID carries a slot and a globally monotonic serial. Access checks the serial, so stale leases and queued tickets cannot address a reused slot. Serial-first ordering preserves registration order in deadline and callback-capacity sets. The existing separate publication generation still invalidates stale ready tickets.
Backing follows peak concurrent bindings, with ordinary vector spare capacity; registration churn reuses slots. Shutdown detaches drivers before destructors run, retains the identity counter, and recreates the transient table on restore. The ID widens from one to two machine words, increasing individual transient ticket/deadline keys. Priority, fair batching, callback permits, deadlines, instruction checks and transport/workflow behavior retain their existing logic. The append-only ingress queue and all persisted schemas remain unchanged.
Complete Heavy16 result
Both runs use 16 canisters, 30 arrival rounds at 1,000 requests/second, 600 ms rounds, batch 1,024, 1,900,000 batch bytes, 500M instruction budget, concurrency 4,096 and 40 callbacks. The existing qualified control is reused by exact hash. The candidate uses the unchanged guarded launcher and offline auditor.
| Complete measurement | Control | Candidate |
|---|---|---|
| Replicated instructions | 93,131,411,948 | 92,749,996,854 |
| Page-fee instructions | 48,714,400,000 | 48,709,680,000 |
| Replicated executions | 25,091 | 25,091 |
| Completion rounds / simulated ms | 49 / 29,400 | 49 / 29,400 |
| Workflow latency p50 / p95 / max, ms | 4,800 / 11,400 / 18,600 | 4,800 / 11,400 / 18,600 |
| Physical transport calls | 2,434 | 2,434 |
| Grown Wasm bytes after drain, aggregate | 269,484,032 | 269,484,032 |
| Grown stable bytes | 0 | 0 |
| Cycle debit | 367,969,735,896 | 367,206,905,708 |
Non-page instructions decrease by 376,695,094; page fees decrease by 4,720,000. The non-page category includes API/copy work and is not a pure CPU counter. Both complete ledgers include the ordinary three-execution maintenance tail. Discarded observer-query instructions increase from 10,145,619,323 to 10,149,729,710 and are reported separately from replicated work.
| Complete entry category | Control instructions | Candidate instructions | Change | Page-fee change |
|---|---|---|---|---|
start, 18,000 executions |
14,647,829,551 | 14,643,923,486 | -3,906,065 | 0 |
| Global timer, 507 executions | 321,167,191 | 329,327,938 | +8,160,747 | +8,160,000 |
| Timer executor, 858 executions | 47,911,317,707 | 47,533,758,291 | -377,559,416 | -9,920,000 |
reactor_receive, 2,434 executions |
14,335,535,002 | 14,296,689,745 | -38,845,257 | -37,280,000 |
| All reply callbacks, 3,292 executions | 15,915,562,497 | 15,946,297,394 | +30,734,897 | +34,320,000 |
Timer-executor instructions decrease 0.7880%, averaging about 440,046 fewer per execution. Global timers and callbacks regress, mostly in their page-fee ledger; the run does not include a new source-attributed page-origin capture. Callback categories are combined to avoid inferring semantic identity from local table indices. The page-placement explanation is an inference from the ledger.
All 44,272 trace rows pass the audit. Both runs have 18,000 admitted roots, 1,200 children, 19,200 completed workflows, 594,000 steps, 202,800 task attempts, 180,000 processed endpoint messages, 27,600 dispatches and 360,000 wire items. Both have zero ingress rejections, traps and reoffered frames. The normal gate verifies 1,024 canonical blocks and certified tips.
Tiny ingress and lifecycle
Across all 18,000 ingress calls, mean complete instructions decrease from 813,768.3084 to 813,551.3048. Heap accesses/dirties remain exactly 89,488/89,376, and page-fee instructions remain exactly 14,309,120,000.
The first 64 committed fresh start calls on canister zero, in canonical arrival
order, also preserve page fees: 652,500 mean instructions for page fees. Mean
complete instructions decrease from 670,421.5 to 670,204.375; median decreases
657,529 to 657,312; min/max change 657,529/826,553 to 657,312/826,336. Raw sample
rows and hashed source shards are retained in the ignored comparison evidence.
The full native RRT workspace passes 189 reported tests, including Reactor fairness, deadlines, callback reservation, no idle polling and 20,000 commands. The new regression checks stale leases/tickets against reused slots, shutdown reuse and 10,000 registrations using one logical slot. Focused Reactor checks also passed independently. The host debug assertion edit passes syntax checking; the separate multi-artifact pending-local lifecycle suite was not rerun.
The canonical wasm64 Fourcans lifecycle passes heavy graph behavior and typed blocks, populated drained KEEP preserving history/replay/counters/peers/metrics, fresh work after KEEP, rejection with pending work without loss, and continuation of the original wait followed by successful drained KEEP. No representation conversion or compatibility predecessor was added.
The first lifecycle attempt stalled before creating any instance with its deep
worktree temporary path. Its client and owned server were stopped after more
than 180 seconds, with no canister work run. Repeating the same artifact/config
with RRT_PIC_STATE_DIR=/srv/shared/code/icrustmem/playground/eg-pic created an
instance promptly and passed. The short path also controls the server's
TMPDIR/TMP/TEMP. This is consistent with the separately known Unix socket path
limit; the stalled process was not instrumented to prove that specific cause.
Review, evidence and limits
IC source reviewer /root/rrt_hylix_rounds checked local source ee8086a: each
aligned 64 KiB first access and first dirty costs 80k within one physical
execution; later executions begin fresh tracking. Cooperative 500M checks include
costs already encountered, while later cleanup belongs to the complete ledger.
These source facts remain separate from the measured pinned PocketIC artifact.
Independent review receipt from
/root/forum_analytics_review found no blocker in identity, stale tickets,
ordering, removal or shutdown. The review did not run more tests.
The bounded results receipt records the measured totals and
artifact/source boundaries. The committed portable evidence
contains complete audits/comparison, canonical manifests, all per-execution
costs, source patch/hashes and native/lifecycle/review receipts, with a standalone
hash/cost verifier. Complete artifacts, source capsules, commands,
native log, lifecycle results, rejected startup attempt, raw traces, audit and
comparison script are preserved outside the disposable worktree under
playground/rrt-engine-20261022/exact-guards/. The reused control remains under
playground/sdk-entry-20261022/results/bulk-recovery/main-gate/.
This is one deterministic complete run per exact artifact, not a statistical latency study. It qualifies Nyxus RRT only; Hylix/RRts and ordinary collection operations were not changed or measured. Grown memory is capacity, not live allocation or host RSS. Aborted DTS attempts and scheduler-only accounting are absent from this trace generation. A different built binary needs its own qualification. The parent owns integration and experiment-catalog publication.