How to Find Which Script Causes Most Apache Load

By | October 18, 2008

It is often hard to tell which process causes most Apache load. top and ps -aux commands don’t give us anything usable; they only allow us to see that Apache causes server load. We need to identify which scripts are not so good for server load and fix them.

The first advice is to view Apache server status. I have already written how to enable it here. This will allow you to monitor Apache requests and will show you which requests are most popular and which of them cause problems.

If you have many users on your server, suphp might help you to identify the problem. As all php scripts are run by corresponding user, you will be able to identify which user causes most server load related to Apache.

This article does not describe the process of identification of MySQL server load. Maybe I will write about it later.