Related to this patch: http://gerrit.ovirt.org/#/c/7718/1/vdsm/libvirtvm.py

In _getCpuStats (libvirtvm.py) we have this logic to calculate the cpuIdle

stats['cpuIdle'] = max(0.0, 100.0 - stats['cpuUser'])

- even with a single CPU, if you fully load the VM's vcpu, the quemu process 
may take a little more than 100% CPU time on a multicore host. So in this case 
0.0 will be bigger than -0.1 and vdsm will report no load to engine, this is 
the rare case
- a more likely situation: create a multicore CPU and run a few parallel dd 
if=/dev/zero of=/dev/null. In this case stats['cpuUser'] will be more than 100, 
and again vdsm will report no load to engine

Probably this is how it should work:
- since log can be bigger than 100%, we should multiply 100 with the number of 
- If stats['cpuUser'] > 100 (* nrof(vcpus)), then the load should be the max 
possible: 100 (* nrof(vcpus)) not 0.

What do you think?


vdsm-devel mailing list

Reply via email to