[Pacemaker] A question and demand to a resource placement strategy function

Gao,Yan ygao at novell.com
Fri Aug 26 06:34:53 EDT 2011


On 08/24/11 17:38, Vladislav Bogdanov wrote:
> 23.08.2011 12:19, Gao,Yan wrote:
> [snip]
>> When allocating every resource, we compare the capacity of the nodes.
>> The node has more remaining capacity is preferred. This would be quite
>> clear if we only define one kind of "capacity". While if we define
>> multiple kinds of "capacity", for example:
>>
>> If nodeA has more cpus remaining, while nodeB has more ram and storage
>> remaining -- nodeB has more capacity.
>>
> 
> Thanks a lot for clarifying this.
> So, each remaining capacity parameter values are compared between nodes,
> and each node gets "1" pseudo-score if it has more capacity, and "0"
> otherwise. Then that pseudo-scores are summed and that sums are
> compared. Nodes with greater sum win.
> 
> Did I understand you correctly?
Basically, yes.

> 
>> If nodeA has more cpus and storage1 remaining, nodeB has more ram and
>> storage2 remaining -- They have the equal capacity. Then the first
>> listed node is preferred.
> 
> Wouldn't it be better from the load-balancing point of view to use
> round-robin placement instead of just picking first listed node?
Ah, forgot that. We do load-balancing if they have the equal capacity.
You can see that from sort_node_weight().

> 
>>
>>>
>>> Also could you please describe algorithm used for placement in little
>>> bit more details, so I would ask less stupid questions. Does it have
>>> something related to linear programming (f.e.
>>> http://en.wikipedia.org/wiki/Simplex_method)?
>> An optimal solution definitely requires some mathematical optimization
>> method. Though we don't use one so far. It's somewhat complicated to be
>> introduced and combined with the current allocation factors.
> 
> Thank you for information. Do you have any plans implementing this?
Not yet

> I
> did some linear optimization works when studied at university long ago,
> and it wasn't too complicated to actually code the algorithm. 
That would be nice!

> Although
> it was very hard to understand what exactly all that methods do and how
> to apply them to a real-life task.
Indeed. At least We'll need to think of how to handle that if there are
collocation constraints, even though we can override the
location/stickiness thing to seek for "optimal".

Regards,
  Gaoyan
-- 
Gao,Yan <ygao at suse.com>
Software Engineer
China Server Team, SUSE.




More information about the Pacemaker mailing list