Real RAM available...
Using the
free -m
and
vmstat -aS
command I can see the available RAM.
Using the free -m displays two important field:
"-/+ buffers/cache" and "mem"
usually "-/+ buffers/cache" is bigger than "mem", anyway as far as I know the REAL available RAM should be the sum
between this two value.
Suppose that free -m displays a table like that:
total used free shared buffers cached
Mem: 360 349 10 0 29 106
-/+ buffers/cache: 213 146
Swap: 255 28 227
in the"mem" field I got 10, in the field "-/+ buffers/cache" I got 146,
this means that my system can use 156MB of RAM if needed?
am I wrong? is there a better interpretation of this value?
thanks.
4 Replies
Mem: line shows "Used" by BOTH apps and cache, and Free that's totally empty and wasted.
+/- line shows what's used by apps, and what's not; it is what you should see as "real memory use".
Generally,
+/- used = Mem used - Mem Cached ( - buffers?),
+/- free = Mem free + Mem Cached (+ buffers?).
You have 213 used and 146 free. You still want to reduce used to as low as possible, because the more RAM disk cache has, the less it has to hit the disk, and thus the faster it can serve stuff.
@rsk:
http://www.linuxatemyram.com/ Mem: line shows "Used" by BOTH apps and cache, and Free that's totally empty and wasted.
+/- line shows what's used by apps, and what's not; it is what you should see as "real memory use".
Generally,
+/- used = Mem used - Mem Cached ( - buffers?),
+/- free = Mem free + Mem Cached (+ buffers?).
You have 213 used and 146 free. You still want to reduce used to as low as possible, because the more RAM disk cache has, the less it has to hit the disk, and thus the faster it can serve stuff.
ok, really thanks for your really appreciated link and answer
@jaykali:
htop says im only using half of my 525mb memory, but top, free -m, etc have a lower number of around 10mb (bad!)
You're probably reading the wrong numbers on free -m.