-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Use streaming for package install instead of an assetsMap with everything loaded in memory #211961
[Fleet] Use streaming for package install instead of an assetsMap with everything loaded in memory #211961
Conversation
0bd6a9e
to
5e4e04b
Compare
5e4e04b
to
7240f57
Compare
Pinging @elastic/fleet (Team:Fleet) |
if (!validKibanaAssetTypes.has(assetType as KibanaAssetType)) { | ||
return []; | ||
} | ||
// Todo check if we put this behind a condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you going to update this?
x-pack/platform/plugins/shared/fleet/server/services/epm/kibana/assets/install.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
…kibana into feature-stream-package-install
@elasticmachine merge upstream |
Can you give a few examples on the difference in external memory and duration of package install? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Have we ran the install all packages script with these changes? Could be interesting to benchmark |
@jen-huang here the results of the benchmark With that PR
Before
|
💚 Build Succeeded
Metrics [docs]
History
cc @nchaulet |
I compared them and on average, there doesn't seem to be much difference between the two results (overall average increase of 0.129s). The only one that shows a big difference is |
Summary
Related to #206842
That PR change how we install packages to not rely on a big assets map that contains all the assets, but by streaming the related assets when needed.
To not change to much the code, I still load smaller assets map for templates, pipelines, but in the future we could improve that by streaming here too.
Benchmark
I Tested installing a few packages, before that PR and it seems it consume a little less external memory, and it's a little slower.
Before
Memory metrics Installing aws package
After
Memory metrics Installing aws package
Todo
Kibana assets
ES assets
Package assets