-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Enhance usage plugin #3043
Conversation
Signed-off-by: gj199575 <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
@@ -29,6 +29,7 @@ import ( | |||
prometheusv1 "github.com/prometheus/client_golang/api/prometheus/v1" | |||
pmodel "github.com/prometheus/common/model" | |||
"k8s.io/klog/v2" |
There was a problem hiding this comment.
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 | ||
*/ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 == "" { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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. |
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