Closed codefromthecrypt closed 11 months ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: codefromthecrypt, sanposhiho
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
The pod being scheduled is a parameter to all Scheduler framework callbacks. Passing this for each callback has overhead, because the main communication channel in wasm is its memory. The host must marshal the pod to proto and copy to to the guest's memory. Much more expensive is having the guest de-marshal it.
For example, a simple filter that unmarshals the pod takes roughly 65us. Every callback that uses pod metadata would cost something similar, possibly 4 or more times.
This change makes overhead more visible by having benchmarks access all parameters.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
This change is missing tests and RATIONALE. I'm raising it for early review in case the approach isn't accepted.
Does this PR introduce a user-facing change?
NONE
What are the benchmark results of this change?
Below you can see higher overhead than if we only use our examples, because more data is in use.
This makes any future optimizations visible, as we know what the base case is when all parameters are evaluated.