Fwd: Re: Showing less memory than allocated

On 22/01/14 15:09, Andrew Spiers wrote:
On 22/01/14 14:20, Daniel Jitnah wrote:
Hi Luvers,
I have a cloud server from a cloud provider thats supposed to have 1Gb allocated ram, but its only showing 761Mb (using free -m)
XXX@XXXX:~# free -m total used free shared buffers cached Mem: 761 668 92 0 6 183 -/+ buffers/cache: 478 283 Swap: 1023 25 998
Any reason why?
Cheers, Daniel
Hi Daniel, Looks weird to me. free uses base 1024 by default, you can make it use base 1000 with the --si switch.
Here's a vps that was advertised to me as having 512m of ram:
$ free -m total used free shared buffers cached Mem: 496 382 114 0 34 191 -/+ buffers/cache: 157 339 Swap: 967 8 959
$ free -m --si total used free shared buffers cached Mem: 508 392 116 0 35 196 -/+ buffers/cache: 161 347 Swap: 991 8 982
Hi Andrew I have tried that (free --si) , it reports 778 (or something like that_. Btw its Debian 7. The value 761 also seems like a weird number? Has anyone had any issue with Debian reporting wrong memory? Daniel.
_______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main

On Wed, Jan 22, 2014 at 04:21:42PM +1100, Daniel Jitnah wrote:
I have tried that (free --si) , it reports 778 (or something like that_. Btw its Debian 7.
The value 761 also seems like a weird number?
Has anyone had any issue with Debian reporting wrong memory?
some vaguely relevant thoughts in no particular order: the kernel always uses some ram for itself, and any data in tmpfs filesystems will use ram too. 220MB or 240MB out of 1GB sounds like a lot, though....is the initrd still mounted? or maybe some ram is being reserved for a video card or other device (unlikely, most VMs only use around 10M or so for video emulation)? IMO, the most likely culprit is your VM hypervisor - kvm or xen? or maybe your kernel version - do you get different values for 'free' with different kernels? try grepping for "Memory" in /var/log/dmesg, e.g. on my 16GB system I get: # uname -a Linux ganesh 3.10-2-amd64 #1 SMP Debian 3.10.7-1 (2013-08-17) x86_64 GNU/Linux # grep Memory /var/log/dmesg [ 0.000000] Memory: 16346352k/17563648k available (3642k kernel code, 826012k absent, 391284k reserved, 3127k data, 920k init) # free -m total used free shared buffers cached Mem: 16047 15695 351 146 0 829 -/+ buffers/cache: 14866 1181 Swap: 8191 3681 4510 (note: "absent" memory is irrelevant and can be ignored, it just indicates gaps in the motherboard's memory map...it's not actually missing memory - for details, see http://serverfault.com/questions/220626/debian-squeeze-and-available-memory-... ). some other words to grep for are (case-insensitive) "mem" and "ram". also, has the VM been allocated 1000M or 1024M? it's not that great a difference, but it all adds up. craig -- craig sanders <cas@taz.net.au>

FWIW: Its actually because of memory over-committment using ballooning virtio device. In theory the VM should get back the missing memory when needed, assuming its available elsewhere on the host!!! Daniel. On 22/01/14 19:20, Craig Sanders wrote:
On Wed, Jan 22, 2014 at 04:21:42PM +1100, Daniel Jitnah wrote:
I have tried that (free --si) , it reports 778 (or something like that_. Btw its Debian 7.
The value 761 also seems like a weird number?
Has anyone had any issue with Debian reporting wrong memory?
some vaguely relevant thoughts in no particular order:
the kernel always uses some ram for itself, and any data in tmpfs filesystems will use ram too.
220MB or 240MB out of 1GB sounds like a lot, though....is the initrd still mounted? or maybe some ram is being reserved for a video card or other device (unlikely, most VMs only use around 10M or so for video emulation)?
IMO, the most likely culprit is your VM hypervisor - kvm or xen? or maybe your kernel version - do you get different values for 'free' with different kernels?
try grepping for "Memory" in /var/log/dmesg, e.g. on my 16GB system I get:
# uname -a Linux ganesh 3.10-2-amd64 #1 SMP Debian 3.10.7-1 (2013-08-17) x86_64 GNU/Linux
# grep Memory /var/log/dmesg [ 0.000000] Memory: 16346352k/17563648k available (3642k kernel code, 826012k absent, 391284k reserved, 3127k data, 920k init)
# free -m total used free shared buffers cached Mem: 16047 15695 351 146 0 829 -/+ buffers/cache: 14866 1181 Swap: 8191 3681 4510
(note: "absent" memory is irrelevant and can be ignored, it just indicates gaps in the motherboard's memory map...it's not actually missing memory - for details, see http://serverfault.com/questions/220626/debian-squeeze-and-available-memory-... ).
some other words to grep for are (case-insensitive) "mem" and "ram".
also, has the VM been allocated 1000M or 1024M? it's not that great a difference, but it all adds up.
craig

On 22/01/14 23:53, Daniel Jitnah wrote:
FWIW:
Its actually because of memory over-committment using ballooning virtio device.
Sorry, I should rephrase the above: Its because of memory over-commitment on the host. This is managed using ballooning virtio device in the guest VM.
In theory the VM should get back the missing memory when needed, assuming its available elsewhere on the host!!!
Daniel.
On 22/01/14 19:20, Craig Sanders wrote:
On Wed, Jan 22, 2014 at 04:21:42PM +1100, Daniel Jitnah wrote:
I have tried that (free --si) , it reports 778 (or something like that_. Btw its Debian 7.
The value 761 also seems like a weird number?
Has anyone had any issue with Debian reporting wrong memory?
some vaguely relevant thoughts in no particular order:
the kernel always uses some ram for itself, and any data in tmpfs filesystems will use ram too.
220MB or 240MB out of 1GB sounds like a lot, though....is the initrd still mounted? or maybe some ram is being reserved for a video card or other device (unlikely, most VMs only use around 10M or so for video emulation)?
IMO, the most likely culprit is your VM hypervisor - kvm or xen? or maybe your kernel version - do you get different values for 'free' with different kernels?
try grepping for "Memory" in /var/log/dmesg, e.g. on my 16GB system I get:
# uname -a Linux ganesh 3.10-2-amd64 #1 SMP Debian 3.10.7-1 (2013-08-17) x86_64 GNU/Linux
# grep Memory /var/log/dmesg [ 0.000000] Memory: 16346352k/17563648k available (3642k kernel code, 826012k absent, 391284k reserved, 3127k data, 920k init)
# free -m total used free shared buffers cached Mem: 16047 15695 351 146 0 829 -/+ buffers/cache: 14866 1181 Swap: 8191 3681 4510
(note: "absent" memory is irrelevant and can be ignored, it just indicates gaps in the motherboard's memory map...it's not actually missing memory - for details, see http://serverfault.com/questions/220626/debian-squeeze-and-available-memory-... ).
some other words to grep for are (case-insensitive) "mem" and "ram".
also, has the VM been allocated 1000M or 1024M? it's not that great a difference, but it all adds up.
craig
_______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main
participants (3)
-
Andrew Spiers
-
Craig Sanders
-
Daniel Jitnah