• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

PHP agent overhead reduction tips

Problem

Using the New Relic PHP agent results in overhead. Performance overhead is anything that increases latency, CPU, or memory usage beyond what what would exist without the agent.

Cause

Overhead is an expected side effect of monitoring and reporting on software. Our engineers aim to minimize this, but your experience may differ quite a lot, depending on how you're using the agent. If you find that you're experiencing unexpected overhead, there are are various settings in the INI that can help reduce it.

Solution

Performance INI settings that can reduce overhead depending on your agent usage.

  1. Reduce newrelic.span_events.max_samples_stored.

  2. Disable code level metrics.

  3. Disable logging.

  4. Set newrelic.transaction_tracer.max_segments_web and newrelic.transaction_tracer.max_segments_cli >= 1.

  5. Set newrelic.transaction_tracer.detail = 0.

  6. Set newrelic.transaction_tracer.enabled = false.

  7. Increase the transaction tracer threshold by setting newrelic.transaction_tracer.threshold = higher value.

  8. Set newrelic.transaction_tracer.explain_enabled = false.

  9. Don't trace slow SQL statements by setting newrelic.transaction_tracer.slow_sql = false.

Other overhead considerations

A non-performant clocksource can affect the agent which checks the time for every span. Please ensure you're using an appropriate clocksource. Fargate is affected by clocksource and is known to cause additional overhead.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.