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.
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.
ps aux –sort -vsz | head -25
Top memory hogs






