Splunk AppDynamics

High CPU usage Nodejs Agent on linux

CommunityUser
Splunk Employee
Splunk Employee

We  embed  the appdynamic nodejs agent  in our nodejs service.

When disable appdynamics function,  with 90 tps,  our nodejs service CPU usage is 40%.

When  enable  appdynamics function,  with 90 tps,  our nodejs service CPU usage is 60%.

After follow the optimize steps from https://community.appdynamics.com/t5/Knowledge-Base/How-do-I-troubleshoot-high-CPU-usage/ta-p/23266,   CPU usage still  60%, not any approvement!

Labels (1)
Tags (3)
0 Karma

Kyle_Furlong
Contributor

Hi Jesseka,

For Node.js, it is usually process snapshots which lead to the CPU  overhead. You can find the settings to tweak this in this document: https://docs.appdynamics.com/display/PRO45/Node.js+Settings+Reference

  • maxProcessSnapshotsPerPeriod: Optional. The default is 2. The number of automatic process snapshots allowed in processSnapshotCountResetPeriodSeconds seconds. 

  • processSnapshotCountResetPeriodSeconds: Optional, defaults to 60. Frequency, in seconds, at which the automatic process snapshot count is reset to 0.

  • autoSnapshotDurationSeconds: Optional, defaults to 10. Length, in seconds, of automatically-triggered process snapshots.

Regards,

Kyle

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Kyle,

              Thanks for the reply!

               We have tried adjust the three paramters(autoSnapshotDurationSeconds, processSnapshotCountResetPeriodSeconds, maxProcessSnapshotsPerPeriod), even set the alwaysAddEumMetadataInHttpHeaders to false for test,   but still get the same result of high CPU usage .

               Here is our Nodejs test code,

const appdynamics= require("appdynamics");

appdynamics.profile({
controllerHostName: appdynamicsConf.controllerHostName,
controllerPort: appdynamicsConf.controllerPort,
controllerSslEnabled: appdynamicsConf.controllerSslEnabled,
accountName: appdynamicsConf.accountName,
accountAccessKey: appdynamicsConf.accountAccessKey,
applicationName: appdynamicsConf.applicationName,
autoSnapshotDurationSeconds: 60,
processSnapshotCountResetPeriodSeconds: 120,
maxProcessSnapshotsPerPeriod: 1,
alwaysAddEumMetadataInHttpHeaders: false,
tierName: appdynamicsConf.tierName,
nodeName: os.hostname()
});

Regards!

0 Karma

Kyle_Furlong
Contributor
Please try autoSnapshotDurationSeconds: 10
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

 Thanks!

We have tested the follow four scenarios with 90 tps ,  still get the same result.

scenarios 1:  AppDynamics is disabled      ----  nodejs agent CPU used  41%

scenarios 2: AppDynamics is enabled with default setting (processSnapshotCountResetPeriodSeconds: 60, maxProcessSnapshotsPerPeriod: 2,  autoSnapshotDurationSeconds: 10 )        ----  nodejs agent CPU used  57%

scenarios 3: AppDynamics is enabled with special setting, (processSnapshotCountResetPeriodSeconds: 60, maxProcessSnapshotsPerPeriod: 10,  autoSnapshotDurationSeconds: 6 )         ----  nodejs agent CPU used  61%

scenarios 4: AppDynamics is enabled with special setting (processSnapshotCountResetPeriodSeconds: 120, maxProcessSnapshotsPerPeriod: 1,  autoSnapshotDurationSeconds: 10 )      ---  nodejs agent CPU used  56%

regards!

0 Karma

Umervali_Niyama
Path Finder

Is there any resolution for this?

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
 
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...