[openstack-dev] Weight normalization in scheduler

Álvaro López García alvaro.lopez.garcia at cern.ch
Thu Aug 1 07:24:25 UTC 2013


Hi all.

TL;DR: I've created a blueprint [1] regarding weight normalization.
I would be very glad if somebody could examine and comment it.

Recently I've been developing some weighers to be used within nova and I
found that the weight system was using raw values. This makes difficult
for an operator to stablish the importance of a weigher against the rest
of them, since the values can range freely and one big magnitude
returned by a weigher could shade another one.

One solution is to inflate either the multiplier or the weight that is
returned by the weigher, but this is an ugly hack (for example, if you
increase the RAM on your systems, you will need to adjust the
multipliers again). A much better approach is to use weight
normalization before actually using the weights

With weight normalization a weigher will still return a list of RAW
values, but the BaseWeightHandler will normalize all of them into a
range of values (0.0 and 1.0) before adding them up. This way, a weight
for a given object will be:

  weight = w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ...

This makes easier to stablish the importance of a weigher regarding the
rest, by just adjusting the multiplier. This is explained in [1], and
implemented in [2] (with some suggestions by the reviewers).

[1] https://blueprints.launchpad.net/openstack/?searchtext=normalize-scheduler-weights
[2] https://review.openstack.org/#/c/27160/

Thanks for your feedback,
-- 
Álvaro López García                              aloga at ifca.unican.es



More information about the OpenStack-dev mailing list