I have a host Ubuntu 18.04 64-bit os running on a 24-core Xeon system. I've allocated 2 vCPUs to the guest which is Ubuntu 18.04 32-bit, and it's running an application which normally requires a small amount of CPU. However I cannot understand these metrics from glances
. On the guest I see this:
and I can't tell why the total CPU is 4.4% when the top few individual process CPU comes to 27.3%.
And on the host, total CPU utilisation for the qemu-system-x86_64
is higher again (around 35%–40% steady state, and there are 2 guests running at the moment), but the overall CPU usage is also really low (i.e. 4.9% in this snapshot):
I tried switching between IRIX and non-IRIX CPU modes, and the numbers still don't seem to add up. Top gives similar mismatched figures (high for individual processes, low overall utilisation on both guest and host).
So, my 2 questions:
- How to understand these figures, and get an overall picture of the load on a the guest & host?
- Whether the discrepancy between the total (about 27.7%) on the guest, and the even higher utilisation on the host of that process (39.6%) means there's something configured badly in the kvm setup, or about right for expected overhead.
Regarding the kvm configuration, this is the guest cpu definition:
<cpu mode='host-passthrough' check='partial' migratable='on'>
<numa>
<cell id='0' cpus='0-1' memory='4194304' unit='KiB' memAccess='shared'/>
</numa>
</cpu>
and I'm using virtio and virtio-fs mounts.