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

koordlet: support cpu eviction in cpuset supress mode with cpu static policy #914

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

wangxiaoq
Copy link
Contributor

@wangxiaoq wangxiaoq commented Dec 30, 2022

Ⅰ. Describe what this PR does

Cpu eviction does not work for cpuset suppress mode with cpu manager static policy, this pr fix it.

Ⅱ. Does this pull request fix one issue?

fix #871

Ⅲ. Describe how to verify it

  • Configure kubelet with cpuManagerPolicy: static

  • Configure koordinator's resource-threshold-config with:

  resource-threshold-config: |
    {
      "clusterStrategy": {
        "enable": true,
        "cpuSuppressThresholdPercent": 40,
        "memoryEvictThresholdPercent": 70,
        "cpuEvictBESatisfactionUpperPercent": 80,
        "cpuEvictBESatisfactionLowerPercent": 60,
        "cpuEvictBEUsageThresholdPercent": 40,
        "cpuEvictTimeWindowSeconds": 1
      },
    }
  • Create a be pod: pod1 on a K8s node: node1

  • Increase the node1's cpu usage until pod1 is 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 Jan 3, 2023

Codecov Report

Base: 66.63% // Head: 66.52% // Decreases project coverage by -0.11% ⚠️

Coverage data is based on head (85bff86) compared to base (52c3fa8).
Patch coverage: 11.11% of modified lines in pull request are covered.

❗ Current head 85bff86 differs from pull request most recent head 637ca2c. Consider uploading reports for the commit 637ca2c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #914      +/-   ##
==========================================
- Coverage   66.63%   66.52%   -0.12%     
==========================================
  Files         240      240              
  Lines       27769    27782      +13     
==========================================
- Hits        18505    18481      -24     
- Misses       7992     8035      +43     
+ Partials     1272     1266       -6     
Flag Coverage Δ
unittests 66.52% <11.11%> (-0.12%) ⬇️

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

Impacted Files Coverage Δ
pkg/koordlet/util/node.go 11.36% <0.00%> (-30.31%) ⬇️
pkg/koordlet/metricsadvisor/be_collector.go 76.34% <100.00%> (ø)
pkg/koordlet/resmanager/cpu_suppress.go 69.87% <100.00%> (+0.99%) ⬆️
pkg/scheduler/plugins/reservation/utils.go 79.27% <100.00%> (ø)
pkg/scheduler/plugins/coscheduling/core/gang.go 74.44% <0.00%> (-0.95%) ⬇️
pkg/util/httputil/reverseproxy.go 85.10% <0.00%> (+0.79%) ⬆️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 65.88% <0.00%> (+4.11%) ⬆️

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.

@zwzhang0107
Copy link
Contributor

/lgtm
PTAL @saintube

@wangxiaoq
Copy link
Contributor Author

New changes are detected. LGTM label has been removed.

Just clean the commit, remove the useless 'Merge' commit. Please re-review it, thanks. @zwzhang0107

@zwzhang0107
Copy link
Contributor

related issue: #546

pkg/koordlet/util/node.go Outdated Show resolved Hide resolved
pkg/koordlet/util/node.go Outdated Show resolved Hide resolved
Signed-off-by: Wang Xiaoqiang <wangxiaoqiang@qiyi.com>
@saintube
Copy link
Member

saintube commented Jan 4, 2023

/lgtm

@zwzhang0107
Copy link
Contributor

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zwzhang0107

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 7370eb3 into koordinator-sh:main Jan 5, 2023
@wangxiaoq wangxiaoq deleted the cpu_evict branch January 6, 2023 10:41
FillZpp pushed a commit that referenced this pull request Jan 16, 2023
… policy (#914)

Signed-off-by: Wang Xiaoqiang <wangxiaoqiang@qiyi.com>
lucming pushed a commit to lucming/koordinator that referenced this pull request Feb 8, 2023
… policy (koordinator-sh#914)

Signed-off-by: Wang Xiaoqiang <wangxiaoqiang@qiyi.com>
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.

[BUG] Cpu eviction does not work for cpuset suppress mode with cpu manager static policy
3 participants