Bug #54

Host Memory from xen.rb probe

Added by Ruben S. Montero over 10 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

100%

Category:Drivers - Auth
Target version:Release 1.2.1
Resolution:fixed Pull request:
Affected Versions:

Description

The following was reported by Marcos Dias de Assuncao, in the mailing list

We noticed that after rebooting the hosts' free memory informed by >the xen probe seemed a little strange. Then we started OpenNebula >with no hosts and added two hosts again (i.e. gieseking and >billabong), each with 2GB of RAM and a few MBs reserved to dom0 in
xend-config.sxp. The command 'onehost list' reported:

  HID NAME        RVM   TCPU   FCPU   ACPU    TMEM     FMEM STAT
    0 gieseking     0    200    196    200 2094080   129024   on
    1 billabong     0    200    200    200 2094080   129024   on

We submitted a request whose template is:

NAME     = susebox
CPU      = 1
MEMORY   = 256
OS       = [kernel="/boot/vmlinuz-2.6.25.18-0.2-xen",initrd="/boot/ 
initrd-2.6.25.18-0.2-xen",kernel_cmd="rw",root="hda1"]
DISK     = [source="/home/oneadmin/vm/domains/opensuse11/ 
[[OpenSuse]]11.img",target="hda1",readonly="no", clone="no"]
NIC      = [mac="00:16:3e:01:01:01"]
#GRAPHICS = [type="vnc",listen="127.0.0.1",port="5900"]

and of course, 'onevm list' reported the VM as pending because the
hosts did not have enough memory:

   ID     NAME STAT CPU     MEM        HOSTNAME        TIME
    6  susebox pend   0       0                 00 00:02:19

We found that the xen probe (ONE_LOCATION/lib/im_probes/xen.rb) >uses 'sudo xm info' to obtain information about the host. The >command on billabong reveals:

total_memory           : 2045
free_memory            : 126
max_free_memory        : 1678
max_para_memory        : 1674
max_hvm_memory         : 1662

If I start the same VM directly on the host, xm will create the
domain. The command 'xm info' shows the following during the VM's
execution:

free_memory            : 1
max_free_memory        : 1422
max_para_memory        : 1418
max_hvm_memory         : 1406

A new run of 'sudo xm info' on billabong after the VM is shut down
shows:

total_memory           : 2045
free_memory            : 257
max_free_memory        : 1678
max_para_memory        : 1674
max_hvm_memory         : 1662

And 'onehost list' now shows the updated information:

  HID NAME           RVM   TCPU   FCPU   ACPU    TMEM     FMEM STAT
    0 gieseking        0    200    191    200 2094080   129024   on
    1 billabong        0    200    200    200 2094080   263168   on

The reason for the change in free_memory is that dom0 will balloon
out when needed to free memory for domUs. We believe that the probe
should report max_free_memory. This way, we changed the following
lines of ONE_LOCATION/lib/im_probes/xen.rb:

when 'free_memory'
         memory_info[:free]=columnsr1.to_i*1024

to:

when 'max_free_memory'
         memory_info[:free]=columnsr1.to_i*1024

Associated revisions

Revision 42bca417
Added by Tino Vázquez about 10 years ago

Backported Fix in [403] for ticket #54 to the 1.2 branch.

git-svn-id: http://svn.opennebula.org/one/branches/one-1.2@404 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 16d82702
Added by Tino Vázquez about 10 years ago

Fix for ticket #54

git-svn-id: http://svn.opennebula.org/one/trunk@407 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 32b676ff
Added by Tino Vázquez about 10 years ago

Backporting fix in [407] for ticket #54 to the 1.2 branch.

git-svn-id: http://svn.opennebula.org/one/branches/one-1.2@412 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision efb64dc5
Added by Javi Fontan almost 10 years ago

Modified xen im probe to deal with #54

git-svn-id: http://svn.opennebula.org/one/trunk@431 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 07f5f03d
Added by Javi Fontan almost 10 years ago

Modified xen im probe to deal with #54

git-svn-id: http://svn.opennebula.org/one/branches/one-1.2@431 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision 0dfe0a58
Added by Javi Fontan almost 10 years ago

Bug in xen im probe (#54)

git-svn-id: http://svn.opennebula.org/one/trunk@449 3034c82b-c49b-4eb3-8279-a7acafdc01c0

Revision ee4a4017
Added by Javi Fontan almost 10 years ago

Bug in xen im probe (#54)

git-svn-id: http://svn.opennebula.org/one/branches/one-1.2@465 3034c82b-c49b-4eb3-8279-a7acafdc01c0

History

#1 Updated by Ruben S. Montero over 10 years ago

Additionally instead of using ballooning Dom0 can be configured to use very little memory, which is also a very common configuration, and it does not suffer the problem described here. As the deadline for releasing the 1.2 version of OpenNebula has already expired, this change will not be address for this release. The issue and the patch would be spelled out in the release notes.

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

Moving to 1.2.1

#3 Updated by Tino Vázquez about 10 years ago

  • Status changed from New to Assigned

Fixed in r403.

#4 Updated by Tino Vázquez about 10 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

#5 Updated by Tino Vázquez about 10 years ago

Sorry, fixed in r407.

#6 Updated by Ruben S. Montero almost 10 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from Tino Vázquez to Javi Fontan
  • Resolution deleted (fixed)

It seems that this breaks the last version of Xen. We are going to revert the change, and add support for both attributes.
This MUST be applied to 1.2 and trunk branches

#7 Updated by Javi Fontan almost 10 years ago

  • % Done changed from 0 to 80

Changes are added to both 1.2 branch and trunk. More testing is needed to close this ticket.

#8 Updated by Javi Fontan almost 10 years ago

  • Status changed from Assigned to 3
  • % Done changed from 80 to 100
  • Resolution set to fixed

Testing has been done and the new im probe works for new and old xen versions.

#9 Updated by Ruben S. Montero over 7 years ago

  • Status changed from 3 to Closed

Also available in: Atom PDF