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-manager: improve batch resource calculation with system metrics #1559

Conversation

saintube
Copy link
Member

Ⅰ. Describe what this PR does

koord-manager: Improve the calculation of the batch resource allocatable with the newly-added system metrics.

Ⅱ. Does this pull request fix one issue?

Fixes #1427.

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

Please note that the calculated allocatable can be lower than the real result at the nodeMetric reported time. It becomes accurate when there are no more pods terminated or newly-scheduled between the nodeMetric reported time and the controller calculating time.

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 Aug 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (bb9907d) 65.16% compared to head (d1b4856) 65.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1559      +/-   ##
==========================================
+ Coverage   65.16%   65.18%   +0.01%     
==========================================
  Files         352      352              
  Lines       36326    36320       -6     
==========================================
+ Hits        23673    23676       +3     
+ Misses      10907    10901       -6     
+ Partials     1746     1743       -3     
Flag Coverage Δ
unittests 65.18% <100.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
...oller/noderesource/plugins/batchresource/plugin.go 72.00% <100.00%> (+2.38%) ⬆️
...slo-controller/noderesource/resource_calculator.go 74.32% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hormes
Copy link
Member

hormes commented Aug 22, 2023

/lgtm

Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the koord-manager-improve-batch-resource branch from 3e43455 to d1b4856 Compare August 24, 2023 08:43
@koordinator-bot koordinator-bot bot removed the lgtm label Aug 24, 2023
@zwzhang0107
Copy link
Contributor

/lgtm
/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 03c4ce4 into koordinator-sh:main Aug 29, 2023
16 checks passed
j4ckstraw pushed a commit to j4ckstraw/koordinator that referenced this pull request Jan 29, 2024
podHPUsed = quotav1.Add(podHPUsed, getPodMetricUsage(podMetric))
} else {
podHPUsed = quotav1.Add(podHPUsed, podRequest)
Copy link
Contributor

@j4ckstraw j4ckstraw Feb 20, 2024

Choose a reason for hiding this comment

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

why use Request if has no metric, how about skip?

ls-2018 pushed a commit to ls-2018/koordinator that referenced this pull request Mar 25, 2024
ls-2018 pushed a commit to ls-2018/koordinator that referenced this pull request Mar 25, 2024
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] SLO-Controller calculation batch-cpu fluctuates frequently
4 participants