Troubleshooting High Memory Usage

First of all, this post is nowhere near a complete reference for linux memory usage and troubleshooting high memory usage. It only has the steps I’d taken to troubleshoot my own server when it gets overloaded by increased traffic. It happens once a while, and usually I can fix it by tuning some Apache, MySQL and other config setting.

1. using top command

After executing top command, press “Shift” + “>” and look at “RES” column. The RES column is the most reliable indicator of the real memory usage of that process.

top result

2. ps axu –sort:rss

show memory usage sorted by lowest memory usages first.

A general Apache which serves static html page should consume less than 10MB per process.
For heavily serving PHP pages, in my case it uses 18MB-39MB each httpd process.

mysqld has a memory usage of 120MB in my case. I can tell that the query cache settings worked as planned.

1 Comment »

  1. Arul said,

    July 22, 2008 at 3:58 am

    I have not yet face this problem. Even I no need to worry about…
    Thank you Dude

RSS feed for comments on this post · TrackBack URL

Leave a Comment