Skip to content

Conversation

@afharo
Copy link
Member

@afharo afharo commented Nov 15, 2023

Summary

After #170856, we may want to parallelize the load of the plugin's code in an attempt to speed up Kibana's startup.

We are only parallelizing the part where we load the plugin and call the constructor but we still maintain the expected order of calling the plugins' setup and start methods.

Risk Matrix

Risk Probability Severity Mitigation/Notes
Concurrently performing this action may cause unexpected spikes in CPU (and Memory?), leading to momentarily high Event Loop Delays. Low Low Memory-wise, it shouldn't be a problem because we already hold all the plugins in memory. I wouldn't expect this approach to use much more. Regarding CPU, it might require higher processing power since it's performing parallel processing, while earlier, it was sequential. We need to test it, but I doubt this will cause any issues.

For maintainers

@afharo afharo added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// performance release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Nov 15, 2023
@afharo afharo requested a review from a team as a code owner November 15, 2023 16:10
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo afharo self-assigned this Nov 15, 2023
@afharo
Copy link
Member Author

afharo commented Nov 15, 2023

According to our APM data, there doesn't seem to improve things. Which makes sense, given that loading the files from disk is the only thing that can be parallelized. Parsing and evaluating the JS files is synchronous.

Closing the PR

@afharo afharo closed this Nov 15, 2023
@kibana-ci
Copy link

kibana-ci commented Nov 15, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #82 / Monitoring Collection Prometheus endpoint returns prometheus scraped metrics
  • [job] [logs] FTR Configs #82 / Monitoring Collection Prometheus endpoint returns prometheus scraped metrics

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @afharo

@afharo afharo deleted the concurrent-initialization-of-plugins branch November 15, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting performance release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants