[one-users] Need some details on CPU/vCPU in Sunstone and capacity planning.

Carlos Martín Sánchez cmartin at opennebula.org
Thu Feb 20 08:02:41 PST 2014


On Mon, Feb 17, 2014 at 4:29 PM, kiran ranjane <kiran.ranjane at gmail.com>

> Hi Everyone,
> I have few questions with regards to cpu and vcpu while creating templates
> in Sunstone :
> 1) What is the difference between cpu and vcpu according to opennebula
> architecture?

CPU refers to the physical Host cpu cores, the one you see in the
"allocated cpu" column.
vCPU is simply the number of cpus that the VM guest will see, but it does
not affect the physical resources assigned to the VM.

2) How do we calculate vCPU, For example if I have 1 processor with 8 core
> then how much vCPU can I allocate.

They are not related. But the scheduler will not deploy more VMs when the
sum of the running VM CPU reaches 8.

> 3) How can I manage cpu capacity (recommendation) in a better way so that
> I can utilize it in optimum way.
4) Any calculation on CPU or formula that we need to use before assigning
> it to Virtual machine, For example if I use 1 CPU in the virtual machine it
> uses 1 core of the processor? is this correct.
> 5) What is the use of vCPU, If I have allocated 1 CPU and 2 vCPU to the
> virtual machine thus that mean it will use 1 core of the physical and
> inside the VM it will show 2 cpu assigned to it?

The purpose of vCPU is to allow cpu overcommitment. For example, for a host
with 8 cores, you could create 4 VMs with
cpu=2, vcpu=2

But if your VMs workload is not very cpu-intensive, you could decide to
launch 16 VMs
cpu=0.5, vcpu=2

To ensure that the VMs are not using more CPU than the amount assigned, you
may need to configure your hypervisor. For example, in kvm you need to
configure cgroups [1]


Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | cmartin at opennebula.org |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140220/f83229ea/attachment-0002.htm>

More information about the Users mailing list