which is the real free memory; comparision with linux command free

5 posts / 0 new
Last post
#1 Sun, 11/11/2012 - 13:53
albes

which is the real free memory; comparision with linux command free

a localhos server

free command
total used free shared buffers cached
Mem: 1010 859 150 0 144 434
-/+ buffers/cache: 281 728
Swap: 2047 0 2047

Webmin information:
Real memory 1010.43 MB total, 294.58 MB used
Virtual memory 2 GB total, 16 kB used

Exactly I have or not free 728 Mb memory? or is only 150 Mb because some process use it?

Other question; is better take a vps with
528 MB Ram and 528 MB swap

or
1024 MB Ram and 20 MB swap?

which are the difference?

Sun, 11/11/2012 - 15:15
andreychek

Memory listed under "buffers" and "cached" is technically free memory as well. Webmin/Virtualmin simply shows that as free memory.

-Eric

Sun, 11/11/2012 - 15:51
Locutus

Linux follows the philosophy here "free memory is wasted memory", and uses as much as possible for things like filesystem cache. Hence the discrepancy. :)

About the VPS memory options: Well, having physical memory is of course better than swap space, so the 1024/20 option is better. Probably more expensive too.

In fact, I find this kind of distribution a bit odd. There's no real reason to limit virtual memory like that, i.e. treat it like a valuable resource just like physical memory. 20 MB swap space is basically like no swap space at all. HDD space is so cheap nowadays, it'd be no problem at all to give the VPS like twice the amount of physical memory as swap space.

Then again, in a VPS environment, disk I/O itself is a valuable resource for the host, so if like 10 virtual machines start swapping memory like crazy, the HDDs will probably won't be too happy.

Fri, 11/16/2012 - 18:08
albes

rewrite the values (more clear)
A)
memory
1010 total
859 used
150 free
0 shared
144 buffers
434 cached
B)
-/+ buffers/cache:
281 used
728 free

Webmin
Real memory
1010 total
294 used

for webmin the memory free is 1010-294=716MB

In A is 150+144+434=728 free+buffers+cached values
In B is 728 = free values

but in A 859 who is?

@loctus
" Then again, in a VPS environment, disk I/O itself is a valuable resource for the host, so if like 10 virtual machines start swapping memory like crazy, the HDDs will probably won't be too happy."

so for the host, HDD space is cheap and problem isn't this but the use?
take more resource? and disk breaks before ?

really is a cost for host the swap?

Sat, 11/17/2012 - 05:12
Locutus

The 859 is "total memory" minus "free memory" (i.e. really free, not used for processes, buffers or cache).

So, in A "used" - "buffers" - "cache" is what Webmin sees as "used" (with some deviation due to rounding and memory counting).

HDD space is cheap, but HDD I/O is valuable when you have a VPS environment, since all virtual machines share the same HDDs.

VMs with too few memory start swapping to disk earlier. If too many VMs do that, all to the same HDDs, you'll get poor overall performance. I'm not sure if a high head seeking load also influences the lifespan of the HDD, but it's possible. The more noticeable effect though will be the poor performance.

Topic locked