The linux free command allows us to check free/used memory on
the system The output below is the result of running.
The first line starting with Mem: gives us the following information:
* total - is the total avaialble RAM
(== Physical Memory) after subtracting the amount used by the kernel!
In my case I have 1GB RAM.
* used - is the part of the RAM that currently has information in it
that can be of use to the system (remember: unused RAM is useless,
try to maximise this value)
* free - is just total-used
* shared - is the amount of memory shared between processes
* buffers and cached - the cached data and buffers for IO
The second line starting with -/+ buffers/cache: tells us how much of
the memory in the buffers/cache is used by the applications and how
much is free.Keep in mind that in general the cache is filled with
disk IO cached data. The cache can be very easily reclaimed by the
OS for applications.Let BUFFERS + CACHED from first line be value X.
X subtracted from the USED memory from the first line gives how much
RAM is used by applications (USED value on second line) X added to
the FREE memory on the first line gives how much RAM applications
can still request from the OS. While the first line handles the
values of currently used RAM, including applications and caches
(but excluding kernel),the second line gives info on application
related memory:how much is currently in use and how much is there
still available for the applications.
taken from : http://salomie.ro/wiki/index.php/Linux_Free_Command