Repository navigation
Placement: least_loaded and best_fit allocation strategies, typed properties cached per pass - #2805
Merged
Merged
Conversation
… the next action (cherry picked from commit 5198dabc100cd02ea2fef8592e0e788bfbe20235)
…d per pass (cherry picked from commit 70b110a98127b82710c53ff126b72a06367461de)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Two allocation strategies beside the LRU default.
least_loadedgives the next action to the worker with the most free room, so a worker that just joined an idle pool takes work instead of the busy veteran the LRU order picks.best_fitplaces an action on the worker whose room fits it most tightly, preferring a worker whosePriorityproperties match the action's, so a big worker's room is kept for big actions. Typed properties are now built once per pass and cached, rather than once per action per candidate.How was this verified?
placement_test.rs: a newcomer takes the next action underleast_loadedand the veteran under LRU;best_fitkeeps the big room for the big action and prefers the worker whose zone matches. On a test cluster withbest_fit, a mixed burst stopped landing small actions on the one large worker.Risk
Low. The default strategy is unchanged; the new variants are opt-in through
allocation_strategy. The cache is per pass and holds typed properties only.AI assistance
An agent drafted the change and I reviewed every line.
This change is