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: node resource report and common QoS features support cgroups-v2 #879

Conversation

saintube
Copy link
Member

@saintube saintube commented Dec 12, 2022

Signed-off-by: saintube saintube@foxmail.com

Ⅰ. Describe what this PR does

  1. koordlet supports reporting node metrics correctly on cgroups-v2
  2. fixes a bug in which the node cpu usage is too small
  3. common QoS features support cgroups-v2, including CPUBurst, MemoryEvict, BatchResource, BVT

Ⅱ. Does this pull request fix one issue?

fixes #885.
part of #407.

Ⅲ. Describe how to verify it

  1. deploy the koordlet on a node with cgroups-v2 enabled.
  2. verify the koordlet container runs normally and the node metrics are collected correctly.

Ⅳ. 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 Dec 12, 2022

Codecov Report

Base: 66.46% // Head: 66.89% // Increases project coverage by +0.42% 🎉

Coverage data is based on head (7549c98) compared to base (08bb486).
Patch coverage: 50.72% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
+ Coverage   66.46%   66.89%   +0.42%     
==========================================
  Files         233      234       +1     
  Lines       26757    26879     +122     
==========================================
+ Hits        17785    17981     +196     
+ Misses       7712     7620      -92     
- Partials     1260     1278      +18     
Flag Coverage Δ
unittests 66.89% <50.72%> (+0.42%) ⬆️

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

Impacted Files Coverage Δ
pkg/koordlet/resourceexecutor/reader.go 70.96% <ø> (ø)
pkg/koordlet/runtimehooks/protocol/protocol.go 3.92% <0.00%> (-0.43%) ⬇️
pkg/koordlet/util/container.go 63.58% <ø> (-0.45%) ⬇️
pkg/koordlet/util/system/cgroup2.go 5.55% <0.00%> (-0.36%) ⬇️
pkg/koordlet/resourceexecutor/executor.go 37.19% <30.00%> (ø)
pkg/koordlet/util/system/cgroup.go 34.19% <35.71%> (+1.29%) ⬆️
pkg/koordlet/util/node.go 41.66% <40.00%> (-3.34%) ⬇️
pkg/koordlet/metricsadvisor/collector.go 44.53% <46.15%> (+33.07%) ⬆️
pkg/koordlet/resourceexecutor/updater.go 43.80% <50.00%> (ø)
pkg/koordlet/util/meminfo.go 82.14% <50.00%> (+0.21%) ⬆️
... and 23 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.

@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from 5692010 to efc5d77 Compare December 12, 2022 13:39
@koordinator-bot koordinator-bot bot added size/L and removed size/M labels Dec 12, 2022
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch 3 times, most recently from c9a1b9e to f3989ce Compare December 14, 2022 07:35
@koordinator-bot koordinator-bot bot added size/XL and removed size/L labels Dec 14, 2022
@saintube saintube changed the title WIP: koordlet: node resource report support cgroups-v2 koordlet: node resource report support cgroups-v2 Dec 14, 2022
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch 3 times, most recently from 2888a85 to a232ef5 Compare December 14, 2022 12:25
@saintube
Copy link
Member Author

/milestone v1.1

@koordinator-bot koordinator-bot bot added this to the v1.1 milestone Dec 14, 2022
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch 2 times, most recently from 9102216 to 98bfa02 Compare December 15, 2022 01:47
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch 2 times, most recently from b3ded40 to 325dc21 Compare December 16, 2022 03:03
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from 325dc21 to db2505d Compare December 16, 2022 03:32
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from db2505d to be38e71 Compare December 16, 2022 08:48
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from be38e71 to 783f59f Compare December 16, 2022 09:13
@saintube saintube changed the title koordlet: node resource report support cgroups-v2 koordlet: node resource report and common QoS features support cgroups-v2 Dec 16, 2022
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from 783f59f to 2bade09 Compare December 16, 2022 09:54
pkg/koordlet/resmanager/cpu_burst.go Outdated Show resolved Hide resolved
pkg/koordlet/resmanager/cpu_burst.go Outdated Show resolved Hide resolved
pkg/koordlet/resmanager/cpu_burst.go Outdated Show resolved Hide resolved
pkg/koordlet/util/system/resource.go Outdated Show resolved Hide resolved
pkg/koordlet/util/system/cgroup_resource.go Outdated Show resolved Hide resolved
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch 3 times, most recently from dfd405c to d2692ca Compare December 19, 2022 08:18
…s-v2

Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the node-resource-report-support-cgroupsv2 branch from d2692ca to 7549c98 Compare December 19, 2022 08:24
@saintube
Copy link
Member Author

@zwzhang0107
Copy link
Contributor

/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 df60f06 into koordinator-sh:main Dec 21, 2022
lucming pushed a commit to lucming/koordinator that referenced this pull request Feb 8, 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.

[proposal] node metrics report should support cgroups-v2
3 participants