Real RAM available...

Hi all.

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

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.

@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 :)

htop says im only using half of my 525mb memory, but top, free -m, etc have a lower number of around 10mb (bad!) - i tend to believe the worse number and that number outnumbers what htop is giving me, but why would it give me that number?

@jaykali:

htop says im only using half of my 525mb memory, but top, free -m, etc have a lower number of around 10mb (bad!)

http://www.linuxatemyram.com/

You're probably reading the wrong numbers on free -m.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct