Skip to content

Implement linux-actiond - #16

Merged
dzbarsky merged 10 commits into
mainfrom
zbarsky/linux-qemu
Jun 14, 2026
Merged

Implement linux-actiond#16
dzbarsky merged 10 commits into
mainfrom
zbarsky/linux-qemu

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Jun 12, 2026

Copy link
Copy Markdown
Member

Author: zbarsky-bot

Adds ARM64 and x86_64 linux-actiond serve-vm binaries. linux-actiond embeds QEMU from the rules_qemu target toolchain and executes QEMU, the Linux kernel, the initramfs, the runtime SquashFS, and x86_64 qboot.rom from sealed memfds. Only the persistent guest-owned cas.ext4 file remains under --root.

The QEMU configuration requires KVM and host CPU passthrough. x86_64 uses microvm,acpi=off,pcie=off,x-option-roms=off,rtc=off with the KVM irqchip. The persistent CAS file uses cache=none, aio=io_uring, one IOThread, and four virtio-blk queues. The runtime SquashFS uses a buffered read-only memfd. Both architectures use virtio-mmio block devices and vhost-vsock-device.

LLVM smoke timing

GitHub Actions run 27484009487 measured revision d37b232f53981aab042bc594a6479d434bf1e1f3 on x86_64. QEMU/actiond and the Linux host used the same Linux musl target and host platform, //e2e:llvm_exec_warmup, Bazel's default job count, fresh output bases, and matching process counts.

Execution Bazel elapsed Wall elapsed Total processes Executed processes
QEMU/actiond 269.181s 269.273s 2,079 1,998
Linux host 273.404s 273.504s 2,079 1,998

QEMU/actiond was 0.985x the Linux host Bazel elapsed time. VM startup to gRPC readiness was 0.615s. The previous QEMU/TCG actiond measurement was 3,117.899s, so KVM reduced actiond elapsed time by 11.58x.

The hosted ARM64 runner does not expose KVM, so CI builds the ARM64 release binary and runs the LLVM comparison on x86_64.

@dzbarsky
dzbarsky force-pushed the zbarsky/linux-qemu branch 3 times, most recently from dd9fa48 to 0d64321 Compare June 13, 2026 17:50
@dzbarsky

Copy link
Copy Markdown
Member Author

x86_64 QEMU microvm/TCG LLVM smoke from GitHub Actions run 27474402783:

Execution Bazel elapsed Wall elapsed Total processes Executed processes
actiond 3,084.336s 3,084.609s 2,079 1,998
Linux host 272.311s 272.419s 2,079 1,998

The actiond / Linux host Bazel elapsed ratio is 11.327x. QEMU startup to gRPC readiness is 2.044s. Both measurements use the same Linux x86_64 musl target and host platform, the same warmup target, Bazel's default job count, and matching process counts.

The earlier q35/TCG result was 2,986.573s actiond / 244.129s host (12.234x), so microvm did not improve absolute actiond time in this CI comparison. The Firecracker/KVM result on PR #17 is 256.334s actiond / 246.639s host (1.039x). Firecracker's actiond time is about 12x faster than this QEMU run, but QEMU uses TCG and the measurements came from separate CI runs, so this is not a hypervisor-only comparison.

-zbarskybot

@dzbarsky
dzbarsky force-pushed the zbarsky/linux-qemu branch 3 times, most recently from 3b8436d to 1202bd5 Compare June 13, 2026 23:20
@dzbarsky dzbarsky changed the title [codex] add Linux QEMU VM host linux: run embedded QEMU from memfds Jun 13, 2026
@dzbarsky
dzbarsky marked this pull request as ready for review June 13, 2026 23:20
@dzbarsky dzbarsky changed the title linux: run embedded QEMU from memfds Implement linux-actiond Jun 13, 2026
@dzbarsky
dzbarsky force-pushed the zbarsky/linux-qemu branch from 1202bd5 to 0edb7cb Compare June 13, 2026 23:54
@dzbarsky
dzbarsky force-pushed the zbarsky/linux-qemu branch from 0edb7cb to ba79fc7 Compare June 14, 2026 00:25
@dzbarsky
dzbarsky merged commit 039699a into main Jun 14, 2026
5 checks passed
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.

2 participants