Free kernel memory

Ben Scott dragonhawk at gmail.com
Thu Jun 1 18:13:00 EDT 2006


On 6/1/06, klussier at comcast.net <klussier at comcast.net> wrote:
> I am looking for a way to flush the cached memory from a system.

  Why?

  Serious question.  Linux normally does a pretty good job of managing
memory.  If nothing else is using the memory, it gets used for
caching.  Why install all that RAM if you're not going to use it,
after all.  As soon as a process allocates more memory, the cache will
be released for that.

> The reason is that tools like free have output like:
> nashua:~# free -m
>              total       used       free     shared    buffers     cached
> Mem:    3042       2890        152          0        193       1757
> -/+ buffers/cache: 938       2103
> Swap:          956          4        951

  Notice that swap is practically untouched.  If the system was
starved for RAM, it would be using swap space.  Also note that, other
than buffers and cache, the system is only using 938 megs of RAM (out
of 3042).  The only way that will increase is if processes allocate
more memory.

-- Ben



More information about the gnhlug-discuss mailing list