Repository navigation
rapido-vm: set romfile= on virito-net devices - #286
Merged
Merged
Conversation
The default behaviour causes a significant stall. E.g. measurements on my laptop (tumbleweed 7.2.11-1-default kernel, ~commit 6533056 rapido, qemu-x86-11.1.2-1.1.x86_64): rapido> ./rapido cut -B -x shutdown simple-network initramfs initrds/myinitrd written (38673296 bytes) Seabios (default): QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci" rapido> time ./rapido boot > /dev/null real 0m6.717s user 0m2.251s sys 0m0.555s UEFI: QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin" rapido> time ./rapido boot > /dev/null real 0m7.563s user 0m2.863s sys 0m0.796s https://gist.github.com/mcastelino/7ab9dba51b0dbb230bd18c448d935312 indicates that the stall is due to PXE boot, which can be disabled via the romfile= QEMU network device parameter. The manually added parameter results in: Seabios: QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci" cargo build --release Compiling rapido v0.1.0 (/home/ddiss/isms/rapido-utils/rapido) Finished `release` profile [optimized] target(s) in 1.26s rapido> time ./rapido boot > /dev/null real 0m2.661s user 0m2.105s sys 0m0.554s QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin" rapido> time ./rapido boot > /dev/null real 0m3.376s user 0m2.645s sys 0m0.694s So the romfile= parameter more than halves the simple-network boot (and subsequent shutdown) time. It probably makes sense to add a QEMU_NET_DEV_EXTRA_ARGS or similar config option, but let's just hardcode it for now and hope that we can get away with it. Link: rapido-linux#285 Signed-off-by: David Disseldorp <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default behaviour causes a significant stall.
E.g. measurements on my laptop (tumbleweed 7.2.11-1-default kernel, ~commit 6533056 rapido, qemu-x86-11.1.2-1.1.x86_64):
rapido> ./rapido cut -B -x shutdown simple-network initramfs initrds/myinitrd written (38673296 bytes)
Seabios (default):
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"
rapido> time ./rapido boot > /dev/null
real 0m6.717s
user 0m2.251s
sys 0m0.555s
UEFI:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"
rapido> time ./rapido boot > /dev/null
real 0m7.563s
user 0m2.863s
sys 0m0.796s
https://gist.github.com/mcastelino/7ab9dba51b0dbb230bd18c448d935312 indicates that the stall is due to PXE boot, which can be disabled via the romfile= QEMU network device parameter. The manually added parameter results in:
Seabios:
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci"
cargo build --release
Compiling rapido v0.1.0 (/home/ddiss/isms/rapido-utils/rapido)
Finished
releaseprofile [optimized] target(s) in 1.26srapido> time ./rapido boot > /dev/null
real 0m2.661s
user 0m2.105s
sys 0m0.554s
QEMU_EXTRA_ARGS="-nographic -device virtio-rng-pci -bios /usr/share/qemu/ovmf-x86_64-4m.bin"
rapido> time ./rapido boot > /dev/null
real 0m3.376s
user 0m2.645s
sys 0m0.694s
So the romfile= parameter more than halves the simple-network boot (and subsequent shutdown) time.
It probably makes sense to add a QEMU_NET_DEV_EXTRA_ARGS or similar config option, but let's just hardcode it for now and hope that we can get away with it.
Link: #285