-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
schedulerlatency: improve percentile computation #89829
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Comments
irfansharif
added
the
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
label
Oct 12, 2022
@aadityasondhi expressed interest in picking this up, assigning. |
aadityasondhi
added a commit
to aadityasondhi/cockroach
that referenced
this issue
Dec 22, 2022
This patch improves the percentile calculation by using linear interpolation between bucket boundaries instead of using the mid-point. The patch also adds tests to compare values of the scheduler histograms to those found in util/metric.go which are based on the prometheus implementation to maintain consistency among metrics. Fixes cockroachdb#89829 Release note: None
aadityasondhi
added a commit
to aadityasondhi/cockroach
that referenced
this issue
Dec 22, 2022
This patch improves the percentile calculation by using linear interpolation between bucket boundaries instead of using the mid-point. The patch also adds tests to compare values of the scheduler histograms to those found in util/metric.go which are based on the prometheus implementation to maintain consistency among metrics. Fixes cockroachdb#89829 Release note: None
aadityasondhi
added a commit
to aadityasondhi/cockroach
that referenced
this issue
Jan 13, 2023
This patch improves the percentile calculation by using linear interpolation between bucket boundaries instead of using the mid-point. The patch also adds tests to compare values of the scheduler histograms to those found in util/metric.go which are based on the prometheus implementation to maintain consistency among metrics. Fixes cockroachdb#89829. Release note: None
craig bot
pushed a commit
that referenced
this issue
Jan 19, 2023
94193: schedulerlatency: implement linear interpolation for percentiles r=aadityasondhi a=aadityasondhi This patch improves the percentile calculation by using linear interpolation between bucket boundaries instead of using the mid-point. The patch also adds tests to compare values of the scheduler histograms to those found in util/metric.go which are based on the prometheus implementation to maintain consistency among metrics. Fixes #89829 Release note: None 95231: upgrades: modify InjectLegacyTable to handle dynamically assigned IDs r=postamar a=andyyang890 This patch modifies the `InjectLegacyTable` function, which is used by upgrade tests to inject an old version of a table descriptor, to handle the case where the table has a dynamically assigned ID. Epic: None Release note: None Co-authored-by: Aaditya Sondhi <[email protected]> Co-authored-by: Andy Yang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Is your feature request related to a problem? Please describe.
The way we're computing scheduling latencies at specific percentiles (typically p99) is naive thanks to yours truly. It just picks the mid point of the bucket we've found for the given percentile, instead of linearly interpolating. Experimentally we've noticed that this makes us slightly insensitive to changes in
admission.elastic_cpu.scheduler_latency_target
-- a target of 1ms behaves no differently than, say, 950us.cockroach/pkg/util/schedulerlatency/sampler.go
Lines 337 to 346 in e397faf
This is partly due to how the bucket boundaries are configured in the Go runtime, something we have no say over (yet):
cockroach/pkg/util/schedulerlatency/sampler.go
Lines 285 to 289 in e397faf
+cc @cockroachdb/admission-control.
Jira issue: CRDB-20459
The text was updated successfully, but these errors were encountered: