Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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) and that feeds into nginx.

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.

share|improve this question
Seems not a real question. – risyasin Jul 26 '11 at 23:14

you have many checks to have a chance before. first of all. any php programmer can find the reason of high cpu usage faster & better than you. unless you touch the code to debug.

here is some clues to understand that. it may caused by any Wordpress plugin installed. check every installation of WP's on server 1 by 1, to see which is to blamed if they are all different installations. Normally wordpress with default installation never uses high cpu. maybe more ram acording to hit. but not cpu. if they are similar installations check your EAccelerator thing. try without it. if not. check all php extensions activated on php by default via phpinfo() file. try to deactivate extensions you never need. you can see how much sources you gain by php-cli execution.

if none of them works. you may debug the codes. some testing classes & suits are open source on net. you can find them easily.

share|improve this answer
"any php programmer can find the reason of high cpu usage faster & better than you" You (incorrectly) assume I'm not a PHP programmer. My point is there's too much surface area to cover, too many sites, too many plugins. If it's a case of slowly going through each site/plugin, it's more economical to buy a better CPU than put time into finding the actual problem. That's why I'm asking for a top-down, broad-spectrum resource monitor to attach onto php-cgi. – Oli May 21 '10 at 11:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.