Find which php scripts cause high CPU with php-cgi

Posted by Oli on Server Fault See other posts from Server Fault or by Oli
Published on 2010-05-20T09:08:30Z Indexed on 2010/05/20 9:11 UTC
Read the original article Hit count: 478

Filed under:
|
|

Background: I maintain a server for a client who has half a dozen Wordpress sites on. They all have the W3 Total Cache plugin installed and eAcellerator is installed (might be APC). All the PHP sites run through a single batch of fastcgi php-cgi processes (it's actually php-fpm but I'm not sure if that makes a difference).

Problem: php-cgi's CPU usage is quite high. Not terminally high but high enough to raise an eyebrow. The client wants to add more sites in the future and I want to avoid becoming CPU limited if I can help it.

Question: Is there any way I can find the scripts or even just requests that are causing the high CPU. I realise I might not be able to do anything with the results but it would give me a chance.

© Server Fault or respective owner

Related posts about cpu

Related posts about php-cgi