I like to point people with this concern to this website: www.linuxatemyram.com
Linux ate my ram!
What's going on?
Linux is borrowing unused memory for disk caching. This makes it looks like you are low on memory, but you are not! Everything is fine!
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".
But what do you call memory that is both used for something and available for applications?
You would call that "free", but Linux calls it "used".
Memory that is You'd call it Linux calls it
--------------------------- ------------- --------------
taken by applications Used Used
available for applications,
and used for something Free Used
not used for anything Free Free
This "something" is what top and free calls "buffers" and "cached". Since your and Linux's terminology differs, you think you are low on ram when you're not.
How do I see how much free ram I really have?
To see how much ram is free to use for your applications, run
free -m and look at the row that says "-/+ buffers/cache" in the column that says "free". That is your answer in megabytes.