[ClusterLabs] Q: utilization, stickiness and resource placement
kgaillot at redhat.com
Thu Jan 21 11:24:18 EST 2021
On Thu, 2021-01-21 at 08:19 +0100, Ulrich Windl wrote:
> 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:
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?
> 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.
Ken Gaillot <kgaillot at redhat.com>
More information about the Users