Wednesday, January 26, 2011

Windows / Apache / PHP CPU at 100% under small load

I have a Windows box loaded with Apache 2.2 and PHP 5.2. It runs great if only a few users are on it at a time, but under load testing (50 users for test #1), the CPU climbs up to 100%. Nearly all of this CPU usage comes from httpd.exe.

I currently have PHP set up via php5_module, but one of the first things I plan to try next is to use FastCGI instead. Is FastCGI better at handling multiple connections? Any other ideas on what might be causing Apache to run so high?

Update for 4/12/2010

Still having problems. Here are some things I have tried, to no avail:

  • Switched from mod_php to mod_fcgid
  • Added eAccelerator
  • Tried non thread safe version of php
  • Antivirus could be the culprit. If it's running, try disabling it.

    Miles Erickson : We have had similar experiences, particularly with Symantec AV products. Switching to different AV product caused CPU usage to drop dramatically, not only for the AV process but also for the CPU-intensive server process.
    gravyface : Likewise here with AVG's "Network Redirector" kernel device driver and non-paged pool memory leaks.
    From gravyface

0 comments:

Post a Comment