[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] confusions on monitoring VM cpu usage in Xenhypervisor
[please, don't drop the list. Re-added] On lun, 2014-02-24 at 10:30 +0800, Charles wrote: > Thanks for your reply. > 1.The VM usage I mean here is similar to the result of command top in the VM. > Ok, but still, when running top inside the VM, which part are you interested in? How busy the various vCPUs are or what (as in what process/OS component) is actually keeping the busy? That matters because, how busy they are is something that you, to some extent, see in Xen, as it is at lest bound to how much he various vCPUs want to run on the host's pCPUs, and that's the hypervisor's scheduler's job! If you want to know what process they're running, at what time that started, etc., what's the "priority" (inside the VM) then this is something I don't think you can easily have Xen aware of, unless you introduce some kind of scheduler paravirtualization. > 2."use the usage information in Credit" means I want to use the usage > information to guess the workload type running in the VM > Still too few info (see above). xentop tells already whether a particular vCPU is getting, say, 5% of pCPU time. Have something like that inside Xen should not be that hard. What it does not (xentop) tell is whether a particular vCPU, despite getting 5%, is asking for more, and only getting that for whatever reason. That has to do with the estimation of the system load that I was mentioning, which is embedded in credit2 right now, but can be generalized. So, which one, if any, of the above are you after? > To the best of my knowledge, when in physical OS, the CPU may be idle or > busy. Then the OS CPU usage can be computed by (busy_time / (idle_time + > busy_time)) > If the vCPU is running the on pCPU and it's consuming pCPU cycles all the > time, then is it mean idle_time = 0? then how to I compute the CPU usage? > Err... from Xen's perspective, if a vCPU is always running, then idle_time=0, then (busy_time/(idle_time+busy_time))=1, which matches with the concept of being "always running". I'm sure I'm missing something of what you meant here... Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |