Pauses that are about 10x faster, a much smaller memory footprint, I/O paths that do far less work, and host shares that stay closed unless you open them. v1.2.0 is the performance-and-hardening release: the same machine with less overhead.
Highlights
- Near-instant pauses after a resume. A VM resumed from a snapshot runs on copy-on-write RAM, and saving it used to read and rewrite every page, all 4.6 GB of it. On macOS and iOS a save now clones the snapshot file (APFS, no data copied) and writes only the pages that changed. A pause went from 1.2–2.1 s to 145–216 ms, well inside the few seconds iOS gives an app before terminating it. If anything is unusual, it falls back to a full write, and a save that's cut short is still rejected cleanly on load.
- Host shares are closed by default. Without
-mount, the host root share is now an empty, read-only directory that touches no host file. A missingworkspacedirectory no longer exposes the VM's working directory either. The guest only sees host files you hand it. - SMP hang fixed. A rare TLB-maintenance ordering could leave one core waiting forever on another (seen under
-smp 6during a heavycargo install). Multi-core guests no longer stall.
Faster I/O, fewer allocations
The hot I/O paths were reworked to allocate and copy as little as possible:
| Workload | Before | After |
|---|---|---|
| Console: 200,000 lines of output | 401,226 allocations, 77 s | 161 allocations, 22 s |
| 9p shares: copy, search and delete a large source tree | 365,774 allocations, 54 s | 29,312 allocations, 16 s |
Network: 28 MB download + npm install | 43,969 allocations | 1,725 allocations |
- Zero-copy networking. Received packets go straight from the backend into the guest's buffers, with no intermediate copies or per-packet allocations.
- Zero-copy disk writes. Block writes go from guest memory directly to the disk file, the same way reads already worked.
- Smarter 9p. Request and reply buffers are reused, path walks are built on the stack, and file-mode metadata is written at most once a second instead of on every change.
Leaner memory
- A stopped VM now leaves about 3 MB behind instead of 37 MB. Hosts that run many VMs in one process, like mobile apps, keep a flat footprint: 50 VMs back to back stay around 3.5 MB with no leaks.
- 16.5 MB less in every binary. An unused static fallback cache is gone, which takes the CLI's data segment from 17.4 MB to 0.43 MB. The embedded library and app get the same savings.
Bigger AOT builds
- Large ahead-of-time builds are practical now. 48,000 translated blocks build in about 10 minutes instead of hours, and 96,000 blocks build in about 20 minutes with modest peak memory.
Tooling
- Allocation profiling. Runtime profiles (
-Druntime-profile,TINYARM_PROFILE=1) now show the busiest allocation call sites, ready to symbolize withatos. - Snapshot save telemetry. Each live save logs what it read and wrote and where the time went (state, RAM pages, fsync).
- Leak harness.
tools/embed-leakruns N VMs in one process through the C API and reports the footprint and leaks.
Compatibility
- Snapshots from v1.1.0 load as before. The snapshot format is unchanged.
- The host root share needs
-mountnow. Guests that read host files through it without-mountwill see an empty directory. Pass-mountfor the paths you want to share.