I've done a fair bit of searching about this, but have found nothing that answers my question.

I have a system with 6GB of RAM which acts as a Xen server. For reference, it runs Ubuntu 12.04. I've set the kernel parameter dom0_mem:512M,max:512M in /etc/default/grub as follows:


I've tried variations of that, with the same result.

My question is this:

With the above set, the dom0 reports in all applications a RAM amount of 422M.

cat /proc/meminfo gives the following:

$ cat /proc/meminfo
MemTotal:         432472 kB
MemFree:           54144 kB
Buffers:           17640 kB
Cached:           220104 kB
SwapCached:        30172 kB
Active:           136500 kB
Inactive:         167780 kB
Active(anon):       6156 kB
Inactive(anon):    60516 kB
Active(file):     130344 kB
Inactive(file):   107264 kB
Unevictable:          52 kB
Mlocked:              52 kB
SwapTotal:       1794044 kB
SwapFree:        1682012 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         39572 kB
Mapped:             8048 kB
Shmem:               136 kB
Slab:              44324 kB
SReclaimable:      22012 kB
SUnreclaim:        22312 kB
KernelStack:        1280 kB
PageTables:         3840 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2010280 kB
Committed_AS:     329192 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      313988 kB
VmallocChunk:   34359417340 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      524696 kB
DirectMap2M:           0 kB

top, htop, free -m, and byobu's RAM monitor all report the same amount.

At first I thought this was because of the onboard graphics borrowing some memory, but have now switched to a dedicated GPU and it persists.

Is this normal behavior, or has something gone amiss? It's just about 100MB of RAM that's "gone", and I have no idea where it went. I understand that it's normal that not all RAM is available for allocation, but does the system really take an amount relatively high to the amount of RAM available?

Edit I've just noticed that xl list does report dom0 as having 511M of RAM, so it appears that memory is being allocated correctly, and that the difference is just the system reserved memory.


This is a normal thing to happen. Default allocation of memory to Dom0 is governed by formula which is approximately equal to 502+0.0205*physical memory(MB) (In case of xen).

This memory allocation to Dom0 can be done from grub too as in the example. In all the cases you will see "loss" of about 100 MB of memory which gets consumed by system (xen).

If you can access dmesg command output , there you can see details how 100 MB of memory gets reserved and becomes unusable.Please check the first 100/150 lines to see details of memory reservation/allocation. For example , one line pf dmesg on my Dom0 summarizes it like this :-

Memory: 899140k/1010076k available (5201k kernel code, 476k absent, 110460k reserved, 4718k data, 1592k init).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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