kubernetes-sigs / kube-scheduler-wasm-extension

All the things to make the scheduler extendable with wasm.
Apache License 2.0
110 stars 22 forks source link

Improve benchmark performance of nodenumber wasm plugin #127

Closed jgiannuzzi closed 2 weeks ago

jgiannuzzi commented 2 weeks ago

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The nodenumber WASM plugin used in the scheduler_perf benchmark doesn't use advanced techniques like the custom GC and advertising only the implemented endpoints. By adopting these techniques and rebuilding the WASM module, the benchmark suggests that the WASM plugin performance is between the native code and the extender, whilst it was slower than the extender before this change.

Which issue(s) this PR fixes:

Special notes for your reviewer:

I have also changed the location of the WASM module in the AllEnabled profile, as it was pointing to the nodenumber example rather than the one we build for the benchmark.

Does this PR introduce a user-facing change?

NONE

What are the benchmark results of this change?

N/A

Running the scheduler_perf benchmark 3 times on the same machine and taking the average of the results for scheduling 10000 pods, this results in a ~10% increase, going from 750 pods/s to 833 pods/s.

k8s-ci-robot commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgiannuzzi, sanposhiho

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/main/OWNERS)~~ [sanposhiho] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment