Skip to content

Collect some of scheduling metrics and scheduling throughput (vol. 2) #87923

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

Conversation

ingvagabund
Copy link
Contributor

@ingvagabund ingvagabund commented Feb 7, 2020

In addition to getting overall performance measurements from golang benchmark,
collect metrics that provides information about inside of the scheduling itself.

Metrics in question:

  • scheduler_scheduling_algorithm_predicate_evaluation_seconds
  • scheduler_scheduling_algorithm_priority_evaluation_seconds
  • scheduler_binding_duration_seconds
  • scheduler_e2e_scheduling_duration_seconds

Scheduling throughput is computed on the fly inside benchmarkScheduling.

Also, due to restrictions introduced by Metrics Stability Migration KEP, one should not depend on
prometheus internals directly.

Re-picking #85861 which was reverted by #87897

Fixes: #87923

What type of PR is this?
/kind feature

What this PR does / why we need it:
Resolving #85861 (comment)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 7, 2020
@k8s-ci-robot k8s-ci-robot requested review from hex108 and loburm February 7, 2020 10:55
@ingvagabund ingvagabund force-pushed the move-direct-prometheus-metrics-under-component-base-metrics branch 4 times, most recently from a0afa2b to 45a74be Compare February 7, 2020 11:01
@serathius
Copy link
Contributor

Thanks for handling this.
Assigning main contributors to metrics framework.
/assign @RainbowMango @logicalhan

@ingvagabund ingvagabund force-pushed the move-direct-prometheus-metrics-under-component-base-metrics branch from 45a74be to 5dee21d Compare February 7, 2020 11:11
@RainbowMango
Copy link
Member

/retest

1 similar comment
@ingvagabund
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2020
@ingvagabund ingvagabund force-pushed the move-direct-prometheus-metrics-under-component-base-metrics branch from 5dee21d to 8d02e94 Compare February 7, 2020 14:09
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2020
@ingvagabund
Copy link
Contributor Author

FYI @ahg-g @liu-cong

@ingvagabund
Copy link
Contributor Author

/retest

1 similar comment
@ingvagabund
Copy link
Contributor Author

/retest

@ahg-g
Copy link
Member

ahg-g commented Feb 11, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 11, 2020
Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

/approve cancel

@ingvagabund ingvagabund force-pushed the move-direct-prometheus-metrics-under-component-base-metrics branch from 9b7653a to ac0633f Compare February 12, 2020 16:48
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 12, 2020
@ingvagabund
Copy link
Contributor Author

/retest


// GetHistogramFromBuckets creates a histogram from a list of buckets.
// Given individual samples are unknown, SampleSum is not computed.
func GetHistogramFromBuckets(buckets []bucket) Histogram {
Copy link
Member

Choose a reason for hiding this comment

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

it is strange that we have a function that creates a histogram from buckets, and then we convert back to buckets when computing quantiles. I suggest we remove this function, the other PR should create a dto.Histogram directly from the samples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the code was not designed to accept anything but dto.Histogram.

In addition to getting overall performance measurements from golang benchmark,
collect metrics that provides information about insides of the scheduler itself.
This is a first step towards improving what we collect about the scheduler.

Metrics in question:
- scheduler_scheduling_algorithm_predicate_evaluation_seconds
- scheduler_scheduling_algorithm_priority_evaluation_seconds
- scheduler_binding_duration_seconds
- scheduler_e2e_scheduling_duration_seconds

Scheduling throughput is computed on the fly inside perfScheduling.
@ingvagabund ingvagabund force-pushed the move-direct-prometheus-metrics-under-component-base-metrics branch from ac0633f to 7b55340 Compare February 13, 2020 12:33
@ingvagabund
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Wonderful, thanks a lot!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 13, 2020
Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

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

/lgtm

@logicalhan
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, ingvagabund, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2020
@logicalhan
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2020
@ahg-g
Copy link
Member

ahg-g commented Feb 13, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit a53b25a into kubernetes:master Feb 13, 2020
@k8s-ci-robot k8s-ci-robot modified the milestone: v1.18 Feb 13, 2020
@k8s-ci-robot
Copy link
Contributor

@ingvagabund: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce 7b55340 link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants