Bug #2790

Erroneous value for FREE_CPU

Added by Laurent Grawet about 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:03/21/2014
Priority:NormalDue date:
Assignee:-% Done:


Category:Core & System
Target version:Release 4.6
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 4.4



FREE_CPU should be MAX_CPU - CPU_USAGE = 3200 - 1600 = 1600
FREE_CPU = MAX_CPU - USED_CPU = 3200 - 37 = 3163

Also, "FREE CPU" should be displayed on human readable output (onehost show $HOST_ID) and in sunstone host information tab.

oneadmin@one1:~$ onehost show 10 | egrep -i '(cpu|mem)'
TOTAL MEM             : 192G                
USED MEM (REAL)       : 88.1G               
USED MEM (ALLOCATED)  : 81.5G               
TOTAL CPU             : 3200                
USED CPU (REAL)       : 37                  
USED CPU (ALLOCATED)  : 1600                
MODELNAME="Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz" 
    ID USER     GROUP    NAME            STAT UCPU    UMEM HOST             TIME

oneadmin@one1:~$ onehost show 10 -x | egrep -i '(cpu|mem)'
    <MODELNAME><![CDATA[Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz]]></MODELNAME>




#1 Updated by Laurent Grawet about 6 years ago

Well, maybe I misunderstood the purpose of FREE_CPU but what is the opposite value of CPU_USAGE then ?

#2 Updated by Ruben S. Montero about 6 years ago

  • Status changed from Pending to Closed
  • Resolution set to worksforme

Documentation has been updated to include a description of the values, you can preview it here


CPU_USAGE is the total CPU of the VMs running in a host, the remaining CPU that can be assigned is therefore MAXCPU - CPU_USAGE

#3 Updated by Laurent Grawet about 6 years ago

Is there any variable for MAX_CPU - CPU_USAGE ?
That's what we would like to use. But I suppose I can use (MAX_CPU - CPU_USAGE) for ranking.
Anyway, it would be good to have it, just like we have FREE_CPU.

Also available in: Atom PDF