Possible Duplicate:
Correctly determining memory usage in Linux

I see that almost all my RAM is in use. Is this bad? Strange thing is I don't see what is actually using the RAM.

enter image description here

marked as duplicate by jasonwryan, Gilles, Renan, daisy, Mat Sep 25 '12 at 17:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


No problem in that. Linux is borrowing the RAM for caching. This is desirable (RAM is faster than disk) and absolutely normal behaviour.

From that link:

Why does top and free say all my ram is used if it isn't?

This is just a misunderstanding of terms. Both you and Linux agree that memory taken by applications is "used", while memory that isn't used for anything is "free".

To see how much RAM you have free, type free -m and look at the -/+ buffers/cache line. In my machine, for example:

 $ free -m
             total       used       free     shared    buffers     cached
Mem:          5868       4031       1836          0        282       2260
-/+ buffers/cache:       1489       4379
Swap:         6143          0       6143

Thus I'm using about 1.5 GB RAM, not 4 GB as the first line might make it look like.


Its mostly linux caching data. If you use free -m look at the row -/+ buffers/cache: to see the non cache memory used/free

  • Awesome, this makes sense now. It shows 6226 free according to this, which matches up with how much Java is using there. Thanks! – MetaGuru Sep 25 '12 at 1:33
  • 1
    cool, accept the other one tho cause i wrote this quickly thinking maybe others would write an over the top explanation or something that isnt simple to understand. – user4069 Sep 25 '12 at 1:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.