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

Enhance usage plugin #3043

Closed
wants to merge 1 commit into from
Closed

Conversation

gj409237405
Copy link
Contributor

@gj409237405 gj409237405 commented Aug 11, 2023

solve #3042

First , Before this PR, if you are using usage plugin and there is pods is blocked by usage plugin because the node NodeUtilization is not normal , and you restart volcano-scheduler ,the usage plugin is not worked.
and in this PR , I fix this little problem .

Second optimization usage plugin

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign thor-wl
You can assign the PR to them by writing /assign @thor-wl in a comment when ready.

The full list of commands accepted by this bot can be found 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

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 11, 2023
@william-wang william-wang changed the title optimization usage plugin Enhance usage plugin Aug 11, 2023
@@ -29,6 +29,7 @@ import (
prometheusv1 "github.com/prometheus/client_golang/api/prometheus/v1"
pmodel "github.com/prometheus/common/model"
"k8s.io/klog/v2"
Copy link
Member

Choose a reason for hiding this comment

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

A new line is need between volcano package and other lib package.

thresholds:
cpu: 70
mem: 70
period: 10m
*/
Copy link
Member

Choose a reason for hiding this comment

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

if I want to take both Avg.10m and Avg.30m into account, how to config it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1 firstly
I think both use AVG and COMMON is not good,so I do not support it
2 secondly
I think both use 5m and 10m is not good,so I do not support it either

by the way
I make a new PR
#3056

and this PR is closed

Copy link
Member

Choose a reason for hiding this comment

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

I make a new PR

please update commit on the same PR. thanks.

}

// here is to deal with the case that restart volcano-scheduler and there is no ResourceUsage in cache of volcano-scheduler
if source.Period == "" {
Copy link
Member

Choose a reason for hiding this comment

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

why period == "" means the case volcano restarted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes,period == "" means volcano is just starting

Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Member

Choose a reason for hiding this comment

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

why?

I know it now. period is a gloabal variable.

// here is to deal with the case that restart volcano-scheduler and there is no ResourceUsage in cache of volcano-scheduler
if source.Period == "" {
source.Period = up.SamplePeriods
ssn.GetCache().GetMetricsData()
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to fetch cache data from scheduler-cache. All the cached data is snapshoted in open session and we should use the snapshot data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when volcano is just starting, there is not read use data in snapshot

@stale
Copy link

stale bot commented Oct 15, 2023

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants