The nova.scheduler.weights.least_cost Module

Least Cost is an algorithm for choosing which host machines to provision a set of resources to. The input is a WeightedHost object which is decided upon by a set of objective-functions, called the ‘cost-functions’. The WeightedHost contains a combined weight for each cost-function.

The cost-function and weights are tabulated, and the host with the least cost is then selected for provisioning.

NOTE(comstud): This is deprecated. One should use the RAMWeigher and/or create other weight modules.

compute_fill_first_cost_fn(host_state, weight_properties)

Higher weights win, so we should return a lower weight when there’s more free ram available.

Note: the weight modifier for this function in default configuration is -1.0. With -1.0 this function runs in reverse, so systems with the most free memory will be preferred.

get_least_cost_weighers()
noop_cost_fn(host_state, weight_properties)

Return a pre-weight cost of 1 for each host.

Previous topic

The nova.scheduler.scheduler_options Module

Next topic

The nova.scheduler.weights.ram Module

This Page