Skip to content

[Serverless-Init] Build serverless-init with zstd enabled#878

Merged
nhulston merged 2 commits into
mainfrom
nicholas.hulston/build-serverless-init-with-zstd
Sep 29, 2025
Merged

[Serverless-Init] Build serverless-init with zstd enabled#878
nhulston merged 2 commits into
mainfrom
nicholas.hulston/build-serverless-init-with-zstd

Conversation

@nhulston

@nhulston nhulston commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

@nhulston
nhulston marked this pull request as ready for review September 29, 2025 16:54
@nhulston
nhulston requested a review from a team as a code owner September 29, 2025 16:54
@nhulston
nhulston merged commit fd1364e into main Sep 29, 2025
48 checks passed
@nhulston
nhulston deleted the nicholas.hulston/build-serverless-init-with-zstd branch September 29, 2025 21:15
dd-mergequeue Bot pushed a commit to DataDog/datadog-agent that referenced this pull request Sep 29, 2025
### What does this PR do?

Use `zstd` compression. We just need to enable add the `zstd` build tag (in DataDog/datadog-lambda-extension#878)

[Before this change](https://github.com/DataDog/serverless-init-performance-testing/blob/main/saved-profiles/cpu-glib.pb.gz):
<img width="1000" height="62" alt="Screenshot 2025-09-29 at 12 45 16 PM" src="https://github.com/user-attachments/assets/306a6233-db57-4617-8d3e-c65adcd73537" />

[After this change](https://github.com/DataDog/serverless-init-performance-testing/blob/main/saved-profiles/cpu-zstd.pb.gz):
<img width="1000" height="62" alt="Screenshot 2025-09-29 at 12 45 24 PM" src="https://github.com/user-attachments/assets/402ffddd-e8b1-45e8-8bce-9fddddf5b5e3" />

The cum% for `(*batchStrategy).addMessage` goes down from 20.16% to 4.12%.

<img width="500" height="425" alt="Screenshot 2025-09-29 at 5 13 42 PM" src="https://github.com/user-attachments/assets/a95ac5ed-577b-4ed1-81dd-fd97e17a9782" />


For more information, see [this one-pager](https://docs.google.com/document/d/1ovNSaNk_rZKcF3SDz8Ol5ypCD_MRqpq25MsnxMgTmPU/edit?usp=sharing).

This PR pretty much just reverts #37523

### Motivation

Improving serverless-init performance
https://datadoghq.atlassian.net/browse/SVLS-7667

### Describe how you validated your changes

- Unit tests
- Manual testing & [profiling the agent](https://github.com/DataDog/serverless-init-performance-testing)
- [Serverless self-monitoring tests](https://gitlab.ddbuild.io/DataDog/serverless-init-self-monitoring/-/pipelines/77863262). It has monitors to make sure we are still receiving logs/metrics/traces
- [Serverless e2e tests](https://gitlab.ddbuild.io/DataDog/serverless-e2e-serverless-init-gcp-tests/-/pipelines/77869595/). Failures are known issues and unrelated to this change.

### Additional Notes
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

Successfully merging this pull request may close these issues.

2 participants