If you run 'free' it'll give you this:
Code:
total used free shared buffers cached
Mem: 1033612 1013016 20596 0 108 729112
-/+ buffers/cache: 283796 749816
Swap: 1967952 12 1967940
The important value here (in
red) is 749816, that's the amount of free RAM I have at the moment. However, note that Linux is using 1013016 bytes, and the total is 1033612.
The calculation for free memory here is:
729112 cached memory + 108 memory buffers + 20596 completely free = 749816 free memory
Here's a decent explanation of what these mean:
http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html
Quote:
2. Definitions
RAM (Random Access Memory) - Location where programs reside when
they are running. Other names for this are system memory or
physical memory. The purpose of this document is to determine if
you have enough of this.
Memory Buffers - A page cache for the virtual memory system. The
kernel keeps track of frequently accessed memory and stores the
pages here.
Memory Cached - Any modern operating system will cache files
frequently accessed. You can see the effects of this with the
following commands:
for i in 1 2 ; do
free -o
time grep -r foo /usr/bin >/dev/null 2>/dev/null
done
Memory Used - Amount of RAM in use by the computer. The kernel
will attempt to use as much of this as possible through buffers
and caching.
|
or a more complicated in-depth explanation:
http://tldp.org/LDP/khg/HyperNews/ge...y/linuxmm.html
So, basically, the kernel will use all your memory, mostly for cached memory, which will greatly speed up access to frequently used files.
However, it will release this cached memory when there are more important things to do with it, such as when programs need it. So, don't worry. Trust Linus T.