-
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] Change default batch size #161249
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@nchaulet do you think that on the long term we could have a batch size inferred from the available memory? |
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: cc @nchaulet |
Yes it probably something we can improve in the long term Also on your question offline on when do we trigger those upgrade it happens when we need a new feature deployed all agent policies, for example in 8.8 the schema was bumped to introduce agent protection features to the agent policy |
(cherry picked from commit 8ef1287)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.9`: - [[Fleet] Change default batch size (#161249)](#161249) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-07-05T13:49:38Z","message":"[Fleet] Change default batch size (#161249)","sha":"8ef128701757ad24617e0c97ab8e0a186bc87ec2","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.9.0","v8.10.0"],"number":161249,"url":"https://github.com/elastic/kibana/pull/161249","mergeCommit":{"message":"[Fleet] Change default batch size (#161249)","sha":"8ef128701757ad24617e0c97ab8e0a186bc87ec2"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161249","number":161249,"mergeCommit":{"message":"[Fleet] Change default batch size (#161249)","sha":"8ef128701757ad24617e0c97ab8e0a186bc87ec2"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
@@ -519,6 +520,17 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { | |||
<EuiSpacer size="l" /> | |||
</> | |||
)} | |||
{/* TODO serverless agent soft limit */} | |||
{showUnhealthyCallout && ( |
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.
@nchaulet Is this an accidental change? I am seeing a double notification on Fleet UI on main:
Adding #161249 (Kibana can run out of memory during an upgrade when there are many Fleet agent policies in place) to known issues for 8.8.x. --------- Co-authored-by: David Kilfoyle <[email protected]>
Adding elastic#161249 (Kibana can run out of memory during an upgrade when there are many Fleet agent policies in place) to known issues for 8.8.x. --------- Co-authored-by: David Kilfoyle <[email protected]>
Adding elastic#161249 (Kibana can run out of memory during an upgrade when there are many Fleet agent policies in place) to known issues for 8.8.x. --------- Co-authored-by: David Kilfoyle <[email protected]> (cherry picked from commit e5cce01)
Adding elastic#161249 (Kibana can run out of memory during an upgrade when there are many Fleet agent policies in place) to known issues for 8.8.x. --------- Co-authored-by: David Kilfoyle <[email protected]>
Summary
Resolve #158361
Change default batch size for schema version upgrade from 100 concurrent policies to 2 to reduce memory usage.
When we have to do a schema change on the policy we need to update all the policies, the current code was doing 100 policies concurently that could cause some memory issue on small Kibana instance. (as we recommend to have at max 500 agent policies, and that upgrade is triggered asynchronously during Kibana start it should still happen in a reasonable amount of time)
Alternative solution
Instead of configuring this as a default we could configure this in the stackpack only for small Kibana instances