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
Move a number of scheduler metrics to STABLE #106266
Conversation
@ahg-g: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/scheduler/metrics/metrics.go
Outdated
@@ -143,7 +143,7 @@ var ( | |||
// Start with 0.01ms with the last bucket being [~22ms, Inf). We use a small factor (1.5) | |||
// so that we have better granularity since plugin latency is very sensitive. | |||
Buckets: metrics.ExponentialBuckets(0.00001, 1.5, 20), | |||
StabilityLevel: metrics.ALPHA, | |||
StabilityLevel: metrics.STABLE, |
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.
Can you think of a way to validate if this metric is accurate and useful?
Currently, we post at most 1000 samples every second. Since there's no particular logic to decide which samples should proceed, I fear that the information might be skewed towards certain extension point.
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.
It will not be skewed because we either sample the whole cycle or not. We can increase the sampling rate if we wish to make it more accurate, but in the end it depends on the number of instances we are sampling from (so number of scheduling cycles), and that depends on the cluster.
I don't think it provides useful information fleet-wide, but when debugging a specific cluster that we know uses heavily a specific feature, this metric can provide useful information on how much time that feature is adding overhead on the scheduling cycle.
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.
It will not be skewed because we either sample the whole cycle or not.
Why do you say that?
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.
Because we don't sample based on the extension point, we either time for all extension points or for none of them in a scheduling cycle.
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.
Also, the sampling is random
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.
to recap from offline discussion: There are 2 things controlling what gets recorded:
- a random sampling per scheduling cycle
kubernetes/pkg/scheduler/scheduler.go
Line 441 in 6ac2d8e
state.SetRecordPluginMetrics(rand.Intn(100) < pluginMetricsSamplePercent) - a buffer
bufferCh: make(chan *frameworkMetric, bufferSize),
My only concern is that the buffer might cause certain extension points to not be recorded because they are not called often. I think the most important one is the preemption PostFilter plugin. I would be more comfortable graduating this metric if we can ensure that the buffer is enough to fit an entire scheduling cycle for a 5k cluster with a default percentageOfNodesToScore
.
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.
ok, I think we should just drop the graduation of this one for now, for the filter plugin, it would be ideal if we can measure for all nodes, not per node.
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 that would reduce a lot of measuring points.
Thanks!
Looks good to me from an instrumentation perspective. Leaving it up to scheduler owners to judge whether the metrics that are proposed for graduation are actually used. |
You probably need to update |
/lgtm |
@alculquicondor unit test fixed |
/lgtm |
/retest |
Also looks good to me, not label lgtm for I'm not a reviewer now. |
/assign @logicalhan to approve "test/instrumentation/testdata/OWNERS" |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, logicalhan 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 |
/retest |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Marks a number of scheduler metrics as stable. Those has been around for quite sometime and some are using them to create scheduler SLOs
Which issue(s) this PR fixes:
Follow up to #105861
Special notes for your reviewer:
Does this PR introduce a user-facing change?