[Linux-HA] about the resource stickiness

Andrew Beekhof beekhof at gmail.com
Wed Oct 11 07:16:23 MDT 2006


On 10/11/06, TORRESANI, Roberto <roberto.torresani at unitn.it> wrote:
>
>
> >-----Original Message-----
> >These are the new "rules" that will take effect as of 2.0.8
> >(feedback welcome):
> >
> >* Collocation constraints are no longer bi-directional
> >* Collocation constraints have a numerical weight (between +/-
> >INFINITY) which is also used to implement weak collocation.
> >* If r1 is collocated with r2, then r2 is allocated first
> >* If r1 is collocated with r2 and r1.priority >= r2.priority, then
> >r1's node scores are adjusted according to the following formula:
> >   r1.score[node] += r2.score[node] * collocation.score / INFINITY
> >
> >(At the moment, everything except the score adjustment is implemented.)
> >
> >A group is therefore just a special case of this.  It's made up of a
> >number of resources and mandatory collocation constraints
> >(collocation.score == INFINITY), then it should come out as:
> >
> >   g1.score[node] = sum(resource[].score[node])
> >
> >Collocating (score=5000) r3 (score_nodeX=100, priority=10) with g1
> >(combined score_nodeX=200, priority=1) then at the point we allocate
> >the contents of g1:
> >
> >    g1.score[nodeX] = 200 + (100*5000)/10000
> >                             = 250
> >
> >Later, when we came to allocate r3
> >    r3.score[nodeX] = 100+5000
> >
> >If the priorities were reversed, then at the point we allocate the
> >contents of g1:
> >    r3.score[nodeX] = 200
>
>
> Hi Andrew, I've compiled the latest crm taken from
> http://hg.beekhof.net/lha/crm-stable, as I seen a bunch of work on the
> score calculation.
>
> Now, with a ptest run I obtain for ernesto (node where mysql + apache
> are colocated) a score of 1000000...How is it calculated?
> If you want I can send you the ptest log

if I have the input file I can do a lot more.

> ---
> About the new behaviour:
> What do you mean for "resource priority" ?

Resources can have priorities
http://www.linux-ha.org/v2/dtd1.0/annotated#head-2cf0ece2e4f8223ad5fdfc54a0d4debacf42a81a

when not all resources can be placed in the cluster we'll kick off the
lower priority ones to keep the more important ones running.

> Is the colocation score (5000) tunable?

Yes.  We've implemented weak colocation.
Any colocation score < INFINITY is preferred but not mandatory.

> Have the INFINITY changed value from 10000 to 1000000 ?

Oh, apparently its always been 1 million.  How odd.


More information about the Linux-HA mailing list