containers / krunvm

Create microVMs from OCI images
Apache License 2.0
1.41k stars 42 forks source link

Discussion: low CPU utilization (possibly due to virtiofs?) #34

Open c3d opened 2 years ago

c3d commented 2 years ago

When trying to build a project within krunvm, I noticed relatively low CPU utilization compared to a Linux build.

Two screenshots attached to illustrate the effect, one building on Linux, the other building the same project on krunvm, in both cases using make -j12. I suspect that the use of virtiofs limits the I/O bandwidth sufficiently to starve the build, but I wonder if there is a good way to prove that. What makes me doubt, though, is that the WIO state (in red) is very low. Is that metric reliable on krunvm, or is there something that would impact it?

Linux build:

linux-build

krunvm build:

krunvm-build
slp commented 2 years ago

Is this with krunvm on macOS? I suspect steal time is not properly reported there. I haven't investigated which facilities (if any) provides Hypervisor.framework for this purpose.