Linux – CentOS only detecting 50% of ram

centoslinuxmemory

I have 16GB ram in my machine. Before, free -m outputted the normal 16 GB ram, however now (after a reboot) it only detects 8 GB ram. Is one ram module damaged?

grep -i memory /var/log/dmesg outputs

Memory: 15621184k/16017200k available (2535k kernel code, 387120k reserved, 1748k data, 196k init). (Which looks like 16 GB to me).

free -m outputs:

              total       used       free     shared    buffers     cached
Mem:          7484       7415         68          0       6104        524
-/+ buffers/cache:        786       6697
Swap:         2055          0       2054

Anything I might be missing?

Thanks in advance.

Best Answer

Wait wait - you say "I'm using the server as a Xen HVM (DomU)".

Do you mean that this domain is dom0 (the main instance)?

If so, then yes, your dom0 memory shrinks when you start up domU domains.

Use xentop to see how much memory is actually there and to whom it's allocated.

To change the allocation, use the command:

xm mem-set <domainid> <memorysize>