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!

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...