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

[kbn/optimizer] allocate workers less aggressively #67735

Conversation

spalger
Copy link
Contributor

@spalger spalger commented May 29, 2020

In an attempt to avoid the optimizer overwhelming computers by launching tons of workers this update to the optimizer modifies two things:

  1. The worker assignment algorithm will attempt to limit the number of modules assigned to each worker, possibly creating more worker assignments than the max number of workers
  2. If there are more worker assignments created than the maximum number of workers then only N workers will be run at a time, as soon as a worker is no longer active (complete in standard mode, idle in watch mode) another worker will be started.

To experiment with these parameter you can use the --workers and --worker-size flags to the node scripts/build_kibana_platform_plugins CLI. Check --help for more info.

To customize these values with yarn start you can specify the KBN_OPTIMIZER_MAX_ACTIVE_WORKERS and KBN_OPTIMIZER_SOFT_MAX_MODULES_PER_WORKER environment variables.

@spalger spalger added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.8.0 v7.9.0 v8.0.0 labels May 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger marked this pull request as ready for review May 29, 2020 19:25
@spalger spalger requested a review from a team as a code owner May 29, 2020 19:25
@spalger spalger marked this pull request as draft May 29, 2020 19:25
@spalger
Copy link
Contributor Author

spalger commented May 29, 2020

Would love to collect feedback from people about how this runs on their machines before seeking review for merging. Try using different values for KBN_OPTIMIZER_MAX_ACTIVE_WORKERS and KBN_OPTIMIZER_SOFT_MAX_MODULES_PER_WORKER when you run yarn start

cc: @andrew-goldstein @lizozom @timroes @mistic

@spalger
Copy link
Contributor Author

spalger commented Jun 1, 2020

@elasticmachine merge upstream

@spalger spalger mentioned this pull request Jun 4, 2020
15 tasks
@spalger
Copy link
Contributor Author

spalger commented Jun 16, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

Build metrics

‼️ metrics were not reported for [#67735@7ca8195]

History

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

@spalger spalger added v7.8.1 and removed v7.8.0 labels Jun 18, 2020
@spalger
Copy link
Contributor Author

spalger commented Jul 8, 2020

I haven't seen any evidence that this makes the optimizer more efficient, though we might revisit it again later.

@spalger spalger closed this Jul 8, 2020
@spalger spalger deleted the implement/kbn-optimizer/worker-allocation-v2 branch August 18, 2020 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.8.1 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants