Sunday, June 10, 2007

Determining true memory usage in linux

Most of us are complaining high memory usage of applications running under linux by merely checking memory using 'top' command. Actually in Linux memory is never wasted. Almost all the free memory is used for Disk Caching. True memory usage can be determined by value of used buffers comes for 'free' command.
We also have lot of concerns over swapping. Linux mainly focus on services and greedy on allocating memory to applications. Anyway swapping can be configured using vm.swappiness parameter at /etc/sysctl.conf. This wiki has very useful information on linux memory management.

1 comment:

Geekoid said...

Very cool post. Thanks for posting this information, as it was exactly what I was looking for.