perf: hot schedulers#4451
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Benchmark resultsCompared against |
| f.uniqueSlots = refs | ||
| f.actionSlotRefs = refs | ||
| if f.uniqueSlots > 0 { | ||
| f.fanout = float64(f.actionSlotRefs) / float64(f.uniqueSlots) |
There was a problem hiding this comment.
is this not trivially going to be 1.0 since we're dividing refs by itself?
There was a problem hiding this comment.
lol yes, artifact of the test written on main's code which would not have been 1.
There was a problem hiding this comment.
do these tests fail on main?
There was a problem hiding this comment.
i wrote them before making any changes but they require changes on this branch which is bad
There was a problem hiding this comment.
I'm not sure I follow? I just ran these tests on main and they all passed, so I'm not convinced they're either 1) not flaky or 2) actually testing anything - I imagine these are supposed to be a regression test?
Description
Reworks the v1 scheduler so slot capacity lives in per-worker pools instead of being copied into each action, cutting assignment/replenish overhead on large worker sets. Also fixes unused-slot accounting so expiry cannot make selection skip valid capacity.
Type of change
What's Changed
slotPoolkeyed by worker + slot type; actions keep a thin worker-id indexactive()selection (do not hard-gate onunusedCount, which can drift on expiry)unusedChecklist
Changes have been:
Testing
go test ./pkg/scheduling/v1/ -count=1🤖 AI Disclosure
I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
Details: Used cursor throughout investigation and writing the pr