Free kernel memory

klussier at comcast.net klussier at comcast.net
Thu Jun 1 18:27:01 EDT 2006


> > I am looking for a way to flush the cached memory from a system.
> 
>   Why?

Ah, yes.... The question of "Why?". That was my first question, too. The reason behind it is silly, really. Basically, it is so engineers and QA can more easily track memory leaks in their code. If they can see the amount of "actual free memory", then it will somehow help them find their problems....

>   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.

Agreed. Linux does a very good job of managing memory. Developers don't :-)


> >              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.

Yes, but looking at the second line of output from free is too difficult, apparently. Like I said, it's all very silly. But, I told the developers that I would ask :-)

Thanks,
Kenny



More information about the gnhlug-discuss mailing list