Splunk AppDynamics

CPU profiling in PHP

CommunityUser
Splunk Employee
Splunk Employee

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,

Richard.

Labels (1)
0 Karma
1 Solution

Kyle_Furlong
Contributor

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!

Regards,

Kyle

View solution in original post

Kyle_Furlong
Contributor

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!

Regards,

Kyle

Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...