Skip to content

VPA: Refactor benchmark into pkg and add recommender/admission scraping#9449

Open
maxcao13 wants to merge 1 commit intokubernetes:masterfrom
maxcao13:recommender-admission-benchmark
Open

VPA: Refactor benchmark into pkg and add recommender/admission scraping#9449
maxcao13 wants to merge 1 commit intokubernetes:masterfrom
maxcao13:recommender-admission-benchmark

Conversation

@maxcao13
Copy link
Copy Markdown
Member

@maxcao13 maxcao13 commented Apr 2, 2026

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This PR adds benchmarking step latencies for the VPA recommender and the admission controller.

For the recommender, the benchmark scrapes metrics right after waiting for all VPA recommendations to get filled in the benchmark flow.
For the admission-controller, it scrapes during the same time as the updater does its work. So the requests the controller receives will be equal to the number of pods getting recreated during the updater loop.

As an addition, this PR splits a lot of the code from the main.go into separate packages for better organization of the benchmark codebase.

Which issue(s) this PR fixes:

Fixes #9443

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Apr 2, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: maxcao13
Once this PR has been reviewed and has the lgtm label, please assign kwiesmueller for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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 area/vertical-pod-autoscaler size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed do-not-merge/needs-area labels Apr 2, 2026
@maxcao13 maxcao13 force-pushed the recommender-admission-benchmark branch 2 times, most recently from d2f822d to 639e668 Compare April 2, 2026 01:59
@maxcao13
Copy link
Copy Markdown
Member Author

maxcao13 commented Apr 2, 2026

This is a full run output:

# ...step 1,2,3 omitted
=== Step 4: Build and run benchmark ===
  Building vpa-benchmark...
  Running benchmark...
I0401 17:57:56.472232  693413 main.go:95] === VPA Benchmark with KWOK ===
I0401 17:57:56.472278  693413 main.go:96] Profiles: [small large xxlarge], Runs per profile: 1
I0401 17:57:56.479647  693413 main.go:113] ========== Profile: small (25 VPAs) ==========
I0401 17:57:56.479666  693413 main.go:161] Scaling down VPA components...
I0401 17:58:02.504295  693413 main.go:168] Deleting all VPA checkpoints...
I0401 17:58:05.544119  693413 cluster.go:112] > Deleted 1000 VPA checkpoints
I0401 17:58:05.544144  693413 main.go:171] Cleaning up existing benchmark resources...
I0401 17:58:05.550271  693413 main.go:174] Creating 25 ReplicaSets (2 pods each, 50 total)...
I0401 17:58:05.558459  693413 main.go:185] Creating 25 VPAs...
I0401 17:58:05.674826  693413 main.go:191] Waiting for 50 KWOK pods to be running (50 managed + 0 noise)...
I0401 17:58:05.684396  693413 main.go:197] > Pods: 50/50
I0401 17:58:05.684528  693413 main.go:204] Scaling up recommender and admission controller...
I0401 17:58:09.709867  693413 main.go:211] Waiting for VPA recommendations...
I0401 17:58:09.711815  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:14.717604  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:19.717742  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:24.718017  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:29.717062  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:34.716822  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:39.716226  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:44.714786  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:49.718161  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:54.713186  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:58:59.716576  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:59:04.717579  693413 main.go:220] > VPAs with recommendations: 0/25
I0401 17:59:09.718265  693413 main.go:220] > VPAs with recommendations: 25/25
I0401 17:59:09.718287  693413 main.go:226] Scraping recommender metrics...
I0401 17:59:09.738337  693413 main.go:234] Scaling up updater...
I0401 17:59:11.746866  693413 main.go:239] Scraping updater metrics...
I0401 17:59:11.765890  693413 component.go:226] > Waiting for updater metrics. Elapsed: 0.00s
I0401 17:59:21.766994  693413 component.go:226] > Waiting for updater metrics. Elapsed: 10.01s
I0401 17:59:31.766509  693413 component.go:226] > Waiting for updater metrics. Elapsed: 20.00s
I0401 17:59:41.765485  693413 component.go:226] > Waiting for updater metrics. Elapsed: 30.00s
I0401 17:59:51.765649  693413 component.go:226] > Waiting for updater metrics. Elapsed: 40.00s
I0401 18:00:01.764988  693413 component.go:226] > Waiting for updater metrics. Elapsed: 50.00s
I0401 18:00:11.765017  693413 component.go:226] > Waiting for updater metrics. Elapsed: 60.00s
I0401 18:00:21.764616  693413 component.go:226] > Waiting for updater metrics. Elapsed: 70.00s
I0401 18:00:31.765950  693413 component.go:226] > Waiting for updater metrics. Elapsed: 80.00s
I0401 18:00:41.764604  693413 component.go:226] > Waiting for updater metrics. Elapsed: 90.00s
I0401 18:00:51.765334  693413 component.go:226] > Waiting for updater metrics. Elapsed: 100.00s
I0401 18:01:01.764780  693413 component.go:226] > Waiting for updater metrics. Elapsed: 110.00s
I0401 18:01:11.764312  693413 component.go:226] > Waiting for updater metrics. Elapsed: 120.00s
I0401 18:01:21.766045  693413 main.go:247] Scraping admission controller metrics...
I0401 18:01:21.787749  693413 main.go:113] ========== Profile: large (250 VPAs) ==========
I0401 18:01:21.787764  693413 main.go:161] Scaling down VPA components...
I0401 18:01:27.810520  693413 main.go:168] Deleting all VPA checkpoints...
I0401 18:01:27.909644  693413 cluster.go:112] > Deleted 25 VPA checkpoints
I0401 18:01:27.909667  693413 main.go:171] Cleaning up existing benchmark resources...
I0401 18:01:29.059123  693413 main.go:174] Creating 250 ReplicaSets (2 pods each, 500 total)...
I0401 18:01:29.207677  693413 main.go:185] Creating 250 VPAs...
I0401 18:01:34.378070  693413 main.go:191] Waiting for 500 KWOK pods to be running (500 managed + 0 noise)...
I0401 18:01:34.404572  693413 main.go:197] > Pods: 477/500
I0401 18:01:36.396081  693413 main.go:197] > Pods: 500/500
I0401 18:01:36.396106  693413 main.go:204] Scaling up recommender and admission controller...
I0401 18:01:40.414152  693413 main.go:211] Waiting for VPA recommendations...
I0401 18:01:40.423663  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:01:45.426931  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:01:50.429333  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:01:55.427330  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:00.425844  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:05.429309  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:10.430916  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:15.427173  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:20.428612  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:25.427403  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:30.428934  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:35.432174  693413 main.go:220] > VPAs with recommendations: 0/250
I0401 18:02:40.433782  693413 main.go:220] > VPAs with recommendations: 250/250
I0401 18:02:40.433808  693413 main.go:226] Scraping recommender metrics...
I0401 18:02:40.451202  693413 component.go:226] > Waiting for recommender metrics. Elapsed: 0.00s
I0401 18:02:50.454896  693413 main.go:234] Scaling up updater...
I0401 18:02:52.465274  693413 main.go:239] Scraping updater metrics...
I0401 18:02:52.483276  693413 component.go:226] > Waiting for updater metrics. Elapsed: 0.00s
I0401 18:03:02.483429  693413 component.go:226] > Waiting for updater metrics. Elapsed: 10.00s
I0401 18:03:12.483170  693413 component.go:226] > Waiting for updater metrics. Elapsed: 20.00s
I0401 18:03:22.482499  693413 component.go:226] > Waiting for updater metrics. Elapsed: 30.00s
I0401 18:03:32.482095  693413 component.go:226] > Waiting for updater metrics. Elapsed: 40.00s
I0401 18:03:42.483459  693413 component.go:226] > Waiting for updater metrics. Elapsed: 50.00s
I0401 18:03:52.480866  693413 component.go:226] > Waiting for updater metrics. Elapsed: 60.00s
I0401 18:04:02.482519  693413 component.go:226] > Waiting for updater metrics. Elapsed: 70.00s
I0401 18:04:12.481989  693413 component.go:226] > Waiting for updater metrics. Elapsed: 80.00s
I0401 18:04:22.481051  693413 component.go:226] > Waiting for updater metrics. Elapsed: 90.00s
I0401 18:04:32.481769  693413 component.go:226] > Waiting for updater metrics. Elapsed: 100.00s
I0401 18:04:42.481508  693413 component.go:226] > Waiting for updater metrics. Elapsed: 110.00s
I0401 18:04:52.482342  693413 component.go:226] > Waiting for updater metrics. Elapsed: 120.00s
I0401 18:05:02.481998  693413 component.go:226] > Waiting for updater metrics. Elapsed: 130.00s
I0401 18:05:12.481288  693413 component.go:226] > Waiting for updater metrics. Elapsed: 140.00s
I0401 18:05:22.482888  693413 main.go:247] Scraping admission controller metrics...
I0401 18:05:22.504815  693413 main.go:113] ========== Profile: xxlarge (1000 VPAs) ==========
I0401 18:05:22.504831  693413 main.go:161] Scaling down VPA components...
I0401 18:05:28.530099  693413 main.go:168] Deleting all VPA checkpoints...
I0401 18:05:29.192400  693413 cluster.go:112] > Deleted 250 VPA checkpoints
I0401 18:05:29.192416  693413 main.go:171] Cleaning up existing benchmark resources...
I0401 18:05:31.712069  693413 main.go:174] Creating 1000 ReplicaSets (2 pods each, 2000 total)...
I0401 18:05:34.717598  693413 main.go:185] Creating 1000 VPAs...
I0401 18:05:40.001958  693413 main.go:191] Waiting for 2000 KWOK pods to be running (2000 managed + 0 noise)...
I0401 18:05:40.056695  693413 main.go:197] > Pods: 2000/2000
I0401 18:05:40.056728  693413 main.go:204] Scaling up recommender and admission controller...
I0401 18:05:44.075003  693413 main.go:211] Waiting for VPA recommendations...
I0401 18:05:44.101221  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:05:49.103774  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:05:54.105306  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:05:59.104323  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:04.106115  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:09.105621  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:14.107605  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:19.103209  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:24.107145  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:29.109200  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:34.109294  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:39.105567  693413 main.go:220] > VPAs with recommendations: 0/1000
I0401 18:06:44.117074  693413 main.go:220] > VPAs with recommendations: 454/1000
I0401 18:06:49.133042  693413 main.go:220] > VPAs with recommendations: 954/1000
I0401 18:06:54.129588  693413 main.go:220] > VPAs with recommendations: 1000/1000
I0401 18:06:54.129621  693413 main.go:226] Scraping recommender metrics...
I0401 18:06:54.148937  693413 component.go:226] > Waiting for recommender metrics. Elapsed: 0.00s
I0401 18:07:04.148464  693413 component.go:226] > Waiting for recommender metrics. Elapsed: 10.00s
I0401 18:07:14.152387  693413 main.go:234] Scaling up updater...
I0401 18:07:16.161748  693413 main.go:239] Scraping updater metrics...
I0401 18:07:16.180383  693413 component.go:226] > Waiting for updater metrics. Elapsed: 0.00s
I0401 18:07:26.180388  693413 component.go:226] > Waiting for updater metrics. Elapsed: 10.00s
I0401 18:07:36.180733  693413 component.go:226] > Waiting for updater metrics. Elapsed: 20.00s
I0401 18:07:46.178987  693413 component.go:226] > Waiting for updater metrics. Elapsed: 30.00s
I0401 18:07:56.179134  693413 component.go:226] > Waiting for updater metrics. Elapsed: 40.00s
I0401 18:08:06.180152  693413 component.go:226] > Waiting for updater metrics. Elapsed: 50.00s
I0401 18:08:16.180606  693413 component.go:226] > Waiting for updater metrics. Elapsed: 60.00s
I0401 18:08:26.180484  693413 component.go:226] > Waiting for updater metrics. Elapsed: 70.00s
I0401 18:08:36.180394  693413 component.go:226] > Waiting for updater metrics. Elapsed: 80.00s
I0401 18:08:46.179093  693413 component.go:226] > Waiting for updater metrics. Elapsed: 90.00s
I0401 18:08:56.179228  693413 component.go:226] > Waiting for updater metrics. Elapsed: 100.00s
I0401 18:09:06.178832  693413 component.go:226] > Waiting for updater metrics. Elapsed: 110.00s
I0401 18:09:16.179353  693413 component.go:226] > Waiting for updater metrics. Elapsed: 120.00s
I0401 18:09:26.178805  693413 component.go:226] > Waiting for updater metrics. Elapsed: 130.00s
I0401 18:09:36.180604  693413 component.go:226] > Waiting for updater metrics. Elapsed: 140.00s
I0401 18:09:46.179378  693413 component.go:226] > Waiting for updater metrics. Elapsed: 150.00s
I0401 18:09:56.181446  693413 component.go:226] > Waiting for updater metrics. Elapsed: 160.01s
I0401 18:10:06.181031  693413 component.go:226] > Waiting for updater metrics. Elapsed: 170.00s
I0401 18:10:16.180386  693413 component.go:226] > Waiting for updater metrics. Elapsed: 180.00s
I0401 18:10:26.182744  693413 component.go:226] > Waiting for updater metrics. Elapsed: 190.01s
I0401 18:10:36.183855  693413 component.go:226] > Waiting for updater metrics. Elapsed: 200.01s
I0401 18:10:46.184167  693413 component.go:226] > Waiting for updater metrics. Elapsed: 210.01s
I0401 18:10:56.183995  693413 main.go:247] Scraping admission controller metrics...
I0401 18:10:56.204444  693413 main.go:141] Final cleanup...

========== small: All Runs [Recommender] ==========
┌─────────────────────┬─────────┬─────────┐
│        STEP         │  RUN 1  │   AVG   │
├─────────────────────┼─────────┼─────────┤
│ GarbageCollect      │ 0.0001s │ 0.0001s │
│ LoadMetrics         │ 0.0031s │ 0.0031s │
│ LoadPods            │ 0.0007s │ 0.0007s │
│ LoadVPAs            │ 0.0005s │ 0.0005s │
│ MaintainCheckpoints │ 0.0174s │ 0.0174s │
│ UpdateVPAs          │ 0.0142s │ 0.0142s │
│ loop_count          │ 1       │ 1       │
│ total               │ 0.0361s │ 0.0361s │
└─────────────────────┴─────────┴─────────┘

========== small: All Runs [Updater] ==========
┌───────────────┬─────────┬─────────┐
│     STEP      │  RUN 1  │   AVG   │
├───────────────┼─────────┼─────────┤
│ AdmissionInit │ 0.0000s │ 0.0000s │
│ EvictPods     │ 2.3205s │ 2.3205s │
│ FilterPods    │ 0.0001s │ 0.0001s │
│ ListPods      │ 0.0001s │ 0.0001s │
│ ListVPAs      │ 0.0021s │ 0.0021s │
│ loop_count    │ 1       │ 1       │
│ total         │ 2.3229s │ 2.3229s │
└───────────────┴─────────┴─────────┘

========== small: All Runs [Admission Controller] ==========
┌────────────────┬─────────┬─────────┐
│      STEP      │  RUN 1  │   AVG   │
├────────────────┼─────────┼─────────┤
│ admit          │ 0.0004s │ 0.0004s │
│ build_response │ 0.0000s │ 0.0000s │
│ read_request   │ 0.0000s │ 0.0000s │
│ request_count  │ 26      │ 26      │
│ total          │ 0.0005s │ 0.0005s │
│ write_response │ 0.0000s │ 0.0000s │
└────────────────┴─────────┴─────────┘

========== large: All Runs [Recommender] ==========
┌─────────────────────┬─────────┬─────────┐
│        STEP         │  RUN 1  │   AVG   │
├─────────────────────┼─────────┼─────────┤
│ GarbageCollect      │ 0.0055s │ 0.0055s │
│ LoadMetrics         │ 0.0055s │ 0.0055s │
│ LoadPods            │ 0.0138s │ 0.0138s │
│ LoadVPAs            │ 0.0022s │ 0.0022s │
│ MaintainCheckpoints │ 3.0046s │ 3.0046s │
│ UpdateVPAs          │ 0.5050s │ 0.5050s │
│ loop_count          │ 1       │ 1       │
│ total               │ 3.5367s │ 3.5367s │
└─────────────────────┴─────────┴─────────┘

========== large: All Runs [Updater] ==========
┌───────────────┬──────────┬──────────┐
│     STEP      │  RUN 1   │   AVG    │
├───────────────┼──────────┼──────────┤
│ AdmissionInit │ 0.0001s  │ 0.0001s  │
│ EvictPods     │ 24.5523s │ 24.5523s │
│ FilterPods    │ 0.0016s  │ 0.0016s  │
│ ListPods      │ 0.0004s  │ 0.0004s  │
│ ListVPAs      │ 0.0020s  │ 0.0020s  │
│ loop_count    │ 1        │ 1        │
│ total         │ 24.5565s │ 24.5565s │
└───────────────┴──────────┴──────────┘

========== large: All Runs [Admission Controller] ==========
┌────────────────┬─────────┬─────────┐
│      STEP      │  RUN 1  │   AVG   │
├────────────────┼─────────┼─────────┤
│ admit          │ 0.0005s │ 0.0005s │
│ build_response │ 0.0000s │ 0.0000s │
│ read_request   │ 0.0000s │ 0.0000s │
│ request_count  │ 251     │ 251     │
│ total          │ 0.0005s │ 0.0005s │
│ write_response │ 0.0000s │ 0.0000s │
└────────────────┴─────────┴─────────┘

========== xxlarge: All Runs [Recommender] ==========
┌─────────────────────┬──────────┬──────────┐
│        STEP         │  RUN 1   │   AVG    │
├─────────────────────┼──────────┼──────────┤
│ GarbageCollect      │ 0.0426s  │ 0.0426s  │
│ LoadMetrics         │ 0.0036s  │ 0.0036s  │
│ LoadPods            │ 0.1869s  │ 0.1869s  │
│ LoadVPAs            │ 0.0099s  │ 0.0099s  │
│ MaintainCheckpoints │ 18.0054s │ 18.0054s │
│ UpdateVPAs          │ 8.0046s  │ 8.0046s  │
│ loop_count          │ 1        │ 1        │
│ total               │ 26.2529s │ 26.2529s │
└─────────────────────┴──────────┴──────────┘

========== xxlarge: All Runs [Updater] ==========
┌───────────────┬──────────┬──────────┐
│     STEP      │  RUN 1   │   AVG    │
├───────────────┼──────────┼──────────┤
│ AdmissionInit │ 0.0003s  │ 0.0003s  │
│ EvictPods     │ 98.5502s │ 98.5502s │
│ FilterPods    │ 0.0242s  │ 0.0242s  │
│ ListPods      │ 0.0022s  │ 0.0022s  │
│ ListVPAs      │ 0.0023s  │ 0.0023s  │
│ loop_count    │ 1        │ 1        │
│ total         │ 98.5792s │ 98.5792s │
└───────────────┴──────────┴──────────┘

========== xxlarge: All Runs [Admission Controller] ==========
┌────────────────┬─────────┬─────────┐
│      STEP      │  RUN 1  │   AVG   │
├────────────────┼─────────┼─────────┤
│ admit          │ 0.0007s │ 0.0007s │
│ build_response │ 0.0000s │ 0.0000s │
│ read_request   │ 0.0000s │ 0.0000s │
│ request_count  │ 1001    │ 1001    │
│ total          │ 0.0007s │ 0.0007s │
│ write_response │ 0.0000s │ 0.0000s │
└────────────────┴─────────┴─────────┘

========== Results [Recommender] ==========
┌─────────────────────┬───────────────┬────────────────┬───────────────────┐
│        STEP         │ SMALL  ( 25 ) │ LARGE  ( 250 ) │ XXLARGE  ( 1000 ) │
├─────────────────────┼───────────────┼────────────────┼───────────────────┤
│ GarbageCollect      │ 0.0001s       │ 0.0055s        │ 0.0426s           │
│ LoadMetrics         │ 0.0031s       │ 0.0055s        │ 0.0036s           │
│ LoadPods            │ 0.0007s       │ 0.0138s        │ 0.1869s           │
│ LoadVPAs            │ 0.0005s       │ 0.0022s        │ 0.0099s           │
│ MaintainCheckpoints │ 0.0174s       │ 3.0046s        │ 18.0054s          │
│ UpdateVPAs          │ 0.0142s       │ 0.5050s        │ 8.0046s           │
│ loop_count          │ 1             │ 1              │ 1                 │
│ total               │ 0.0361s       │ 3.5367s        │ 26.2529s          │
└─────────────────────┴───────────────┴────────────────┴───────────────────┘

========== Results [Updater] ==========
┌───────────────┬───────────────┬────────────────┬───────────────────┐
│     STEP      │ SMALL  ( 25 ) │ LARGE  ( 250 ) │ XXLARGE  ( 1000 ) │
├───────────────┼───────────────┼────────────────┼───────────────────┤
│ AdmissionInit │ 0.0000s       │ 0.0001s        │ 0.0003s           │
│ EvictPods     │ 2.3205s       │ 24.5523s       │ 98.5502s          │
│ FilterPods    │ 0.0001s       │ 0.0016s        │ 0.0242s           │
│ ListPods      │ 0.0001s       │ 0.0004s        │ 0.0022s           │
│ ListVPAs      │ 0.0021s       │ 0.0020s        │ 0.0023s           │
│ loop_count    │ 1             │ 1              │ 1                 │
│ total         │ 2.3229s       │ 24.5565s       │ 98.5792s          │
└───────────────┴───────────────┴────────────────┴───────────────────┘

========== Results [Admission Controller] ==========
┌────────────────┬───────────────┬────────────────┬───────────────────┐
│      STEP      │ SMALL  ( 25 ) │ LARGE  ( 250 ) │ XXLARGE  ( 1000 ) │
├────────────────┼───────────────┼────────────────┼───────────────────┤
│ admit          │ 0.0004s       │ 0.0005s        │ 0.0007s           │
│ build_response │ 0.0000s       │ 0.0000s        │ 0.0000s           │
│ read_request   │ 0.0000s       │ 0.0000s        │ 0.0000s           │
│ request_count  │ 26            │ 251            │ 1001              │
│ total          │ 0.0005s       │ 0.0005s        │ 0.0007s           │
│ write_response │ 0.0000s       │ 0.0000s        │ 0.0000s           │
└────────────────┴───────────────┴────────────────┴───────────────────┘

Results written to results.csv (CSV format)
I0401 18:11:05.047819  693413 main.go:150] Benchmark completed successfully.

@adrianmoisey
Copy link
Copy Markdown
Member

Kubernetes e2e suite: [It] [sig-autoscaling] [VPA] [full-vpa] [v1] Pods under VPA with CPUStartupBoost have CPU startup boost recommendation applied to a subset of containers in a pod [FeatureGate:CPUStartupBoost] [Alpha] [Feature:OffByDefault] expand_less | 15m33s

{ failed [FAILED] Unexpected error: <*errors.errorString | 0x2dda6acda5b0>: error waiting for cpu request in range of ({{180 -3} {} 180m DecimalSI},{{220 -3} {} 220m DecimalSI}) for pods: {TypeMeta:{Kind: APIVersion:} LabelSelector:name=hamster FieldSelector: Watch:false AllowWatchBookmarks:false ResourceVersion: ResourceVersionMatch: TimeoutSeconds: Limit:0 Continue: SendInitialEvents:} { s: "error waiting for cpu request in range of ({{180 -3} {} 180m DecimalSI},{{220 -3} {} 220m DecimalSI}) for pods: {TypeMeta:{Kind: APIVersion:} LabelSelector:name=hamster FieldSelector: Watch:false AllowWatchBookmarks:false ResourceVersion: ResourceVersionMatch: TimeoutSeconds: Limit:0 Continue: SendInitialEvents:}", } occurred In [It] at: /home/prow/go/src/k8s.io/autoscaler/vertical-pod-autoscaler/e2e/v1/full_vpa.go:461 @ 04/02/26 02:27:16.006 }

/retest

@adrianmoisey
Copy link
Copy Markdown
Member

(the linting error is my fault and I fixed it in another PR)

@maxcao13
Copy link
Copy Markdown
Member Author

maxcao13 commented Apr 2, 2026

(the linting error is my fault and I fixed it in another PR)

I don't know how to retest github actions things, so I'll just wait until inevitable someone has a review change, and then it will re-run anyways :-)

…etrics

Split monolithic main.go into focused packages:
- pkg/cluster: Kubernetes resource management, profiles, constants
- pkg/component: VPA component lifecycle
- pkg/results: Output formatting, averaging, CSV export

Key changes:
- Component is now an object-oriented type holding shared kubeClient/restConfig
- Benchmark scrapes all three VPA components latency steps

Implements kubernetes#9443

Signed-off-by: Max Cao <macao@redhat.com>
@maxcao13 maxcao13 force-pushed the recommender-admission-benchmark branch from 639e668 to 505a3aa Compare April 3, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPA: Add benchmarking for recommender + admission-controller

3 participants