Skip to content

[Fleet] Improve package verification memory usage#208475

Merged
nchaulet merged 2 commits intoelastic:mainfrom
nchaulet:fix-package-verification-external-memory-usage
Jan 28, 2025
Merged

[Fleet] Improve package verification memory usage#208475
nchaulet merged 2 commits intoelastic:mainfrom
nchaulet:fix-package-verification-external-memory-usage

Conversation

@nchaulet
Copy link
Copy Markdown
Member

@nchaulet nchaulet commented Jan 28, 2025

Summary

Related to #208210

It seems we were consuming a significant amount of external memory (in particular for larger package like security_detection_engine) due to a non optimal usage of openpgp to verify the package signature that PR should improve it.

Benchmark

This compare the external memory consumption of two security_detection_engine package installation one with that fix, one without. I run that test a few times with always the same result

Screenshot 2025-01-27 at 8 13 20 PM Screenshot 2025-01-27 at 8 11 40 PM

I also ran that tests by changing the code to do 10 times the package verification and you can really see the difference
Screenshot 2025-01-27 at 8 27 14 PM

@nchaulet nchaulet added Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor labels Jan 28, 2025
@nchaulet nchaulet self-assigned this Jan 28, 2025
@nchaulet nchaulet requested a review from a team as a code owner January 28, 2025 01:15
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet added the release_note:skip Skip the PR/issue when compiling release notes label Jan 28, 2025
@nchaulet nchaulet changed the title [Fleet] Improve package verificate memory usage [Fleet] Improve package verification memory usage Jan 28, 2025
@nchaulet
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @nchaulet

@nchaulet nchaulet merged commit 2887aa6 into elastic:main Jan 28, 2025
@nchaulet nchaulet deleted the fix-package-verification-external-memory-usage branch January 28, 2025 13:46
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/13011841195

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@nchaulet nchaulet added backport:version Backport to applied version labels v8.17.2 labels Jan 28, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/13012013570

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 28, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 28, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 28, 2025
…08535)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fleet] Improve package verification memory usage
(#208475)](#208475)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T13:46:28Z","message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","backport:8.17"],"title":"[Fleet]
Improve package verification memory
usage","number":208475,"url":"https://github.com/elastic/kibana/pull/208475","mergeCommit":{"message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208475","number":208475,"mergeCommit":{"message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38"}}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 28, 2025
…208537)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Fleet] Improve package verification memory usage
(#208475)](#208475)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T13:46:28Z","message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","backport:version","backport:8.17","v8.17.2"],"title":"[Fleet]
Improve package verification memory
usage","number":208475,"url":"https://github.com/elastic/kibana/pull/208475","mergeCommit":{"message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208475","number":208475,"mergeCommit":{"message":"[Fleet]
Improve package verification memory usage
(#208475)","sha":"2887aa698573427756d302648a2ed53f568b8c38"}},{"branch":"8.17","label":"v8.17.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"url":"https://github.com/elastic/kibana/pull/208535","number":208535,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.17.2 v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants