-
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
[Response Ops][Task Manager] Setting background task utilization window based on poll interval #203481
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/response-ops (Team:ResponseOps) |
@elasticmachine merge upstream |
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.
Changes LGTM!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There are no new commits on the base branch. |
/ci |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
cc @ymao1 |
Starting backport for target branches: 8.x |
…ow based on poll interval (elastic#203481) ## Summary Setting a desired window length (15 seconds) for the background task utilization window running average and calcuating the number of entries to average based on the poll interval. Updating config to be optional so this value can still be configured but if not configured will be calculated. ## To Verify - Add a console log to log the window size ``` --- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts @@ -59,6 +59,7 @@ export function createBackgroundTaskUtilizationAggregator( workerUtilizationRunningAverageWindowSize ?? WORKER_UTILIZATION_RUNNING_AVERAGE_WINDOW_SIZE_MS / pollInterval; + console.log(`workerUtilizationWindowSize ${workerUtilizationWindowSize}`); const taskRunEventToAdhocStat = createTaskRunEventToAdhocStat(); const taskRunAdhocEvents$: Observable<Pick<BackgroundTaskUtilizationStat, 'adhoc'>> = ``` - Start Kibana with `mget` claim strategy. The window size should be 30 - Start Kibana with `update_by_query` claim strategy. The window size should be 5 - Set `xpack.task_manager.worker_utilization_running_average_window: 22` in your Kibana config and start Kibana. The window size should be 22 (takes the configured window size if it's passed in). Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit a82a02e)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…n window based on poll interval (#203481) (#205782) # Backport This will backport the following commits from `main` to `8.x`: - [[Response Ops][Task Manager] Setting background task utilization window based on poll interval (#203481)](#203481) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-07T16:13:24Z","message":"[Response Ops][Task Manager] Setting background task utilization window based on poll interval (#203481)\n\n## Summary\r\n\r\nSetting a desired window length (15 seconds) for the background task\r\nutilization window running average and calcuating the number of entries\r\nto average based on the poll interval. Updating config to be optional so\r\nthis value can still be configured but if not configured will be\r\ncalculated.\r\n\r\n## To Verify\r\n\r\n- Add a console log to log the window size\r\n\r\n```\r\n--- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n+++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n@@ -59,6 +59,7 @@ export function createBackgroundTaskUtilizationAggregator(\r\n workerUtilizationRunningAverageWindowSize ??\r\n WORKER_UTILIZATION_RUNNING_AVERAGE_WINDOW_SIZE_MS / pollInterval;\r\n\r\n+ console.log(`workerUtilizationWindowSize ${workerUtilizationWindowSize}`);\r\n const taskRunEventToAdhocStat = createTaskRunEventToAdhocStat();\r\n const taskRunAdhocEvents$: Observable<Pick<BackgroundTaskUtilizationStat, 'adhoc'>> =\r\n```\r\n\r\n- Start Kibana with `mget` claim strategy. The window size should be 30\r\n- Start Kibana with `update_by_query` claim strategy. The window size\r\nshould be 5\r\n- Set `xpack.task_manager.worker_utilization_running_average_window: 22`\r\nin your Kibana config and start Kibana. The window size should be 22\r\n(takes the configured window size if it's passed in).\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a82a02e04335955fb9ad3e26e157b1debd6be0e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Task Manager","Team:ResponseOps","v9.0.0","backport:prev-minor","ci:project-deploy-security","v8.18.0"],"title":"[Response Ops][Task Manager] Setting background task utilization window based on poll interval","number":203481,"url":"https://github.com/elastic/kibana/pull/203481","mergeCommit":{"message":"[Response Ops][Task Manager] Setting background task utilization window based on poll interval (#203481)\n\n## Summary\r\n\r\nSetting a desired window length (15 seconds) for the background task\r\nutilization window running average and calcuating the number of entries\r\nto average based on the poll interval. Updating config to be optional so\r\nthis value can still be configured but if not configured will be\r\ncalculated.\r\n\r\n## To Verify\r\n\r\n- Add a console log to log the window size\r\n\r\n```\r\n--- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n+++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n@@ -59,6 +59,7 @@ export function createBackgroundTaskUtilizationAggregator(\r\n workerUtilizationRunningAverageWindowSize ??\r\n WORKER_UTILIZATION_RUNNING_AVERAGE_WINDOW_SIZE_MS / pollInterval;\r\n\r\n+ console.log(`workerUtilizationWindowSize ${workerUtilizationWindowSize}`);\r\n const taskRunEventToAdhocStat = createTaskRunEventToAdhocStat();\r\n const taskRunAdhocEvents$: Observable<Pick<BackgroundTaskUtilizationStat, 'adhoc'>> =\r\n```\r\n\r\n- Start Kibana with `mget` claim strategy. The window size should be 30\r\n- Start Kibana with `update_by_query` claim strategy. The window size\r\nshould be 5\r\n- Set `xpack.task_manager.worker_utilization_running_average_window: 22`\r\nin your Kibana config and start Kibana. The window size should be 22\r\n(takes the configured window size if it's passed in).\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a82a02e04335955fb9ad3e26e157b1debd6be0e0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203481","number":203481,"mergeCommit":{"message":"[Response Ops][Task Manager] Setting background task utilization window based on poll interval (#203481)\n\n## Summary\r\n\r\nSetting a desired window length (15 seconds) for the background task\r\nutilization window running average and calcuating the number of entries\r\nto average based on the poll interval. Updating config to be optional so\r\nthis value can still be configured but if not configured will be\r\ncalculated.\r\n\r\n## To Verify\r\n\r\n- Add a console log to log the window size\r\n\r\n```\r\n--- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n+++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/background_task_utilization_statistics.ts\r\n@@ -59,6 +59,7 @@ export function createBackgroundTaskUtilizationAggregator(\r\n workerUtilizationRunningAverageWindowSize ??\r\n WORKER_UTILIZATION_RUNNING_AVERAGE_WINDOW_SIZE_MS / pollInterval;\r\n\r\n+ console.log(`workerUtilizationWindowSize ${workerUtilizationWindowSize}`);\r\n const taskRunEventToAdhocStat = createTaskRunEventToAdhocStat();\r\n const taskRunAdhocEvents$: Observable<Pick<BackgroundTaskUtilizationStat, 'adhoc'>> =\r\n```\r\n\r\n- Start Kibana with `mget` claim strategy. The window size should be 30\r\n- Start Kibana with `update_by_query` claim strategy. The window size\r\nshould be 5\r\n- Set `xpack.task_manager.worker_utilization_running_average_window: 22`\r\nin your Kibana config and start Kibana. The window size should be 22\r\n(takes the configured window size if it's passed in).\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a82a02e04335955fb9ad3e26e157b1debd6be0e0"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ying Mao <[email protected]>
Summary
Setting a desired window length (15 seconds) for the background task utilization window running average and calcuating the number of entries to average based on the poll interval. Updating config to be optional so this value can still be configured but if not configured will be calculated.
To Verify
mget
claim strategy. The window size should be 30update_by_query
claim strategy. The window size should be 5xpack.task_manager.worker_utilization_running_average_window: 22
in your Kibana config and start Kibana. The window size should be 22 (takes the configured window size if it's passed in).