Jump to: navigation, search

Difference between revisions of "Scheduler/NormalizedWeights"

Line 4: Line 4:
 
== Overview ==
 
== Overview ==
  
Currently the weighter is using the raw values instead of normalizing
+
Currently the scheduler is using the raw values directly from the available weighers,
them. This makes difficult to properly use multipliers for establishing
+
instead of normalizing them. This makes difficult to properly use multipliers for establishing
 
the relative importance between two weighters (one big magnitude could
 
the relative importance between two weighters (one big magnitude could
shade a smaller one). For example, a weighter that is returning 0 and 1 as
+
shade a smaller one). For example, a weigher that is returning 0 and 1 as
 
values will need a multiplier that is big enough to be taking into account with
 
values will need a multiplier that is big enough to be taking into account with
regard to the RAM weighter, that returns higher values.
+
regard to the RAM weigher, that would return higher values.
  
 
This blueprint aims to introduce weight normalization so that we can apply
 
This blueprint aims to introduce weight normalization so that we can apply
multipliers easily. The commit does not change the behavior per-se
+
multiple weighers easily. The commit does not change the behavior per-se
since currently we only have 1 weighter. All the weights will be
+
since currently we only have 1 weigher. All the weights will be
 
normalized between 0.0 and 1.0, so that the final weight for a host
 
normalized between 0.0 and 1.0, so that the final weight for a host
 
will be as follows:
 
will be as follows:
Line 20: Line 20:
  
 
This way it is easier for a resource provider to configure and establish the
 
This way it is easier for a resource provider to configure and establish the
importance between the weighters.
+
importance between the weighers.
  
 
Two kinds of normalization will be provided:
 
Two kinds of normalization will be provided:
  
* If the weighter specifies the upper and lower values, the weighted objects will be normalized with regard to these values.
+
* If the weigher specifies the upper and lower values, the weighed objects will be normalized with regard to these values.
* In the case that the weighter does not supply the lower and upper limits for the weighted objects, the maximum and minimum values from the weighted objects will be used.
+
* In the case that the weigher does not supply the lower and upper limits for the weighed objects, the maximum and minimum values from the weighed objects will be used.
  
 
== Examples ==
 
== Examples ==
  
 
== Comments ==
 
== Comments ==
Comment from Lindgren in https://review.openstack.org/#/c/27160/ :
+
See commends in https://review.openstack.org/#/c/27160/ :
 
 
<blockquote>
 
If I have a weigher for a resource that ranges between 1 and 100 and normalize the weights of two objects, the normalization will produce equal results for weights that differ on the scale (as long as the same object has the highest weight).
 
 
 
For weights [0, 1], this will result in normalized values [0.0, 1.0]. For weights [99, 100] this will still result in the same [0.0, 1.0].
 
 
 
Lets assume I have two objects and two weighers. Both weighers produce values in the same range (this could possibly be already normalized values like utilization of resources which range from 0.0 to 1.0). The weighers give weights [0.1, 0.2] and [1.0, 0.1] which without further normalization gives final weights [1.1, 0.3]. With the current way of calculating normalization, the result will instead be [1.0, 1.0] which has an effect on the ordering of the objects.
 
</blockquote>
 

Revision as of 11:15, 10 June 2013

Overview

Currently the scheduler is using the raw values directly from the available weighers, instead of normalizing them. This makes difficult to properly use multipliers for establishing the relative importance between two weighters (one big magnitude could shade a smaller one). For example, a weigher that is returning 0 and 1 as values will need a multiplier that is big enough to be taking into account with regard to the RAM weigher, that would return higher values.

This blueprint aims to introduce weight normalization so that we can apply multiple weighers easily. The commit does not change the behavior per-se since currently we only have 1 weigher. All the weights will be normalized between 0.0 and 1.0, so that the final weight for a host will be as follows:

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

This way it is easier for a resource provider to configure and establish the importance between the weighers.

Two kinds of normalization will be provided:

  • If the weigher specifies the upper and lower values, the weighed objects will be normalized with regard to these values.
  • In the case that the weigher does not supply the lower and upper limits for the weighed objects, the maximum and minimum values from the weighed objects will be used.

Examples

Comments

See commends in https://review.openstack.org/#/c/27160/ :