Epiphany: High Memory Usage in Linux

This is a good one – and it caused me approximately three-four days worth of worrying. Both in CentOS and in Ubuntu virtual memory kept growing and growing, slowly while system was relatively idle and lightning fast and almost up to the total limit when performing heavy IO operations. For the life of me I could not figure out what was going on – until finally instead of searching for “memory leak in linux” I did “high memory usage in linux”. Results were quite surprising:

http://www.webmasterworld.com/forum40/242.htm

Summary of the thread in a short quote:

<quote>

On a healthy and active system, there’s no “unused” RAM.

linux (and probably any *nix system) will give each application the memory it requests, and then use the rest for disk caching. Depending on the reporting mechanism, you may indeed see a constant memory useage somewhere between 90 and 100%. If your web server gets more load and requests additional memory later, then the system will sync out some of the cached disk data and reallocate the gained space to the httpd.

<end of quote>

Very unorthodox for someone with Windows background – but very reasonable and logical if you think about it for longer than three seconds. Quite a epiphany :-)

 


 

You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.