On Thu, Sep 06, 2012 at 07:44:13AM -0400, Laszlo Hornyak wrote: > hi! > > 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']) > > Problems: > - 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 vcpus. > - If stats['cpuUser'] > 100 (* nrof(vcpus)), then the load should be the max > possible: 100 (* nrof(vcpus)) not 0. > > What do you think?
I'm all for dropping this meaningless number from vm statistics. See my ack on your http://gerrit.ovirt.org/7892 _______________________________________________ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel