This repository was archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Cloud Hypervisor Performance Metrics
Dom edited this page Feb 27, 2023
·
7 revisions
$ ./scripts/dev_cli.sh tests --metrics
Compiling hypervisor v0.1.0 (/cloud-hypervisor/hypervisor)
error[E0433]: failed to resolve: use of undeclared crate or module `mshv`
--> hypervisor/src/lib.rs:77:8
|
77 | if mshv::MshvHypervisor::is_available()? {
| ^^^^ use of undeclared crate or module `mshv`
error[E0433]: failed to resolve: use of undeclared crate or module `mshv`
--> hypervisor/src/lib.rs:78:16
|
78 | return mshv::MshvHypervisor::new();
| ^^^^ use of undeclared crate or module `mshv`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `hypervisor` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
It looks cloud hypervisor does not support mshv for arm64 (https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/release-notes.md#release-binary-supports-both-mshv-and-kvm).
Release Binary Supports Both MSHV and KVM
On x86-64 the binary included in releases supports both the KVM and MSHV hypervisor with runtime detection to identify the correct hypervisor to use.
So change scripts/run_metrics.sh to disable mshv in cloud hypervisor:
diff --git a/scripts/run_metrics.sh b/scripts/run_metrics.sh
index ea4aa990..ed7b4b39 100755
--- a/scripts/run_metrics.sh
+++ b/scripts/run_metrics.sh
@@ -92,7 +92,8 @@ if [[ "${BUILD_TARGET}" == "${TEST_ARCH}-unknown-linux-musl" ]]; then
CFLAGS="-I /usr/include/${TEST_ARCH}-linux-musl/ -idirafter /usr/include/"
fi
-cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET
+#cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET
+cargo build --no-default-features --features "kvm" --all --release --target $BUILD_TARGET
# setup hugepages
echo 6144 | sudo tee /proc/sys/vm/nr_hugepages
We can get metrics:
{
"git_human_readable": "v28.0-231-g3df82337-dirty",
"git_revision": "3df82337f1f3bc81f04d787fdd98c8c612b1099f",
"git_commit_date": "Fri Jan 13 01:34:59 2023 +0000",
"date": "Wed Jan 18 13:33:04 UTC 2023",
"results": [
{
"name": "boot_time_ms",
"mean": 295.95369999999997,
"std_dev": 10.243182533275483,
"max": 316.84599999999995,
"min": 285.472
},
... ...
It is interesting to note, linux kernel supports booting linux guest on MS hyper-v on ARM64 HW: https://lore.kernel.org/all/1628092359-61351-1-git-send-email-mikelley@microsoft.com/ . How to test MSHV on arm64?
- How to install hyper-v on ARM64 HW (https://cloudbase.it/linux-on-windows-hyper-v-arm64/)?
- Run Linux in hyper-v root partition (https://scholz.ruhr/blog/hyper-v-on-linux-yes-this-way-around/)
- Run CLH in root partition
- Create ARM64 VMs