stack/packages/stack-cli
Bilal Godil 30dbdffc4a faster snapshot resume via mapped-ram + rotation opt-out
Snapshot resume drops from ~14s to ~5-7s with rotation, ~2.5s without.

Build uses QEMU's mapped-ram + multifd migration capability so the RAM
state is written at page-aligned offsets in a sparse file. Runtime
decompresses the shipped .savevm.zst once to a local .raw cache and
reloads via -incoming file: + migrate-incoming on subsequent starts,
avoiding the per-start zstd decode.

Adds EMULATOR_NO_ROTATION=1 for tests/CI that don't mind the placeholder
secrets; saves the full ~3s rotation window.

Misc runtime cleanups: tighter QMP/QGA poll intervals (1s → 0.2s),
shorter socat keep-alive windows, 1s settle before the post-rotation
health-check to avoid racing old Node processes, fallback path preserves
the CLI-generated runtime-config.iso instead of blowing away VM_DIR.

Build-time qmp_session keeps stdin open briefly after the caller's
commands so migrate-set-capabilities is actually processed before
socat closes — without this, mapped-ram was silently a no-op.

CI workflow publishes .savevm.zst alongside the .qcow2 (optional asset;
CLI falls back to cold boot when missing). Test + verify steps go
through the CLI now that ISO generation is owned by packages/stack-cli.
2026-04-15 13:04:15 -07:00
..
scripts local emulator security and features fixes (#1247) 2026-04-14 15:36:24 -07:00
src faster snapshot resume via mapped-ram + rotation opt-out 2026-04-15 13:04:15 -07:00
.eslintrc.cjs Stack CLI (#1227) 2026-03-09 13:24:15 -07:00
package.json faster snapshot resume via mapped-ram + rotation opt-out 2026-04-15 13:04:15 -07:00
tsconfig.json Stack CLI (#1227) 2026-03-09 13:24:15 -07:00
tsdown.config.ts CLI init (#1242) 2026-03-13 10:55:22 -07:00
vitest.config.ts faster snapshot resume via mapped-ram + rotation opt-out 2026-04-15 13:04:15 -07:00