Server CPU high utilization, appears to be Apache, how do I determine the cause
Posted on 2014-07-28
We have multiple servers behind a load balancer. Currently our usage is low due to it being summertime and the majority of our websites are used by teachers and students at various schools. For example during the school year we get around 30k users a day, currently we have about 3k users a day.
I have recently begun to notice that the CPU usage on the servers behind the load balancer is much higher than expected, (.42,.41,.35) and it appears that a couple of apache processes are causing it, running between 7% and 14% cpu usage, there constantly 1 to 2 of these while the rest of the apache processes are at about 0-4% cpu.
In the past when we had high utilization, it only ever reached about these levels. So I am concerned that when we get back to 10x the amount of users per day that we are going to have server overload.
Since there are multiple websites on the servers, I don't know how to tell which site is causing this.
I have enabled Server Status for the server but what it is showing on the processes that are using a lot of CPU doesn't make sense, for example, the stylesheet of one of the sites, or a page that all it does is a redirect...
Is there any way to get better insight into what page of the apache thread/process is causing the processor utilization to spike?