You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: shard the default microVM suite by scenario duration #696
Partition the default scenarios by observed duration, not count.
Start with separate restore/snapshot/time-ABI and network/filesystem/lifecycle groups.
Run each scenario exactly once per required guest, backend, kernel type, and processor count, and fail when a default scenario is in no shard or in more than one.
Keep debug-kernel coverage and its platform rules: pull requests run it on KVM only, and dev pushes and full runs on every backend.
Aggregate the shards into the required status, release, and performance-persistence gates, failing closed.
Give each shard's failure logs a distinct artifact name.
PR #763 implements this issue. This comment records the data behind the partition and the shard count, and the timings before and after. I'll update it with the post-merge comparison.
Scenario durations
Source: the nvx-microvm-durations-* artifacts (#707) of the 18 CI runs that had them by 2026-10-22 16:25 UTC, which scripts/nvx_tools/microvm_shards.json lists: the PR runs of #707 and #706, the dev pushes of 0e73e460f (39777444440), b5af359c9 (39783750996), 911d5d86e (39788615461), 2724c69fc (39792079980, the first after the #706 split), c9aa40666 (39801222132), and a6785cd0b (39804644654), the other PR runs since #707 merged, and #763's first two runs. Only the default suite's reports count (Alpine, default kernel, processors 1 2 4 8), sharded or not, of runs that ended, and a scenario only when all of its executions passed, so the two cancelled runs contribute the scenarios that they finished. The medians are per backend, to 0.1 s, as plan-microvm-shards computes them.
Raw table: per-scenario median, sample count, and range, in seconds, and each scenario's shard
The backends differ materially: console-snapshot takes 49.1 s on KVM, 1.0 on MSHV, and 3.9 on WHP; console-exit 25.2, 27.2, and 87.5 s; private-network-ingress 31.3, 31.6, and 17.4 s; managed-lifecycle 4.2, 4.3, and 17.8 s. The best partition common to all three backends that a local search found left the longest KVM and MSHV shards about 5% (12 s) above an even split, so each backend has its own partition.
Partition
The first plan used the 13 runs available at 14:50 UTC. It started from the two groups proposed here: restore/snapshot/time ABI (console-snapshot, cpu-profile-fallback, endpoint-policy-snapshot, filesystem-snapshot, network-snapshot, restore-downtime, restore-memory, restore-processors, scratch-snapshot, smp, smp-snapshot, snapshot-core, snapshot-tiers, time-abi-conformance) and network/filesystem/lifecycle (the other 22). One swap per backend balanced them. Planned again from all 18 runs, as the documented regeneration does, every scenario stayed in its shard:
Backend
Default suite
Proposed groups (13 runs)
Shards (18 runs)
Swap of the first plan
KVM
457.7 s
247.5 / 210.1 s
228.8 / 228.9 s
smp ↔ filesystem-comma-paths
MSHV
416.0 s
203.1 / 213.3 s
208.0 / 208.0 s
time-abi-conformance ↔ directional-network-policy
WHP
601.5 s
287.2 / 309.1 s
300.4 / 301.1 s
snapshot-core ↔ host-loopback-policy
doc/ci.md#microvm-test-shards describes how to regenerate the partition.
Two shards per backend make each shard job about as long as the guest and sandbox job beside it. A third shard (≈3.2, 3.0, and 4.0 min) would end before the WHP guest and sandbox job, so it wouldn't shorten WHP; and on KVM, and on MSHV for dev pushes and full runs, the two shards, the guest and sandbox job, and the debug-kernel job already fill the four general runners, so it would mostly queue. The debug-kernel jobs (3–5 min) stay unsharded.
This PR's three runs are full-matrix runs, since it changes ci.yml, so the OpenVMM suites (≈18–21 min) bound their wall time. Per backend, the default suite's lane runs from when its jobs became ready to when its last shard ended:
Run
Backend
Shard 1: queue, job (suite)
Shard 2: queue, job (suite)
Lane
39805377165 (e2c88625f, superseded after its microVM jobs)
Minutes. Against the single default-suite job of the three runs after #706, measured the same way:
Backend
Lane before
Lane after
Shard queue after
KVM
12.0, 14.8, 12.6 (job 8.1–8.6 after a queue of 3.9–6.8)
12.4, 4.7, 8.0
0.1–8.0
MSHV
7.8, 9.1, 7.8
5.1, 4.7, 5.3
0.1–0.2
WHP
10.9, 11.3, 10.5
6.3, 6.5, 6.9
0.1–0.2
WHP: the default suite's lane dropped from 10.5–11.3 to 6.3–6.9 min, and the last WHP microVM job ended 12.0–12.4 min into each run, against 14.5–18.6 before.
KVM queues: KVM's four general runners hold the Linux VMM-test build and then its KVM leg, the two shards, the guest and sandbox job, and the debug-kernel job, and overlapping runs share them. A shard waited 8.0 min in the first run, while a dev push held two of the four, and 2.5 and 3.5 min in the third, while another run held one; the guest and sandbox job waited 3.2 min in the second. Even so, KVM's lane was shorter than any of the three before.
Runs that skip both OpenVMM suites: without the OpenVMM suites, the second and third runs would have ended when Platform / Windows / WHP did, at 14.5 and 16.2 min, or about 15 and 16.5 with the regression gate and the required check after it. That job (8.9 min) starts after NVX CLI / Windows (3.8–5.3 min) and waits for its pool's single benchmark runner (0.1, 2.0, and 5.5 min here), so it, not the microVM tests, now bounds those runs, at about 15 min when that runner is free.
The 15-minute target
Runs that skip both OpenVMM suites now approach it but don't reliably meet it. The WHP microVM jobs end about 12 min into a run, so Platform / Windows / WHP bounds those runs instead. That job takes 8.9 min, starts after NVX CLI / Windows (3.8–5.3 min), and waits for its pool's single benchmark runner, so those runs take about 15 min when that runner is free, and more when it isn't. Runs that skip the platform jobs too, such as microVM-test-only changes, should end in about 12 min, unless KVM queues. KVM's four general runners, shared by overlapping runs, are the other bound: a KVM shard waited 2.5–8.0 min in two of the three runs.
Post-merge verification
Five comparable dev runs after the merge against five before it: per-shard durations, per-pool queue times, each backend's default-suite lane, and the wall time of runs that skip both OpenVMM suites.
Re-plan the partition from the first nightly and post-merge reports if a backend's shards drift apart by more than a few seconds.
Activity
microvm tests: record each scenario's duration in a JSON Lines report
ci: upload the scenario duration reports of every microVM job
ppenna commentedon Oct 22, 2026
Shard plan and measurements for #763
PR #763 implements this issue. This comment records the data behind the partition and the shard count, and the timings before and after. I'll update it with the post-merge comparison.
Scenario durations
Source: the
nvx-microvm-durations-*artifacts (#707) of the 18 CI runs that had them by 2026-10-22 16:25 UTC, whichscripts/nvx_tools/microvm_shards.jsonlists: the PR runs of #707 and #706, thedevpushes of0e73e460f(39777444440),b5af359c9(39783750996),911d5d86e(39788615461),2724c69fc(39792079980, the first after the #706 split),c9aa40666(39801222132), anda6785cd0b(39804644654), the other PR runs since #707 merged, and #763's first two runs. Only the default suite's reports count (Alpine, default kernel, processors 1 2 4 8), sharded or not, of runs that ended, and a scenario only when all of its executions passed, so the two cancelled runs contribute the scenarios that they finished. The medians are per backend, to 0.1 s, asplan-microvm-shardscomputes them.Raw table: per-scenario median, sample count, and range, in seconds, and each scenario's shard
Runs (18): 39619765285-1, 39666359892-1, 39777444440-1, 39778084391-1, 39779640214-1, 39780305955-1, 39782906524-1, 39783750996-1, 39785367867-1, 39785687509-1, 39788615461-1, 39791725058-1, 39792079980-1, 39801222132-1, 39804644654-1, 39805377165-1, 39807968692-1, 39810434285-1
console-exitrestore-downtimesmp-snapshotipv6-egress-policyl3-l4-egress-protocolssmprestore-processorshost-loopback-policyl3-l4-egress-port-rangesl3-l4-egress-policymanaged-lifecyclenetwork-snapshotprivate-network-ingresssnapshot-corerestore-memoryendpoint-policy-snapshotsnapshot-tiersscratch-snapshotfilesystem-snapshotdirectional-network-policyfilesystem-sharesfilesystem-comma-pathsfilesystem-policyvirtio-netcpu-profile-fallbackconsole-snapshotcommand-line-limitlifecycletime-abi-conformancedenied-filesystem-pathssandbox-blocksworkload-identityguest-bootguest-identitystructured-outcomefilesystem-ownerThe backends differ materially:
console-snapshottakes 49.1 s on KVM, 1.0 on MSHV, and 3.9 on WHP;console-exit25.2, 27.2, and 87.5 s;private-network-ingress31.3, 31.6, and 17.4 s;managed-lifecycle4.2, 4.3, and 17.8 s. The best partition common to all three backends that a local search found left the longest KVM and MSHV shards about 5% (12 s) above an even split, so each backend has its own partition.Partition
The first plan used the 13 runs available at 14:50 UTC. It started from the two groups proposed here: restore/snapshot/time ABI (
console-snapshot,cpu-profile-fallback,endpoint-policy-snapshot,filesystem-snapshot,network-snapshot,restore-downtime,restore-memory,restore-processors,scratch-snapshot,smp,smp-snapshot,snapshot-core,snapshot-tiers,time-abi-conformance) and network/filesystem/lifecycle (the other 22). One swap per backend balanced them. Planned again from all 18 runs, as the documented regeneration does, every scenario stayed in its shard:smp↔filesystem-comma-pathstime-abi-conformance↔directional-network-policysnapshot-core↔host-loopback-policydoc/ci.md#microvm-test-shardsdescribes how to regenerate the partition.Shard count
Before the change, in the three runs after #706 (39779640214, 39785687509, 39792079980):
Two shards per backend make each shard job about as long as the guest and sandbox job beside it. A third shard (≈3.2, 3.0, and 4.0 min) would end before the WHP guest and sandbox job, so it wouldn't shorten WHP; and on KVM, and on MSHV for
devpushes and full runs, the two shards, the guest and sandbox job, and the debug-kernel job already fill the four general runners, so it would mostly queue. The debug-kernel jobs (3–5 min) stay unsharded.After: #763's CI runs
This PR's three runs are full-matrix runs, since it changes
ci.yml, so the OpenVMM suites (≈18–21 min) bound their wall time. Per backend, the default suite's lane runs from when its jobs became ready to when its last shard ended:e2c88625f, superseded after its microVM jobs)bf0bfe346)000b1a1d7)Minutes. Against the single default-suite job of the three runs after #706, measured the same way:
devpush held two of the four, and 2.5 and 3.5 min in the third, while another run held one; the guest and sandbox job waited 3.2 min in the second. Even so, KVM's lane was shorter than any of the three before.Platform / Windows / WHPdid, at 14.5 and 16.2 min, or about 15 and 16.5 with the regression gate and the required check after it. That job (8.9 min) starts afterNVX CLI / Windows(3.8–5.3 min) and waits for its pool's single benchmark runner (0.1, 2.0, and 5.5 min here), so it, not the microVM tests, now bounds those runs, at about 15 min when that runner is free.The 15-minute target
Runs that skip both OpenVMM suites now approach it but don't reliably meet it. The WHP microVM jobs end about 12 min into a run, so
Platform / Windows / WHPbounds those runs instead. That job takes 8.9 min, starts afterNVX CLI / Windows(3.8–5.3 min), and waits for its pool's single benchmark runner, so those runs take about 15 min when that runner is free, and more when it isn't. Runs that skip the platform jobs too, such as microVM-test-only changes, should end in about 12 min, unless KVM queues. KVM's four general runners, shared by overlapping runs, are the other bound: a KVM shard waited 2.5–8.0 min in two of the three runs.Post-merge verification
devruns after the merge against five before it: per-shard durations, per-pool queue times, each backend's default-suite lane, and the wall time of runs that skip both OpenVMM suites.microvm tests: split the default suite into duration-balanced shards
microvm tests: split the default suite into duration-balanced shards