commit 23219664564d1b5a7ba02bbf8309ec699ab7a4cb
Author: Kota Tsuyuzaki <email address hidden>
Date: Fri Jun 30 02:03:48 2017 -0700
Accept a trade off of dispersion for balance
... but only if we *have* to!
During the initial gather for balance we prefer to avoid replicas on
over-weight devices that are already under-represented in any of it's
tiers (i.e. if a zone has to have at least one, but may have as many of
two, don't take the only replica). Instead we hope by going for
replicas on over-weight devices that are at the limits of their
dispersion we might have a better than even chance we find a better
place for them during placement!
This normally works on out - and especially so for rings which can
disperse and balance. But for existing rings where we'd have to
sacrifice dispersion to improve balance the existing optimistic gather
will end up refusing to trade dispersion for balance - and instead get
stuck without solving either!
You should always be able to solve for *either* dispersion or balance.
But if you can't solve *both* - we bail out on our optimistic gather
much more quickly and instead just focus on improving balance. With
this change, the ring can get into balanced (and un-dispersed) states
much more quickly!
Reviewed: https:/ /review. openstack. org/503152 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=23219664564 d1b5a7ba02bbf83 09ec699ab7a4cb
Committed: https:/
Submitter: Jenkins
Branch: master
commit 23219664564d1b5 a7ba02bbf8309ec 699ab7a4cb
Author: Kota Tsuyuzaki <email address hidden>
Date: Fri Jun 30 02:03:48 2017 -0700
Accept a trade off of dispersion for balance
... but only if we *have* to!
During the initial gather for balance we prefer to avoid replicas on
over-weight devices that are already under-represented in any of it's
tiers (i.e. if a zone has to have at least one, but may have as many of
two, don't take the only replica). Instead we hope by going for
replicas on over-weight devices that are at the limits of their
dispersion we might have a better than even chance we find a better
place for them during placement!
This normally works on out - and especially so for rings which can
disperse and balance. But for existing rings where we'd have to
sacrifice dispersion to improve balance the existing optimistic gather
will end up refusing to trade dispersion for balance - and instead get
stuck without solving either!
You should always be able to solve for *either* dispersion or balance.
But if you can't solve *both* - we bail out on our optimistic gather
much more quickly and instead just focus on improving balance. With
this change, the ring can get into balanced (and un-dispersed) states
much more quickly!
Change-Id: I17ac627f94f642 11afaccad15596a 9fcab2fada2 Change- Id: Ie6e2d116b65938 edac29efa6171e2 470bb3e8e12
Related-
Closes-Bug: 1699636
Closes-Bug: 1701472