PHP performance down the drain all of sudden, can't figure out reason
I have fairly much of requests (should be getting over 30 to a single PHP file), and performance was really good still few weeks back. Loads of the server were generally under 1.0, this is a very lightweight PHP file with MySQL w/ 3 queries total (2xSELECT one Update), one under 500 iterations loop (very lightweight) and outputs a few hundred bytes.
On default windows XAMPP installation on way slower desktop machine it easily handles 64 requests per second.
However, a few weeks ago, something happened, and i can't pinpoint anything which would cause the performance to go down the drain, i cannot remember doing any changes either, i did WHM update at one point, but i think it was before that.
Maximum it can reach is ~27requests/sec handled anymore, and even that results some ~20 load.
Now running Apache 2.2 with 250 max clients, PHP 5.2.6 with eAccelerator (128m limit). All memory won't be used up. CPU usage goes to 100% as soon as concurrent requests hit around 35, but server is normally responsive to well over loads of 200, infact, no noticeable speed decrease, no problems on the shoutcast running on the same server, and backlog of requests keeps piling up.
Same problem with Apache 1.3, with or without eAccelerator, PHP5 is needed but will try PHP4 as well.
Any ideas wtf is going on with this server?
Will post back as i downgrade now to 1.3 and PHP4.
Pulsed Media: Seedbox hosting and Dedicated Servers for content distribution
Which process is actually eating the CPU time - mysql or httpd ?
Your description sort of implies each hit does an update query to the same table. If this is the case, is it myisam or innodb, and does it update 1 row or many? How large is the table? With that number of concurrent updates, you may be better off with an innodb table which supports row-level locking.
I'm having a similar problem, everything was running smoothly then updated Apache from 1 to 2 and php4 to 5 yesterday. Now my system load is EXTERMELY HIGH, I went from a 2-3 load avg to a Load Averages: 216.12 208.27 173.86 thats insane. How is php5/apache 2 better with this load avg