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

koord-descheduler: LowNodeLoad supports anomaly detector #987

Merged

Conversation

eahydra
Copy link
Member

@eahydra eahydra commented Feb 5, 2023

Signed-off-by: Joseph joseph.t.lee@outlook.com

Ⅰ. Describe what this PR does

One of the commonly encountered scenarios: the load of the node suddenly rises, but then drops back quickly. If LowNodeLoad happens to be executing at this time, an unexpected eviction action is performed.

Therefore, in order to avoid such sudden scenarios, LowNodeLoad introduces an anomaly detector to help determine whether a node is really overutilized. The default detection is that if the load of a node is higher than HighThresholds for five consecutive times, then the node is considered really overutilized.

Users can configure the detection thresholds via LowNodeArgs.AnomalyThresholds.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

  1. create stress pods
  2. run the latest descheduler with LowNodeLoad plugin.
  3. watch the logs, you can see the logs:
I0206 00:52:33.366587   14886 low_node_load.go:184] "None of the nodes were detected as anomalous, nothing to do here"
  1. After run LowNodeLoad.Balance five times, the stress pods on the nodes that are overutilized will be evicted.

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Base: 66.99% // Head: 67.60% // Increases project coverage by +0.60% 🎉

Coverage data is based on head (cd901fa) compared to base (1e3fa53).
Patch coverage: 83.14% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #987      +/-   ##
==========================================
+ Coverage   66.99%   67.60%   +0.60%     
==========================================
  Files         244      244              
  Lines       28330    28140     -190     
==========================================
+ Hits        18981    19025      +44     
+ Misses       8049     7816     -233     
+ Partials     1300     1299       -1     
Flag Coverage Δ
unittests 67.60% <83.14%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ler/apis/config/validation/validation_loadaware.go 0.00% <0.00%> (ø)
pkg/descheduler/utils/anomaly/types.go 0.00% <0.00%> (ø)
...duler/framework/plugins/loadaware/low_node_load.go 73.44% <85.96%> (+2.85%) ⬆️
pkg/descheduler/utils/anomaly/basic_detector.go 89.24% <89.24%> (ø)
pkg/descheduler/utils/anomaly/counter.go 100.00% <100.00%> (ø)
pkg/koordlet/executor/resource_update_executor.go
pkg/koordlet/executor/types.go
pkg/koordlet/executor/resctrl_executor.go
pkg/koordlet/runtimehooks/reconciler/reconciler.go 67.05% <0.00%> (+1.17%) ⬆️
pkg/scheduler/plugins/coscheduling/core/gang.go 78.23% <0.00%> (+2.15%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra force-pushed the descheduler_lownodeload_breaker branch from 07d770f to bfd3168 Compare February 6, 2023 02:00
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@eahydra eahydra force-pushed the descheduler_lownodeload_breaker branch from bfd3168 to cd901fa Compare February 7, 2023 01:41
@eahydra eahydra requested a review from saintube February 7, 2023 01:41
@saintube
Copy link
Member

saintube commented Feb 7, 2023

/lgtm

@zwzhang0107
Copy link
Contributor

/lgtm

Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Member

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp, jasonliu747

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit 998e79b into koordinator-sh:main Feb 7, 2023
@eahydra eahydra added this to the v1.2 milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants