Comment 0 for bug 510243

Revision history for this message
Major Hayden (rackerhacker) wrote :

Brief summary:
The linux-ec2 kernel erroneously adds in the freed initrd memory to the total memory allocated to the vm which makes the output of 'free' misleading. For example, if you create a domU with 256MB of RAM and the initrd is 9MB in size, your instance will show 265MB of RAM when you run 'free'.

Steps to reproduce:
1) Create a Xen domU of any distribution
2) Use the linux-ec2 kernel from karmic or lucid to boot the domU paravirtualized
3) Run free

If I create a 256MB instance, I see the following in the dmesg output:
[ 1.491064] Freeing initrd memory: 9652k freed
[ 1.600141] Freeing unused kernel memory: 188k freed

Once it boots, and I run free, it shows 265MB of total memory:
# free -m
             total used free shared buffers cached
Mem: 265 262 3 0 5 90
-/+ buffers/cache: 166 99
Swap: 511 0 511

The odd part is that it increases the used memory by 9MB as well to make up for it.

In summary, this is a somewhat cosmetic issue, but the instance operates normally otherwise.