Hi,<div><br></div><div>You are right Carsten. For Xen OpenNebula uses the credit scheduler to distribute the CPU cycles betwen the VMs according to the CPU attribute in the template. In the case of KVM you can achieve that with cgroups, a hook can automatically set the share for the KVM process...</div>

<div><br></div><div>Cheers</div><div><br></div><div>Ruben <br><br><div class="gmail_quote">On Fri, Nov 26, 2010 at 12:55 AM,  <span dir="ltr"><Carsten.Friedrich@csiro.au></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">










<div lang="EN-AU" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">As far as I can tell, for KVM, the CPU value is only used in the
OpenNebula scheduler to prevent over-allocation. So, if you have defined the
host as having 2 CPUs the scheduler will run e.g. 1 VM requesting CPU 2.0, or 2
VMs requesting CPU 1.0, or 4 VMs requesting CPU 0.5 (each) on this host. For
KVM, it seems that once running on the hypervisor the CPU value is not enforced.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">c</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">

<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> <a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a>
[mailto:<a href="mailto:users-bounces@lists.opennebula.org" target="_blank">users-bounces@lists.opennebula.org</a>] <b>On Behalf Of </b>Luca Lorenzini<br>
<b>Sent:</b> Friday, 26 November 2010 3:59<br>
<b>To:</b> <a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>
<b>Subject:</b> [one-users] CPU Issue</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal">I'm launching 3 vm with CPU=0.4 on a host dual core, but i
noticed that the vms use more than 0.4 of the cpu. top command show me this:<br>
<br>
PID USER      PR  NI  VIRT  RES 
SHR S %CPU %MEM    TIME+ 
COMMAND                                                        
<br>
24274 root      20   0  577m 504m 2868
S   90 25.7   0:31.77
kvm                                                            
<br>
24964 root      20   0  577m 511m 2864
S   60 26.1   0:29.77
kvm                                                            
<br>
23724 root      20   0  577m 497m 2868
S   35 25.4   0:34.60 kvm     <br>
<br>
kvm use 90% of the cpu, not just 40%</p>

</div></div></div>

</div>


<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dr. Ruben Santiago Montero<br>Associate Professor (Profesor Titular), Complutense University of Madrid<br><br>URL: <a href="http://dsa-research.org/doku.php?id=people:ruben" target="_blank">http://dsa-research.org/doku.php?id=people:ruben</a><br>

Weblog: <a href="http://blog.dsa-research.org/?author=7" target="_blank">http://blog.dsa-research.org/?author=7</a><br>
</div>