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

chore: Use self-affinity to ensure all pods schedule #1938

Merged

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented Jan 28, 2025

Fixes #N/A

Description

Use self-affinity to ensure that all pods schedule when executing the scheduling benchmark. This also expands the test case to run up to 20,000 pods since the tests are executing quicker now

Scheduling Benchmark

=== RUN   TestSchedulingProfile
scheduled 40151 against 8031 nodes in total in 59.075917891s 679.6508870853593 pods/sec
400 instances 1 pods      1 nodes     183.429µs per scheduling      183.429µs per pod
400 instances 50 pods     10 nodes    42.179802ms per scheduling    843.596µs per pod
400 instances 100 pods    20 nodes    93.097613ms per scheduling    930.976µs per pod
400 instances 500 pods    100 nodes   415.767736ms per scheduling   831.535µs per pod
400 instances 1000 pods   200 nodes   890.825521ms per scheduling   890.825µs per pod
400 instances 1500 pods   300 nodes   1.300125958s per scheduling   866.75µs per pod
400 instances 2000 pods   400 nodes   1.625429875s per scheduling   812.714µs per pod
400 instances 5000 pods   1000 nodes  5.086005208s per scheduling   1.017201ms per pod
400 instances 10000 pods  2000 nodes  12.071574167s per scheduling  1.207157ms per pod
400 instances 20000 pods  4000 nodes  35.739747083s per scheduling  1.786987ms per pod
--- PASS: TestSchedulingProfile (66.78s)
PASS

How was this change tested?

go test -bench=.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 28, 2025
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2025
@k8s-ci-robot k8s-ci-robot requested a review from tallaxes January 28, 2025 06:43
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 28, 2025
@jonathan-innis jonathan-innis force-pushed the use-self-affinity-tsc branch 2 times, most recently from fe3275d to 49efd53 Compare January 28, 2025 16:12
@jonathan-innis jonathan-innis changed the title chore: Use self-affinity and TSC to ensure all pods schedule chore: Use self-affinity to ensure all pods schedule Jan 28, 2025
Comment on lines +93 to +98
func BenchmarkScheduling10000(b *testing.B) {
benchmarkScheduler(b, 400, 10000)
}
func BenchmarkScheduling20000(b *testing.B) {
benchmarkScheduler(b, 400, 20000)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@rschalo rschalo left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan-innis, rschalo

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 removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2025
@rschalo
Copy link
Contributor

rschalo commented Jan 28, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2025
@k8s-ci-robot k8s-ci-robot merged commit e9fea22 into kubernetes-sigs:main Jan 28, 2025
13 checks passed
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants