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

Enable profiling by default in the scheduler #84835

Conversation

denkensk
Copy link
Member

@denkensk denkensk commented Nov 6, 2019

What type of PR is this?
/kind feature
/sig scheduling
/priority important-soon
/milestone v1.17

What this PR does / why we need it:
It is useful when debugging the performance of a running cluster. API server already enables profiling by default.

Which issue(s) this PR fixes:
Fixes #84799

Does this PR introduce a user-facing change?:

Profiling is enabled by default in the scheduler 

/assign @ahg-g

@k8s-ci-robot
Copy link
Contributor

@denkensk: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your and have them propose you as an additional delegate for this responsibility.

In response to this:

What type of PR is this?
/kind feature
/sig scheduling
/priority important-soon
/milestone v1.17

What this PR does / why we need it:
It is useful when debugging the performance of a running cluster. API server already enables profiling by default.

Which issue(s) this PR fixes:
Fixes #84799

Does this PR introduce a user-facing change?:

Profiling is enabled by default in the scheduler 

/assign @ahg-g

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.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 6, 2019
@@ -111,4 +111,10 @@ func SetDefaults_KubeSchedulerConfiguration(obj *kubeschedulerconfigv1alpha1.Kub
defaultPodMaxBackoffSeconds := int64(10)
obj.PodMaxBackoffSeconds = &defaultPodMaxBackoffSeconds
}

// Enable profiling by default in the scheduler.
enableProfiling := true
Copy link
Member

Choose a reason for hiding this comment

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

move it inside the if statement like the others.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks ~ Done

enableProfiling := true
if obj.EnableProfiling == nil {
obj.EnableProfiling = &enableProfiling
}
Copy link
Member

Choose a reason for hiding this comment

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

set EnableContentionProfiling to true by default if EnableProfiling is true:

if *obj.EnableProfiling && obj.EnableContentionProfiling == nil {
 enableContentionProfiling := true
 obj.EnableContentionProfiling = &enableContentionProfiling 
}

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks ~ Done

@denkensk denkensk force-pushed the enable-profiling-default-in-scheduler branch from ae63bd5 to 2aed1fd Compare November 6, 2019 03:31
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 6, 2019
Copy link
Contributor

@draveness draveness left a comment

Choose a reason for hiding this comment

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

/lgtm

Looks good, thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2019
@denkensk
Copy link
Member Author

denkensk commented Nov 6, 2019

/test pull-kubernetes-kubemark-e2e-gce-big

@@ -111,4 +111,16 @@ func SetDefaults_KubeSchedulerConfiguration(obj *kubeschedulerconfigv1alpha1.Kub
defaultPodMaxBackoffSeconds := int64(10)
obj.PodMaxBackoffSeconds = &defaultPodMaxBackoffSeconds
}

// Enable profiling to true by default in the scheduler.
Copy link
Member

Choose a reason for hiding this comment

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

nit: Enable profiling by default in the scheduler

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks~~ Done

obj.EnableProfiling = &enableProfiling
}

// Enable ContentionProfiling to true by default if EnableProfiling is true.
Copy link
Member

Choose a reason for hiding this comment

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

nit: Enable contention profiling by default if profiling is enabled.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks~~ Done

@denkensk denkensk force-pushed the enable-profiling-default-in-scheduler branch from 2aed1fd to 06842bf Compare November 6, 2019 06:57
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2019
@denkensk denkensk force-pushed the enable-profiling-default-in-scheduler branch from 06842bf to e85ebcc Compare November 6, 2019 07:25
@ahg-g
Copy link
Member

ahg-g commented Nov 6, 2019

/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 Nov 6, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, denkensk

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 Nov 6, 2019
@k8s-ci-robot k8s-ci-robot merged commit f23dd40 into kubernetes:master Nov 6, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Nov 6, 2019
@denkensk denkensk deleted the enable-profiling-default-in-scheduler branch November 6, 2019 08:52
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable profiling by default in the scheduler
4 participants