On Thu, 2021-01-21 at 08:19 +0100, Ulrich Windl wrote: > Hi! > > I have a question about utilization-based resource placement > (specifically: placement-strategy=balanced): > Assume you have two resource capacities (say A and B) on each node, > and each resource also has a utilization parameter for both. > Both nodes have enough capacity for a resource to be started. > Consider these cases for resource R: > 1) R needs A = B > 2) R needs A > B > 3) R needs A < B > > Maybe consider these cases for each node: > a) A = B > b) A > B > c) A < B > > Where would the resources be placed?
For computational efficiency, Pacemaker follows a very simple algorithm, described here: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#_allocation_details Basically, nodes and resources are sorted according to a weighting, nodes are assigned resources starting with the highest-weighted node first, and individual resources are placed starting with the highest- weighted resource first. That link describes the weighting. > (Obviously A and B are independent, so you can't say "How many A is > worth one B" (or vice versa) > > Then, given some placement, assume that node capacity for A or B > increases on a node. > How large has the stickiness parameter for the resource have to be to > prevent resource migration? That's tricky to deduce. The easiest approach is to copy a scheduler input from the cluster as it is, and experiment by modifying the stickiness and utilization values as desired and running crm_simulate. Everything boils down to each resource having a score on each node. That final score is the cumulative result of all sorts of effects, e.g. stickiness, the resource's own location preferences (constraint scores), a fraction of the location preferences of resources that are directly or indirectly colocated with this resource, etc., so it's not easy to say "changing this one value by X will have this effect". > Are there any tools to help understanding? Mainly crm_simulate > Note: For placement-strategy=utilization it's easier: As long as > there is sufficient capacity, distribute the resources on the node > that has least number of resources. > > Regards, > Ulrich -- Ken Gaillot <[email protected]> _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
