Xen dom0 reports incorrect amount of RAM with dom0_mem set

Posted by xen_amnesiac on Server Fault See other posts from Server Fault or by xen_amnesiac
Published on 2013-10-27T08:27:40Z Indexed on 2013/10/27 9:57 UTC
Read the original article Hit count: 569

Filed under:
|
|
|
|

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:

GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=min:512M,max:512M"

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?

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu