Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cold start and Duration times #429

Open
T-Klug opened this issue Oct 25, 2024 · 8 comments
Open

Cold start and Duration times #429

T-Klug opened this issue Oct 25, 2024 · 8 comments

Comments

@T-Klug
Copy link

T-Klug commented Oct 25, 2024

The first number is durationMs - and the second is initDurationMs

Image

Even with the experimental flag, these numbers are pretty abysmal for cold starts and even durations (due to the flush)

Is the only solution to this writing a delivery mechanism ourselves? What other options exist because this is a big hit on performance.

@purple4reina
Copy link
Contributor

Hey @T-Klug, Thanks for reaching out. Can you share with versions of all our layers you are using, including which runtime you're using? I suspect that most of your added init time is coming from the tracing layer, but I can't know for sure unless I get a bit more info about your setup.

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

Image
Image

Using latest nodeLayerVersion 115 and extensionLayerVersion 65

Using node 20 with the CDK NodeJSFunction construct

@purple4reina
Copy link
Contributor

Thanks @T-Klug. Can you test with just the extension please, and no tracing layer? To do this, you'll set addExtension: true and remove the nodeLayerVersion: 115. If you have any datadog references in your code, or have manually added any handler redirection, please remove it for this test.

Datadog's next-gen extension shouldn't add nearly as much overhead as you're seeing, other customers have reported overhead in the 10s of milliseconds range compared with their base implementation. So, I'd like to confirm that this overhead is not actually coming from the extension, but from the tracer.

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

Image
the type doesn't have addExtension: true and when removing the nodeLayerVersion - the entire handler stops working

We add the lambdas as so

Image

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

After reviewing your documentation on the CDK - that is not the correct way of running it.

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

Marking enableDatadogTracing: false does get us in a bit of a better spot

Image

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

still a 200ms difference though between the 600ms and 800 ms

@T-Klug
Copy link
Author

T-Klug commented Oct 25, 2024

Image

from this we can see before datadog - 600ms
after datadog - 1600ms
with experimental flag - 1250ms
with tracing turned off - 800 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants