<div dir="ltr"><div><div><div>Hi Carlos,<br><br></div>Thanks for the explanation, Few more question on this :<br><br>How many vCPU a core can manage?<br>What is the maximum vCPU that can be allocated to a VM?<br><br></div>
Thanks<br></div>Kiran Ranjane<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 20, 2014 at 9:32 PM, Carlos Martín Sánchez <span dir="ltr"><<a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><div class="gmail_extra"><div><div dir="ltr"><br></div></div><div class="gmail_quote">On Mon, Feb 17, 2014 at 4:29 PM, kiran ranjane <span dir="ltr"><<a href="mailto:kiran.ranjane@gmail.com" target="_blank">kiran.ranjane@gmail.com</a>></span> wrote:<div class="">
<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Everyone,<br><br></div>I have few questions with regards to cpu and vcpu while creating templates in Sunstone :<br>


<br></div>1) What is the difference between cpu and vcpu according to opennebula architecture?<br></div></blockquote><div> </div></div><div><div>CPU refers to the physical Host cpu cores, the one you see in the "allocated cpu" column.</div>


<div>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.</div></div><div class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div></div>2) How do we calculate vCPU, For example if I have 1 processor with 8 core then how much vCPU can I allocate.<br></div></blockquote><div><br></div></div><div>They are not related. But the scheduler will not deploy more VMs when the sum of the running VM CPU reaches 8.</div>
<div class="">

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div>3) How can I manage cpu capacity (recommendation) in a better way so that I can utilize it in optimum way.</div>


</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>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.<br>


</div><div>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?<br></div></div></blockquote>


<div><br></div></div><div>The purpose of vCPU is to allow cpu overcommitment. For example, for a host with 8 cores, you could create 4 VMs with</div><div>cpu=2, vcpu=2</div><div><br></div><div>But if your VMs workload is not very cpu-intensive, you could decide to launch 16 VMs</div>


<div>cpu=0.5, vcpu=2</div><div><br></div><div><br></div><div>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]</div>


<div><br></div><div>Regards </div><div><br></div></div></div><div class="gmail_extra">[1] <a href="http://docs.opennebula.org/stable/administration/virtualization/kvmg.html#working-with-cgroups-optional" target="_blank">http://docs.opennebula.org/stable/administration/virtualization/kvmg.html#working-with-cgroups-optional</a><br clear="all">


<div><div dir="ltr">--<br><div>Carlos Martín, MSc<br>Project Engineer</div><div>OpenNebula - Flexible Enterprise Cloud Made Simple<br><div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span></div>


</div></div></div></div></div>
</blockquote></div><br></div>