I have a 16 CPU core server that's experiencing consistent load averages of 40-70. After camping on a
top command for a number of hours, I've isolated the CPU spikes to a single user.
c on the
top command, the high-CPU command is
/usr/bin/php /home/user/public_html/index.php, which is basically useless for isolating, as that's the main controller handler for our entire PHP MVC framework (CodeIgniter if you were curious).
The reason why I haven't toyed with a code profiler just yet is because it would appear that any PHP process under this user has consistently high CPU usage. I've double-checked our slow-query.log (MySQL) for good measure and this web app generates next to 0 slow queries.
- Is code profiling the main answer for this app?
- Why would incoming PHP requests be consistently high for only one user?
- Why would any and all incoming PHP requests for this web app be high CPU usage?
- Could an overloaded or inefficient MySQL database cause these PHP processes to consume higher-than-normal CPU usage? Or are the two completely independent?
- Time for a hardware upgrade? How do you know the difference?