-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add RoundRobinServerSelector
to speed up segment assignments
#13367
Conversation
Is there a specific reason to not try using |
@rohangarg , This is because even within a tier, the list of eligible servers given as input to the I have not validated this behaviour though, it might be interesting to see if we get a similar behaviour with random strategy as we would with round-robin. Let me know what you think. |
I think with respect to uniform distribution, even the round-robin allocation might create holes in servers since it also skips them incase a segment is already scheduled on the server. |
Yeah, I thought of making round-robin a balancer strategy but then decided against it as balancing is the one thing it would not be used for. Balancing with round-robin would again cause issues similar to the ones I believe
I don't think
I agree, round-robin would also create holes but these would be filled in the next round itself. After any number of rounds, this would be expected to have a near uniform distribution.
But it would be best to validate this hypothesis 🙂. I will write out some simulation tests and share the results here. |
I'm not sure how would we balance in round-robin strategy out of the box without a cost function. I thought it would be like |
@rohangarg , I ran some simulation tests with 10 historicals of equal disk capacity.
I have also included the Even with random, the error rate reduces with a larger number of segments. |
Description
Segment assignments can take very long due to the strategy cost computation for a large number of segments.
This PR addresses the issue by making the segment assignments round-robin within a tier.
Only segment balancing takes cost-based decisions to move segments around.
Changes
useRoundRobinSegmentAssignment
with default value falseRoundRobinServerSelector
. This does not implement theBalancerStrategy
as it does not conform to that contract and may also be used in conjunction with a
strategy (round-robin for
RunRules
and strategy forBalanceSegments
)LoadRuleTest
to test segment loading using both regular balancer strategyand round-robin
Changes not in this PR
Web-console change
Release note
Add a round-robin segment strategy to speed up initial segment assignments.
Set
useRoundRobinSegmentAssigment
totrue
in the coordinator dynamic config to enable this feature.This PR has: