1

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.

Sven
  • 97,248
  • 13
  • 177
  • 225
Devator
  • 1,463
  • 4
  • 17
  • 35

2 Answers2

2

Run the following to see what dmidecode reports for installed RAM.

dmidecode -t 17 will show the DIMM population per slot.

The following will output the total RAM.

dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print "\t" "Installed Ram: " x "MB"}'

[root@bootylicious ~]#  dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print "\t" "Installed Ram: " x "MB"}'

        Installed Ram: 65536MB
ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • Thanks, it outputs: `Installed Ram: 16384MB`. I'm using the server as a Xen HVM (DomU). I always had 16 GB but since a reboot (?) I have 7356 MB according to `free -m`. – Devator Nov 24 '11 at 19:24
  • Run `top`. What is listed as your `MEM` amount on the fourth line of the output? Did you dedicate 8GB of RAM to Xen? – ewwhite Nov 24 '11 at 19:29
  • I think I got it, when using Xen - when you create a VM it will 'reduce' your memory. I now have 6 GB left. I deleted two VM's and my memory hasn't risen yet, however I think it may take some time? – Devator Nov 24 '11 at 19:33
2

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>
MikeyB
  • 38,725
  • 10
  • 102
  • 186
  • That's correct. Stupid of me to not to mention in my initial post. Thanks =). However, do you any way to return the not used memory from the balloon (as they call it) to the system memory? – Devator Nov 24 '11 at 19:45