4

Can some one explain me why there is difference in available memory on Guests with same configuration:

Hypervisor:xen 4.2 64 bit

VM1: Centos 5.7 with 2.6.18-274.el5xen,

Assigned memory from xen is exactly same as memory inside guest 524288k (512m)

free -k
     total       used       free     shared    buffers     cached
Mem:        524288     445004      79284          0      18040     182652
-/+ buffers/cache:     244312     279976
Swap:       524280          0     524280

despite showing

" Memory: 500984k/524288k available (2533k kernel code, 23212k reserved, 1746k data, 196k init) "

dmesg:http://pastebin.com/FmVRniLJ

Question1:

here Why free showed exact memory,where dmesg clear showed 2.5mb for kernel code and 23mb as reserved.

VM2: redhat6.0 with 2.6.32

free -k

total       used     free     shared    buffers   cached
502224     122064     380160     0       7636      32648

For same resources RHEl6.0 with pvopskernel is showing 502224k.

Question2:

What could be the reason for this behavior can this has something to do with with pvops kernel(linux-kernel with xen support)

ananthan
  • 1,530

4 Answers4

1

Q1: Propably used by the crash-kernel(?)

Q2: I have not seen this behaviour on a SLES11 SP2 DomU (also a Linux 3.0 kernel, no pvops).

What I see from dmesg is a RAM-disk on Ubuntu - this disk is propably not been freed later on?

Not sure here, since your dmesg output just shows the XEN-part of the boot-process, not the following "normal" bootprocess of the OS.

Nils
  • 7,815
1

Question 1:

Why free showed exact memory,where dmesg clear showed 2.5mb for kernel code and 23mb as reserved.

I'm not sure your interpretation is correct. free is showing you 524288k total and so is dmesg. dmesg is showing that at the time of boot, the kernel and associated reservations are using up approximately 25m, leaving 500984k available. Later, when you run free, there are other programs running, so there is less available memory. But both are reporting the same total in VM1.

Question 2:

What could be the reason for this behavior can this has something to do with with pvops kernel(linux-kernel with xen support) or is it because of any changes in Linux 3.0+ Memory Management.

I think you are asking Why are these two VMs different? I'm going to go with the answer: "not enough information". There are many reasons the two VMs could report different information, none of them necessarily specific to the fact that they are DomU in Xen (I suspect you'd similar differences on bare metal, or VMware, etc.):

  1. They have different number of CPUs
  2. They are using different boot strings (VM1 has ro root=/dev/VolGroup00/LogVol00 console=xvc0 graphical utf8 and VM2 has root=UUID=ef8a64ee-140d-46b5-8061-231d81e1c7a0 ro console=hvc0 quiet splash $vt_handoff
  3. The kernels may be compiled with drastically different defaults (and they likely are, since VM1 is RedHat based and VM2 is Debian based)
Jed Daniels
  • 7,452
  • 2
  • 37
  • 43
0

I don't know if you did, but if you did not try to check your vm mem parameters and check this memory reservertion for your vm with "xl list"

http://xenbits.xen.org/docs/4.2-testing/man/xl.cfg.5.html

Thanks

c4f4t0r
  • 5,491
-3

yes, as I guessed, it is a limitation of the xen guests with linux. As far it seems the kernel you are using can only detect 32 GB of memory for dom0.