• /
  • Log in

Reduce the infrastructure agent's CPU footprint

Problem

The New Relic infrastructure agent is consuming too much CPU.

Solution

The New Relic infrastructure agent is designed to report a broad range of system data with minimal CPU and memory consumption. However, if you have a need to reduce your CPU consumption, you can disable or decrease the sampling frequency of various samplers and plugins.

This topic highlights some newrelic-infra.yml configurations that may reduce your CPU usage:

Reduce event sampling

The infrastructure agent reports several default events at specific frequencies. To lower the overhead, you can reduce the sampling frequency in seconds, or you can completely disable the samplers by setting the corresponding property value to -1.

Important

We don't recommend a sample rate larger than 60 seconds because you may see gaps in the New Relic user interface charts.

The table below lists some samplers to configure:

Event

Sampling frequency

Allow/deny list

Network

Network sampling rate

Not available

Process

Process sampling rate

Allow list (Windows only)

Storage

Storage sampling rate

Deny list

System

System sampling rate

Not available

Reduce agent plugin reporting

The infrastructure agent has built-in plugins that collect inventory data (specific system configuration and state information). For some systems, the CPU consumption may be relatively high if the plugins are gathering a lot of data. To reduce the footprint, you can disable or decrease the sampling frequency for specific plugins that report data you don’t want.

Review on-host integrations

If you use infrastructure on-host integrations, this may have additional impacts on CPU usage. The nature of the impact and the methods to adjust the impact depend on the integration you're using.

Here are some ways to adjust on-host integration CPU usage:

  • See if your integration has configuration options you can adjust.
  • If possible, spread out the monitoring load by adding additional infrastructure agents. For example, the Kafka integration allows a multi-agent deployment.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.