Skip to content

perf(scheduler): avoid duplicate full job solver probe#1749

Draft
enoodle wants to merge 2 commits into
kai-scheduler:erez/reclaim-generator-portfolio-09-benchmark-topologyfrom
enoodle:erez/job-solver-skip-redundant-full-probe
Draft

perf(scheduler): avoid duplicate full job solver probe#1749
enoodle wants to merge 2 commits into
kai-scheduler:erez/reclaim-generator-portfolio-09-benchmark-topologyfrom
enoodle:erez/job-solver-skip-redundant-full-probe

Conversation

@enoodle

@enoodle enoodle commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Separates a pre-existing JobSolver performance fix from the reclaim generator portfolio stack.

The old solver could run the full probeAtK(n) twice: once during searchMaxSolvableK and once again in Solve to rebuild the live statement. This PR keeps searchMaxSolvableK to partial probes (k < n) and leaves the full probe to the solve path, so the full allocation is simulated once.

References:

Related Issues

Related to #1660.

Checklist

Note: Ensure your PR title follows the Conventional Commits format (e.g., feat(scheduler): add new feature)

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)

Breaking Changes

None.

Additional Notes

This PR is stacked after #1748 so the reclaim generator portfolio and benchmark PRs can be reviewed without attributing this standalone solver optimization to them.

Verification:

  • GOCACHE=/tmp/kai-reclaim-generator-go-cache go test ./pkg/scheduler/plugins/scenariogenerators ./pkg/scheduler/conf_util ./pkg/operator/operands/scheduler ./pkg/scheduler/actions/common/solvers ./pkg/scheduler/actions/reclaim ./pkg/scheduler/actions/preempt ./pkg/scheduler/actions/consolidation ./pkg/scheduler/actions/integration_tests/reclaim ./pkg/scheduler/cache ./pkg/scheduler/cache/status_updater ./pkg/scheduler/metrics ./pkg/apis/scheduling/v2alpha2 ./pkg/apis/kai/v1 -count=1
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 55b366a6-def2-476d-a199-713b4cb7fcf1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

📊 Performance Benchmark Results

Comparing PR (erez/job-solver-skip-redundant-full-probe) vs main branch — click to expand
goos: linux
goarch: amd64
pkg: github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions
cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ main-bench.txt │            pr-bench.txt            │
                                    │     sec/op     │   sec/op     vs base               │
AllocateAction_SmallCluster-4            106.3m ± 0%   106.6m ± 0%   +0.29% (p=0.026 n=6)
AllocateAction_MediumCluster-4           124.3m ± 1%   124.8m ± 1%        ~ (p=0.699 n=6)
AllocateAction_LargeCluster-4            181.7m ± 1%   182.7m ± 1%        ~ (p=0.132 n=6)
ReclaimAction_SmallCluster-4             103.3m ± 0%   103.2m ± 0%        ~ (p=0.485 n=6)
ReclaimAction_MediumCluster-4            105.7m ± 0%   105.9m ± 1%        ~ (p=0.394 n=6)
PreemptAction_SmallCluster-4             103.8m ± 0%   104.2m ± 0%   +0.43% (p=0.004 n=6)
PreemptAction_MediumCluster-4            110.3m ± 0%   114.6m ± 1%   +3.91% (p=0.002 n=6)
ConsolidationAction_SmallCluster-4       119.3m ± 1%   111.7m ± 1%   -6.31% (p=0.002 n=6)
ConsolidationAction_MediumCluster-4      242.6m ± 0%   175.3m ± 1%  -27.74% (p=0.002 n=6)
FullSchedulingCycle_SmallCluster-4       105.2m ± 0%   105.2m ± 0%        ~ (p=0.699 n=6)
FullSchedulingCycle_MediumCluster-4      116.1m ± 1%   116.4m ± 1%        ~ (p=0.240 n=6)
FullSchedulingCycle_LargeCluster-4       147.8m ± 1%   147.1m ± 1%        ~ (p=0.589 n=6)
ManyQueues_MediumCluster-4               128.4m ± 2%   128.6m ± 1%        ~ (p=0.485 n=6)
GangScheduling_MediumCluster-4           140.3m ± 1%   141.4m ± 2%        ~ (p=0.240 n=6)
geomean                                  126.9m        124.0m        -2.30%

                                    │ main-bench.txt │            pr-bench.txt             │
                                    │      B/op      │     B/op      vs base               │
AllocateAction_SmallCluster-4           2.312Mi ± 0%   2.318Mi ± 0%        ~ (p=0.240 n=6)
AllocateAction_MediumCluster-4          11.95Mi ± 0%   11.96Mi ± 0%   +0.08% (p=0.002 n=6)
AllocateAction_LargeCluster-4           40.03Mi ± 0%   40.05Mi ± 0%        ~ (p=0.065 n=6)
ReclaimAction_SmallCluster-4            946.5Ki ± 1%   953.1Ki ± 0%   +0.69% (p=0.002 n=6)
ReclaimAction_MediumCluster-4           3.090Mi ± 0%   3.103Mi ± 0%   +0.41% (p=0.002 n=6)
PreemptAction_SmallCluster-4            1.173Mi ± 1%   1.352Mi ± 0%  +15.24% (p=0.002 n=6)
PreemptAction_MediumCluster-4           4.730Mi ± 0%   5.960Mi ± 0%  +26.01% (p=0.002 n=6)
ConsolidationAction_SmallCluster-4     10.379Mi ± 0%   5.639Mi ± 0%  -45.67% (p=0.002 n=6)
ConsolidationAction_MediumCluster-4     88.85Mi ± 0%   46.52Mi ± 0%  -47.64% (p=0.002 n=6)
FullSchedulingCycle_SmallCluster-4      1.482Mi ± 0%   1.486Mi ± 0%   +0.31% (p=0.026 n=6)
FullSchedulingCycle_MediumCluster-4     7.016Mi ± 0%   7.030Mi ± 0%   +0.19% (p=0.002 n=6)
FullSchedulingCycle_LargeCluster-4      22.37Mi ± 0%   22.39Mi ± 0%   +0.10% (p=0.002 n=6)
ManyQueues_MediumCluster-4              16.43Mi ± 0%   16.45Mi ± 0%   +0.06% (p=0.002 n=6)
GangScheduling_MediumCluster-4          17.20Mi ± 0%   17.21Mi ± 0%   +0.03% (p=0.026 n=6)
geomean                                 7.228Mi        6.797Mi        -5.97%

                                    │ main-bench.txt │            pr-bench.txt            │
                                    │   allocs/op    │  allocs/op   vs base               │
AllocateAction_SmallCluster-4            35.97k ± 0%   36.03k ± 0%   +0.18% (p=0.002 n=6)
AllocateAction_MediumCluster-4           302.7k ± 0%   302.7k ± 0%   +0.02% (p=0.002 n=6)
AllocateAction_LargeCluster-4            1.266M ± 0%   1.266M ± 0%   +0.00% (p=0.048 n=6)
ReclaimAction_SmallCluster-4             8.851k ± 0%   8.932k ± 0%   +0.92% (p=0.002 n=6)
ReclaimAction_MediumCluster-4            27.99k ± 0%   28.07k ± 0%   +0.29% (p=0.002 n=6)
PreemptAction_SmallCluster-4             12.74k ± 0%   15.20k ± 0%  +19.27% (p=0.002 n=6)
PreemptAction_MediumCluster-4            44.58k ± 0%   54.97k ± 0%  +23.29% (p=0.002 n=6)
ConsolidationAction_SmallCluster-4      134.48k ± 0%   71.19k ± 0%  -47.06% (p=0.002 n=6)
ConsolidationAction_MediumCluster-4     1282.4k ± 0%   661.0k ± 0%  -48.46% (p=0.002 n=6)
FullSchedulingCycle_SmallCluster-4       21.48k ± 0%   21.60k ± 0%   +0.57% (p=0.002 n=6)
FullSchedulingCycle_MediumCluster-4      164.6k ± 0%   164.8k ± 0%   +0.08% (p=0.002 n=6)
FullSchedulingCycle_LargeCluster-4       666.1k ± 0%   666.2k ± 0%   +0.02% (p=0.002 n=6)
ManyQueues_MediumCluster-4               341.2k ± 0%   341.3k ± 0%   +0.02% (p=0.009 n=6)
GangScheduling_MediumCluster-4           551.3k ± 0%   551.4k ± 0%        ~ (p=0.063 n=6)
geomean                                  121.2k        113.8k        -6.17%

pkg: github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions/integration_tests/reclaim
                            │ main-bench.txt │             pr-bench.txt              │
                            │     sec/op     │    sec/op     vs base                 │
ReclaimLargeJobs_10Node-4        105.1m ± 0%    126.7m ± 2%    +20.57% (p=0.002 n=6)
ReclaimLargeJobs_50Node-4        130.0m ± 1%    341.2m ± 5%   +162.40% (p=0.002 n=6)
ReclaimLargeJobs_100Node-4       177.2m ± 2%    779.9m ± 9%   +340.06% (p=0.002 n=6)
ReclaimLargeJobs_200Node-4       338.4m ± 1%   2577.2m ± 1%   +661.65% (p=0.002 n=6)
ReclaimLargeJobs_500Node-4        1.296 ± 3%    18.339 ± 1%  +1315.48% (p=0.002 n=6)
ReclaimLargeJobs_1000Node-4       4.887 ± 1%   124.024 ± 1%  +2437.76% (p=0.002 n=6)
geomean                          416.1m          2.413        +480.05%

                            │ main-bench.txt │              pr-bench.txt               │
                            │      B/op      │      B/op       vs base                 │
ReclaimLargeJobs_10Node-4       2.098Mi ± 3%    16.214Mi ± 1%   +672.66% (p=0.002 n=6)
ReclaimLargeJobs_50Node-4       16.38Mi ± 0%    123.38Mi ± 0%   +653.08% (p=0.002 n=6)
ReclaimLargeJobs_100Node-4      37.24Mi ± 0%    317.78Mi ± 0%   +753.31% (p=0.002 n=6)
ReclaimLargeJobs_200Node-4      86.47Mi ± 0%    916.84Mi ± 0%   +960.25% (p=0.002 n=6)
ReclaimLargeJobs_500Node-4      262.6Mi ± 0%    4212.6Mi ± 0%  +1503.93% (p=0.002 n=6)
ReclaimLargeJobs_1000Node-4     674.7Mi ± 0%   15909.1Mi ± 0%  +2257.83% (p=0.002 n=6)
geomean                         51.93Mi          582.5Mi       +1021.61%

                            │ main-bench.txt │              pr-bench.txt              │
                            │   allocs/op    │   allocs/op    vs base                 │
ReclaimLargeJobs_10Node-4        23.47k ± 2%    226.59k ± 0%   +865.61% (p=0.002 n=6)
ReclaimLargeJobs_50Node-4        212.1k ± 0%    2226.0k ± 0%   +949.60% (p=0.002 n=6)
ReclaimLargeJobs_100Node-4       511.2k ± 0%    7010.8k ± 0%  +1271.57% (p=0.002 n=6)
ReclaimLargeJobs_200Node-4       1.273M ± 0%    25.078M ± 0%  +1869.28% (p=0.002 n=6)
ReclaimLargeJobs_500Node-4       4.319M ± 0%   142.426M ± 0%  +3197.66% (p=0.002 n=6)
ReclaimLargeJobs_1000Node-4      12.54M ± 0%    602.97M ± 0%  +4708.26% (p=0.002 n=6)
geomean                          748.2k          14.03M       +1774.67%

pkg: github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions/reclaim
                                             │ main-bench.txt │            pr-bench.txt            │
                                             │     sec/op     │   sec/op     vs base               │
ReclaimUnschedulableDistributedJob_10Node-4       123.7m ± 1%   131.0m ± 1%   +5.92% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_50Node-4        7.239 ± 2%    3.645 ± 2%  -49.65% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_100Node-4       37.21 ± 2%    19.07 ± 2%  -48.74% (p=0.002 n=6)
ReclaimWithMissingPVCJobs-4                       2.024m ± 4%   2.211m ± 7%   +9.22% (p=0.004 n=6)
geomean                                           509.6m        376.7m       -26.08%

                                             │ main-bench.txt │            pr-bench.txt             │
                                             │      B/op      │     B/op      vs base               │
ReclaimUnschedulableDistributedJob_10Node-4      13.94Mi ± 5%   19.22Mi ± 3%  +37.91% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_50Node-4      3.439Gi ± 0%   1.792Gi ± 0%  -47.91% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_100Node-4    18.062Gi ± 0%   9.179Gi ± 0%  -49.18% (p=0.002 n=6)
ReclaimWithMissingPVCJobs-4                      8.102Ki ± 1%   9.258Ki ± 3%  +14.27% (p=0.002 n=6)
geomean                                          51.77Mi        41.61Mi       -19.63%

                                             │ main-bench.txt │            pr-bench.txt            │
                                             │   allocs/op    │  allocs/op   vs base               │
ReclaimUnschedulableDistributedJob_10Node-4       217.5k ± 4%   290.1k ± 3%  +33.36% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_50Node-4       98.88M ± 0%   50.41M ± 0%  -49.02% (p=0.002 n=6)
ReclaimUnschedulableDistributedJob_100Node-4      615.4M ± 0%   309.7M ± 0%  -49.68% (p=0.002 n=6)
ReclaimWithMissingPVCJobs-4                        153.5 ± 0%    172.5 ± 1%  +12.38% (p=0.002 n=6)
geomean                                           1.194M        940.1k       -21.26%

Legend

  • 📉 Negative delta = Performance improvement (faster)
  • 📈 Positive delta = Performance regression (slower)
  • p-value < 0.05 indicates statistically significant change
Raw benchmark data

PR branch:

goos: linux
goarch: amd64
pkg: github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions
cpu: AMD EPYC 9V74 80-Core Processor                
BenchmarkAllocateAction_SmallCluster-4         	      10	 106605310 ns/op	 2432460 B/op	   36032 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106549399 ns/op	 2428342 B/op	   36029 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106335054 ns/op	 2429380 B/op	   36035 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106547196 ns/op	 2432548 B/op	   36031 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106821545 ns/op	 2433419 B/op	   36025 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 107106708 ns/op	 2424701 B/op	   36035 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 123654175 ns/op	12544495 B/op	  302733 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124254645 ns/op	12540801 B/op	  302741 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 125145960 ns/op	12542398 B/op	  302754 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 125201387 ns/op	12539923 B/op	  302733 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124948358 ns/op	12544265 B/op	  302776 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124682115 ns/op	12541687 B/op	  302762 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 182758876 ns/op	41992238 B/op	 1266210 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 181537257 ns/op	41994092 B/op	 1266164 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 182601072 ns/op	41991540 B/op	 1266186 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 182688051 ns/op	41988214 B/op	 1266159 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 183103431 ns/op	41985478 B/op	 1266147 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 183629206 ns/op	41990449 B/op	 1266130 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103089791 ns/op	  977324 B/op	    8931 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103230377 ns/op	  974111 B/op	    8930 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103264857 ns/op	  974551 B/op	    8933 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103307553 ns/op	  978741 B/op	    8934 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103228966 ns/op	  979439 B/op	    8932 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103239215 ns/op	  974293 B/op	    8932 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 106792126 ns/op	 3254276 B/op	   28076 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105704744 ns/op	 3253471 B/op	   28075 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 106095246 ns/op	 3253407 B/op	   28075 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105943259 ns/op	 3254221 B/op	   28076 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105783588 ns/op	 3250159 B/op	   28074 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105666183 ns/op	 3249637 B/op	   28074 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103974266 ns/op	 1419882 B/op	   15201 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 104182534 ns/op	 1415890 B/op	   15199 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103946179 ns/op	 1415775 B/op	   15198 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 104427778 ns/op	 1422383 B/op	   15198 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 104305307 ns/op	 1411765 B/op	   15196 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 104212231 ns/op	 1419728 B/op	   15200 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 114691557 ns/op	 6249560 B/op	   54964 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 114514108 ns/op	 6250201 B/op	   54966 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 114594074 ns/op	 6249828 B/op	   54966 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 114757375 ns/op	 6249646 B/op	   54964 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 114611845 ns/op	 6245616 B/op	   54965 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	       9	 113937123 ns/op	 6249894 B/op	   54965 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	      10	 111701906 ns/op	 5901268 B/op	   71187 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	      10	 112389031 ns/op	 5912876 B/op	   71172 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	      10	 111611617 ns/op	 5912188 B/op	   71226 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	       9	 111680931 ns/op	 5913664 B/op	   71185 allocs/op

Main branch:

goos: linux
goarch: amd64
pkg: github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions
cpu: AMD EPYC 9V74 80-Core Processor                
BenchmarkAllocateAction_SmallCluster-4         	      10	 106211810 ns/op	 2425866 B/op	   35978 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106123711 ns/op	 2419893 B/op	   35968 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106566925 ns/op	 2434440 B/op	   35967 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106473804 ns/op	 2421967 B/op	   35963 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106321747 ns/op	 2430301 B/op	   35967 allocs/op
BenchmarkAllocateAction_SmallCluster-4         	      10	 106144782 ns/op	 2419864 B/op	   35968 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 125303241 ns/op	12530866 B/op	  302689 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124052930 ns/op	12532070 B/op	  302680 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124090644 ns/op	12537091 B/op	  302708 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124144951 ns/op	12530454 B/op	  302687 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 124427280 ns/op	12530738 B/op	  302710 allocs/op
BenchmarkAllocateAction_MediumCluster-4        	       9	 125046759 ns/op	12532076 B/op	  302708 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 181802599 ns/op	41997085 B/op	 1266181 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 180317057 ns/op	41966330 B/op	 1266108 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 181527279 ns/op	41967965 B/op	 1266082 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 181982380 ns/op	41973382 B/op	 1266113 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 183142889 ns/op	41974509 B/op	 1266147 allocs/op
BenchmarkAllocateAction_LargeCluster-4         	       6	 181629276 ns/op	41973806 B/op	 1266129 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103189452 ns/op	  970796 B/op	    8849 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103387251 ns/op	  971420 B/op	    8852 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103282390 ns/op	  967642 B/op	    8851 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103305001 ns/op	  971180 B/op	    8851 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103026458 ns/op	  967490 B/op	    8850 allocs/op
BenchmarkReclaimAction_SmallCluster-4          	      10	 103470012 ns/op	  963940 B/op	    8851 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 106028375 ns/op	 3243768 B/op	   27994 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105720694 ns/op	 3234356 B/op	   27992 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105639882 ns/op	 3238010 B/op	   27993 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105761485 ns/op	 3242429 B/op	   27994 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105811741 ns/op	 3237922 B/op	   27992 allocs/op
BenchmarkReclaimAction_MediumCluster-4         	      10	 105693933 ns/op	 3242397 B/op	   27995 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103796802 ns/op	 1227757 B/op	   12740 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103898918 ns/op	 1231933 B/op	   12743 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103695590 ns/op	 1219983 B/op	   12738 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103953858 ns/op	 1228712 B/op	   12743 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103707392 ns/op	 1232148 B/op	   12744 allocs/op
BenchmarkPreemptAction_SmallCluster-4          	      10	 103682856 ns/op	 1238092 B/op	   12742 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110703091 ns/op	 4957515 B/op	   44579 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110077379 ns/op	 4957550 B/op	   44579 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110202911 ns/op	 4957955 B/op	   44580 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110266070 ns/op	 4961342 B/op	   44581 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110723267 ns/op	 4961652 B/op	   44581 allocs/op
BenchmarkPreemptAction_MediumCluster-4         	      10	 110309971 ns/op	 4962190 B/op	   44584 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	       9	 119291943 ns/op	10881642 B/op	  134475 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	       9	 118999940 ns/op	10883249 B/op	  134502 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	       9	 119229476 ns/op	10881895 B/op	  134479 allocs/op
BenchmarkConsolidationAction_SmallCluster-4    	       9	 119930154 ns/op	10882047 B/op	  134490 allocs/op

@github-actions

Copy link
Copy Markdown

Total coverage: 50.9% -> 51.0% (delta 0.10%)

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions/common/solvers 46.08% (+3.58%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions/common/solvers/job_solver.go 13.04% (+13.04%) 115 (+2) 15 (+15) 100 (-13) 🎉

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/kai-scheduler/KAI-scheduler/pkg/scheduler/actions/common/solvers/job_solver_test.go

@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 30c4812 to 46b0b78 Compare June 22, 2026 20:51
@enoodle enoodle changed the base branch from main to erez/reclaim-generator-portfolio-09-benchmark-topology June 22, 2026 20:52
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 07c3812 to c14ea56 Compare June 23, 2026 08:59
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 46b0b78 to ca421bc Compare June 23, 2026 09:00
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from c14ea56 to 262ebaf Compare June 23, 2026 09:33
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from ca421bc to 224f622 Compare June 23, 2026 09:33
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 262ebaf to 91490d6 Compare June 23, 2026 10:01
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 224f622 to e2b530e Compare June 23, 2026 10:01
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 91490d6 to b197399 Compare June 23, 2026 10:15
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from e2b530e to 62da29a Compare June 23, 2026 10:15
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from b197399 to d266183 Compare June 23, 2026 10:46
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 62da29a to 76ed807 Compare June 23, 2026 10:46
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from d266183 to 4d54e8c Compare June 23, 2026 11:02
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 76ed807 to 99d1ea9 Compare June 23, 2026 11:02
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 4d54e8c to 03caf61 Compare June 23, 2026 11:53
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 99d1ea9 to ce84465 Compare June 23, 2026 11:53
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 03caf61 to 0d03317 Compare June 23, 2026 14:52
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from ce84465 to 7e8a682 Compare June 23, 2026 14:55
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 0d03317 to b3a3368 Compare June 23, 2026 15:17
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 7e8a682 to 3de597b Compare June 23, 2026 15:17
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from b3a3368 to 5e6c486 Compare June 23, 2026 17:06
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 3de597b to c9de803 Compare June 23, 2026 17:07
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 5e6c486 to 6808054 Compare June 23, 2026 18:38
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from c9de803 to 463df47 Compare June 23, 2026 18:38
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 6808054 to 1469386 Compare June 23, 2026 20:37
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 463df47 to 0a6b397 Compare June 23, 2026 20:37
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 1469386 to 7d3c6e9 Compare June 23, 2026 22:06
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 0a6b397 to 04394ea Compare June 23, 2026 22:07
maxSolvedK, searchResult := s.searchMaxSolvableK(
ssn, state, pendingJob, tasksToAllocate, jobBudget, availableGenerator, generatorBudget,
)
if maxSolvedK == 0 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why does it have to be equal to 0 instead of smaller then n-1? Why should we attempt to allocate all 3 pods if we cann't find a solution for 2?

@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 89dc5b0 to 0f3b34c Compare June 24, 2026 08:28
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 918290a to 87e08e0 Compare June 24, 2026 09:58
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 0f3b34c to 049404c Compare June 24, 2026 09:58
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 87e08e0 to db50765 Compare June 24, 2026 10:48
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 049404c to e0d19f9 Compare June 24, 2026 10:56
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch 2 times, most recently from bbce802 to 06678b1 Compare June 24, 2026 13:58
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from e0d19f9 to 9110fe5 Compare June 24, 2026 14:10
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from 06678b1 to d5e6ed3 Compare June 24, 2026 14:51
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 9110fe5 to 1c4ce47 Compare June 24, 2026 15:11
@enoodle enoodle force-pushed the erez/reclaim-generator-portfolio-09-benchmark-topology branch from d5e6ed3 to 79e14eb Compare June 25, 2026 10:32
enoodle added 2 commits June 25, 2026 12:32
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
@enoodle enoodle force-pushed the erez/job-solver-skip-redundant-full-probe branch from 1c4ce47 to 44d9149 Compare June 25, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants