[one-users] Users Digest, Vol 41, Issue 70

Madhurranjan Mohaan mohanma at thoughtworks.com
Fri Aug 5 00:05:32 PDT 2011


Hi Aleksandar,

I just saw your email on CPU usage. I have been looking at this as well.
What I see is that Open Nebula just displays usage stats based on what KVM
does in the background. ( Assuming you are using KVM as your hypervisor).

The CPU parameters you give in Open Nebula is just to control the
overprovisioning part ( For eg, with 1 physical CPU , you want to run 5 VMs,
you would allocate 0.2 to each). What it displays is what KVM tells it to
display.  For one of our servers, I could find this  on doing a "virsh
vcpuinfo" on the VMs running. You can set affinities to make sure that
certain VMs run only on specific Cores

for i in `virsh list | grep running | cut -d " " -f3` ; do echo $i ,  `virsh
vcpuinfo $i`  ; done
one-27 , VCPU: 0 CPU: 15 State: running CPU time: 13579.7s CPU Affinity:
yyyyyyyyyyyyyyyy
one-37 , VCPU: 0 CPU: 11 State: running CPU time: 35643.0s CPU Affinity:
yyyyyyyyyyyyyyyy
one-41 , VCPU: 0 CPU: 8 State: running CPU time: 224883.1s CPU Affinity:
yyyyyyyyyyyyyyyy
one-50 , VCPU: 0 CPU: 15 State: running CPU time: 59100.8s CPU Affinity:
yyyyyyyyyyyyyyyy
one-51 , VCPU: 0 CPU: 14 State: running CPU time: 196545.6s CPU Affinity:
yyyyyyyyyyyyyyyy
one-52 , VCPU: 0 CPU: 13 State: running CPU time: 75126.3s CPU Affinity:
yyyyyyyyyyyyyyyy
one-53 , VCPU: 0 CPU: 1 State: running CPU time: 148284.6s CPU Affinity:
yyyyyyyyyyyyyyyy
one-54 , VCPU: 0 CPU: 4 State: running CPU time: 53316.7s CPU Affinity:
yyyyyyyyyyyyyyyy
one-56 , VCPU: 0 CPU: 13 State: running CPU time: 11596.5s CPU Affinity:
yyyyyyyyyyyyyyyy
one-57 , VCPU: 0 CPU: 6 State: running CPU time: 12659.4s CPU Affinity:
yyyyyyyyyyyyyyyy
one-68 , VCPU: 0 CPU: 13 State: running CPU time: 18008.8s CPU Affinity:
yyyyyyyyyyyyyyyy

For multiple CPUs, even if you allocate 2 in Open nebula, it doesn't
actually allocate 2. My feeling is you will have to use the VCPU parameter
to do that.
Refer to this link for more info -
http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/ch25s06.html

cheers

Madhurranjan



>   1. CPU usage (Aleksandar DRAGANOV)
>   2. running vms appears as suspended (Zamore, Kherry (contractor))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 29 Jul 2011 16:57:25 +0100
> From: Aleksandar DRAGANOV <s1058571 at sms.ed.ac.uk>
> To: users at lists.opennebula.org
> Subject: [one-users] CPU usage
> Message-ID: <20110729165725.4ree9zd3y8wk8o8g at www.sms.ed.ac.uk>
> Content-Type: text/plain;       charset=ISO-8859-1;     DelSp="Yes";
>        format="flowed"
>
> Hello guys,
>
> I am trying to collect some data about the CPU usage for each VM
> running. And I don't understand what are the numbers that ONe gives as
> info:
>
>   -bash-4.1$ onevm list
>     ID     USER     NAME STAT CPU     MEM        HOSTNAME        TIME
>    122 oneadmin  one-122 runn  15   1024M       hostName  01 04:42:46
>    123 oneadmin  one-123 runn  10   1024M       hostName  01 04:42:45
>    125 oneadmin  one-125 runn  19   1024M       hostName  00 18:13:36
>    126 oneadmin  one-126 runn   0   1024M       hostName2 00 18:13:32
>    127 oneadmin  one-127 runn   0   1024M       hostName2 00 18:13:30
>    130 oneadmin  one-130 runn   4      2G       hostName2 00 15:22:43
>
> What are these number 15, 10, 19? If the host has 4 core CPU and I
> have specified 1CPU per VM, is the maximum for each VM 25 or it is
> 100? Is it anything related to the CPU usage because at the time a got
> this data one-122 and one-123 were doing absolutely nothing and the
> graph in virt-manager about CPU usage agrees about that.
>
> If I specify 2 CPUs per VM in the template the instance still has only
> 1 CPU. I guess that's because the image is installed in this way. So
> how can I control this on the fly? I understand this is probably not
> ONe related question but any direction or help will be highly
> appreciated.
>
> Cheers,
> Sasho
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 29 Jul 2011 18:21:47 +0000
> From: "Zamore, Kherry (contractor)" <Kherry_Zamore at cable.comcast.com>
> To: "users at lists.opennebula.org" <users at lists.opennebula.org>
> Subject: [one-users] running vms appears as suspended
> Message-ID:
>        <
> E2C488D04AF5FB42B7B096E5238DC644220149 at PACDCEXMB01.cable.comcast.com>
> Content-Type: text/plain; charset="us-ascii"
>
> First of all, a big thank you to all the developers and supporters who make
> this project possible.  We wouldn't be here without you!
>
> I have an interesting problem where I created a method of backing up
> virtual machine disks (qcow2) by suspending the vm, copying the disk image
> locally, and resuming the vm.  Not the most elegant solution, but for what I
> need it gets the job done.  The problem occurs when the virtual machine
> manager polls a host that the backup job is currently running on.  If the vm
> is suspended, VMM puts the host into the SUSPENDED state.  However when VMM
> returns to the host for later polls, it seems the vm is ignored.  The vms
> are up and running, without issue, yet onevm shows the host as being
> suspended.  Onevm resume will cause the vm to be destroyed (there is no
> state file).
>
> I am running 2.2, do more recent versions resolve this issue?  How can I
> force VMM to poll the host or is there a way to set the state back to
> running without destroying and redeploying the vm?
>
>
>
> Thanks,
> ~kzamore
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110729/5a2e5a45/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
> End of Users Digest, Vol 41, Issue 70
> *************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110805/d5fbe7bd/attachment-0002.htm>


More information about the Users mailing list