test: extend BenchmarkScheduling with multi-NodePool variants - #3246
Draft
nathangeology wants to merge 1 commit into
Draft
test: extend BenchmarkScheduling with multi-NodePool variants#3246nathangeology wants to merge 1 commit into
nathangeology wants to merge 1 commit into
Conversation
Add BenchmarkSchedulingMultiNodePool exercising Scheduler.Solve over fixtures with 5, 10, and 20 NodePools across pod counts of 100, 500, and 1000. The existing BenchmarkScheduling* family runs against a single NodePool, which hides cross-NodePool cost in NewTopology (buildDomainGroups), per-NodePool GetInstanceTypes fan-out, and per-NodePool scheduling-template construction. The new sub-benches report ns/op, B/op, and allocs/op across the (NodePoolCount, PodCount) grid so that a regression in any of those paths surfaces on the appropriate cell. Refs kubernetes-sigs#2997 Signed-off-by: Nathaniel Jones <jonesflp@amazon.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nathangeology The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #N/A
Description
Adds
BenchmarkSchedulingMultiNodePooltopkg/controllers/provisioning/scheduling/scheduling_benchmark_test.go. The existingBenchmarkScheduling*family drivesScheduler.Solveagainst a single NodePool, so per-NodePool costs never appear in the numbers. The new sub-benchmarks cover a(NodePoolCount, PodCount)grid of{5, 10, 20} x {100, 500, 1000}NodePools by pods, giving nine cells.Cross-NodePool cost lives in a few paths that the single-NodePool benches skip:
NewTopology->buildDomainGroupsiterates NodePools when constructing domain groups, per-NodePoolGetInstanceTypesfans out during scheduling, and per-NodePool scheduling-template construction runs once per NodePool. A regression in any of those paths lands on the row of the grid that exercises it, so ns/op, B/op, and allocs/op deltas point at the offending path rather than getting averaged into a single number.A helper
setupMultiNodePoolSchedulerconstructs the fixture:nodePoolCountNodePools with generous CPU and memory limits, sharing the same 100-instance-type list fromfake.InstanceTypes(100).Scheduler.Solveruns againstmakeDiversePods(podCount). No new dependencies. No changes to production code.How was this change tested?
Ran the new benchmark family locally with a single iteration per sub-bench to confirm every cell executes and reports timings:
make verify,make vulncheck, andmake licensesall pass locally on the rebased branch. Numbers above are with-benchtime=1xfor a smoke-test only; longer runs are needed before treating any single cell as a baseline.AI Disclosure
I used an LLM to parallel program with me on this. That included drafting the PR description and running the rebase against upstream/main. All code changes on this branch were authored by me previously; the LLM did not write the benchmark code.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.