Showing results for 
Show  only  | Search instead for 
Did you mean: 

CPU profiling in PHP

New Poster

Hi all,


I need to identify bottlenecks in a PHP application with high CPU usage.


I have found documentation around collecting "CPU Usage" data for Java applications. 

But I cannot find a way to collect/analyse CPU time within the PHP Call Graph.

All timing data I see within the AppDynamics transaction data are based on wall clock time.


Any assistance would be much appreciated!


Thank you,



AppDynamics Team (Retired)

Hi Richard,


I think the place to start is to ensure you've got some machine agents deployed on these PHP nodes. Then you can correlate any changes in CPU usage with other data in the AppDynamics dashboard. For example, you could navigate to the Node dashboard for one of the PHP machines, and select the Server tab. Then you could find the high CPU time range in the graphs, and click+drag to zero-in on only that time range. Now every UI will use this time range throughout the product. Then, you can inspect snapshots in the time range to see what might be consuming the CPU.


In my experience with PHP, we sometimes see this come up when there's a large resultset coming back from a DB or other backend, and the PHP code is looping over it to do some level of transformation of the data. Perhaps this transformation code was stable and solid while this app was growing, but now that the data is reaching a certain threshold, it's leading to issues. Just one possibility.


Let me know if that helps!




Kyle Furlong, Technical Lead (C++ and Dynamic Languages)

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.