Code Monkey home page Code Monkey logo

Comments (4)

huonw avatar huonw commented on September 4, 2024 1

I've been communicating with New Relic support and they suggested setting
NEW_RELIC_PACKAGE_REPORTING_ENABLED: false
https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/#package-reporting-enabled

To bypass this (new) code:
https://github.com/newrelic/newrelic-python-agent/blame/2b14392a19517a20012d281fbaaedfc2497f4fc3/newrelic/core/environment.py#L207-L245

This makes a big difference to us. The start time is now more 0.1s, rather than 1.5s (for the reduced lambda) or 5s (for our real ones).

from newrelic-lambda-layers.

huonw avatar huonw commented on September 4, 2024

As a workaround, we might have to downgrade to arn:aws:lambda:ap-southeast-2:451483290750:layer:NewRelicPython310:1, but that's seems like it would be quite old. Are there change logs for each layer version so we can work out the risks?

from newrelic-lambda-layers.

huonw avatar huonw commented on September 4, 2024

For a really simple lambda:

print("imported")
def handler(*args):
  print("started")

The numbers are a fair bit smaller, and somewhat different (regression from v1 -> v2, and v15 -> 16), but still bad:

version time from AWS START to print("started")
17 1.5-1.6
16 1.5-1.6
15 0.5-0.6
... (similar)
2 0.5-0.6
1 0.2

There's also ~0.6s of init time overhead on a cold start, from INIT_START to print("imported"), which seems to be constant across all versions.

That is, a cold start of a lambda with New Relic instrumentation seems to spend a fair chunk of time (>2s) on the New Relic overhead.

from newrelic-lambda-layers.

pavelm10 avatar pavelm10 commented on September 4, 2024

Observing the same slowdown (from few hundreds of milliseconds to 8-15 seconds) for arn:aws:lambda:eu-central-1:451483290750:layer:NewRelicPython311:11

from newrelic-lambda-layers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.