Skip to content

Investigate & benchmark cold TCG boot-time optimizations (virtio-rng, random.trust_cpu, snapshot/restore) #83

Description

@Xiddoc

First boot of the binder: vm TCG path took ~8 minutes on a no-KVM host (accel: auto correctly fell back to TCG). The QEMU launcher (vm/qemu.py ~252–276) uses -accel tcg,thread=multi,tb-size=1024 -cpu max and appends console=ttyS0 root=/dev/vda rw init=/init panic=1 mitigations=off — notably no RNG device and no random.trust_cpu=on, so Android init may stall on entropy (amplified under TCG).

This is an investigation, not a confirmed fix: benchmark cold-boot wall time with vs. without -device virtio-rng-pci and with random.trust_cpu=on, on the same host, several runs each. Separately, document/validate snapshot/restore (cli.py:snapshot/restore) as the warm-start path — boot once, snapshot the booted state, restore for near-instant subsequent starts.

Do not add vCPUs: the design log (vm-rnd-log §B.5) and resolve_smp already found -smp 4 optimal and -smp 8 regressing under MTTCG.

Acceptance: a short report with numbers on the RNG options, and a documented snapshot/restore warm-start workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions