Xiddoc / Xiddoc/Beetroot

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

Open
#83 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vm/qemu.py around lines 252–276 and inspect cli.py's snapshot and restore commands. Benchmark cold TCG boots on the same no-KVM host with and without virtio-rng-pci and random.trust_cpu=on across several runs, without changing vCPU counts. Document the measured RNG results and a validated boot-once, snapshot, and restore workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.