-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove allocations from randomChoice2 policy #9506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove allocations from randomChoice2 policy #9506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markusthoemmes: 0 warnings.
In response to this:
Proposed Changes
This is run as part of each request that has CC=0. Might as well make that as quick and cheap as we can.
benchmark old ns/op new ns/op delta BenchmarkPolicy/random-power-of-2-choice-1-trackers-sequential-16 50.4 10.1 -79.96% BenchmarkPolicy/random-power-of-2-choice-1-trackers-parallel-16 35.9 24.2 -32.59% BenchmarkPolicy/random-power-of-2-choice-2-trackers-sequential-16 34.8 9.84 -71.72% BenchmarkPolicy/random-power-of-2-choice-2-trackers-parallel-16 38.8 40.4 +4.12% BenchmarkPolicy/random-power-of-2-choice-3-trackers-sequential-16 63.1 34.9 -44.69% BenchmarkPolicy/random-power-of-2-choice-3-trackers-parallel-16 487 410 -15.81% BenchmarkPolicy/random-power-of-2-choice-10-trackers-sequential-16 70.2 40.4 -42.45% BenchmarkPolicy/random-power-of-2-choice-10-trackers-parallel-16 537 447 -16.76% BenchmarkPolicy/random-power-of-2-choice-100-trackers-sequential-16 69.1 39.2 -43.27% BenchmarkPolicy/random-power-of-2-choice-100-trackers-parallel-16 550 492 -10.55% benchmark old allocs new allocs delta BenchmarkPolicy/random-power-of-2-choice-1-trackers-sequential-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-1-trackers-parallel-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-2-trackers-sequential-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-2-trackers-parallel-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-3-trackers-sequential-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-3-trackers-parallel-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-10-trackers-sequential-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-10-trackers-parallel-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-100-trackers-sequential-16 1 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-100-trackers-parallel-16 1 0 -100.00% benchmark old bytes new bytes delta BenchmarkPolicy/random-power-of-2-choice-1-trackers-sequential-16 32 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-1-trackers-parallel-16 32 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-2-trackers-sequential-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-2-trackers-parallel-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-3-trackers-sequential-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-3-trackers-parallel-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-10-trackers-sequential-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-10-trackers-parallel-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-100-trackers-sequential-16 16 0 -100.00% BenchmarkPolicy/random-power-of-2-choice-100-trackers-parallel-16 16 0 -100.00%
Release Note
NONE
/assign @julz @vagababov
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Codecov Report
@@ Coverage Diff @@
## master #9506 +/- ##
==========================================
+ Coverage 88.60% 88.62% +0.01%
==========================================
Files 209 210 +1
Lines 9374 9370 -4
==========================================
- Hits 8306 8304 -2
+ Misses 813 811 -2
Partials 255 255
Continue to review full report at Codecov.
|
pkg/activator/net/throttler.go
Outdated
} | ||
|
||
func (p *podTracker) addWeight(w int32) { | ||
p.weight.Add(w) | ||
func (p *podTracker) increaseWeight() func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im sort of wondering if we actually need the increaseWeight()
function to return a callback here, because it sort of confused me on first pass why an increaseWeight function is returning a decreaseWeight method. What if this function didn't return anything and randomChoice2 just did pick.increaseWeight(); return pick.decreaseWeight, pick
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ehr, true! Artifact of playing with different versions I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: julz, markusthoemmes 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:
Approvers can indicate their approval by writing |
The following is the coverage report on the affected files.
|
* Remove allocations from randomChoice2 policy * Less callback shenanigans
Proposed Changes
This is run as part of each request that has CC=0. Might as well make that as quick and cheap as we can.
Release Note
/assign @julz @vagababov