Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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) "



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.


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

share|improve this question
I guess this is so specific that maybe it's better asked on a Xen mailing list. – Halfgaar Jul 19 '13 at 8:28
See my question about the centos-crashkernel at Unix/Linux - please update your question here as well. – Nils Jul 20 '13 at 21:38

4 Answers 4

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.

share|improve this answer
i guess since its para virtual DomU boot message will be different from unmodified operating system. – ananthan Jul 22 '13 at 15:27
@ananthan Yes and no. The first part is different. Then comes the "normal" os boot. Your xl dmesg does not seem to show everything. – Nils Jul 22 '13 at 21:03
dmesg is from inside guest and not from dom0. – ananthan Jul 23 '13 at 6:55
in case of non pvops there is no such difference allocated ram is exactly same in guest,but with pvops there is difference like non virtualzed systems. – ananthan Jul 23 '13 at 7:04
@ananthan So this looks rather like a PVOPS specific thing now. – Nils Jul 23 '13 at 21:13

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)
share|improve this answer
Centos 6.3 is also showing similar behavior in case of question 2. – ananthan Jul 22 '13 at 15:29
regarding question 1 : From dmesg doesn't it showed 2.5 mb for kernel code and 1.7 mb for kernel data that user space can not access and will not be shown in free -k (in case of non virtual system).Despite this reservation for kernel space how can a system access all of its installed RAM. – ananthan Jul 22 '13 at 15:34
Centos 6.3 is also RedHat based, so will be different from Debian based (Ubuntu). Additionally, Centos 6.3 probably has different defaults compiled into the kernel than either 5.7 or Ubuntu, so it makes sense that it is different. – Jed Daniels Jul 22 '13 at 15:44
On question 1, in the section below where you have the text "despite showing", you then go on to show that dmesg is reporting "500984k/524288k". That means "500984k is available out of 524288k total". The free command also shows 524288k total mem, as per your output. – Jed Daniels Jul 22 '13 at 16:03
i have assigned a total ram of 512 mb ie 524288k.In a non virtual environment os can not access all that 524288k due to kernel and DMA reservation,like this but in this case this vm is able to access all installed ram.Secondly i compared centos 5.7(non pvops) and 6.3(pvops) to confirm that its not because of distro difference. – ananthan Jul 23 '13 at 7:02

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"


share|improve this answer

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.

share|improve this answer
Nooo i am talking about domu and not about dom0,ie why i mentioned vm1 and vm2 – ananthan Jul 17 '13 at 7:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.