Bug #2790

Erroneous value for FREE_CPU

Added by Laurent Grawet over 7 years ago. Updated over 7 years ago.

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

0%

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

Description

Hi,

FREE_CPU should be MAX_CPU - CPU_USAGE = 3200 - 1600 = 1600
not
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                
CPUSPEED="2600" 
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)'
    <MEM_USAGE>85458944</MEM_USAGE>
    <CPU_USAGE>1600</CPU_USAGE>
    <MAX_MEM>201290752</MAX_MEM>
    <MAX_CPU>3200</MAX_CPU>
    <FREE_MEM>108942336</FREE_MEM>
    <FREE_CPU>3163</FREE_CPU>
    <USED_MEM>92348416</USED_MEM>
    <USED_CPU>37</USED_CPU>
    <CPUSPEED><![CDATA[2600]]></CPUSPEED>
    <MODELNAME><![CDATA[Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz]]></MODELNAME>
oneadmin@one1:~$ 

Thanks,

Laurent

History

#1 Updated by Laurent Grawet over 7 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 over 7 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

https://github.com/OpenNebula/docs/commit/7255884a2bb0817161ccbb27d8b2f8ce40ca24fd

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 over 7 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