The watcher.decision_engine.strategy.strategies.workload_stabilization Module

class watcher.decision_engine.strategy.strategies.workload_stabilization.WorkloadStabilization(config, osc=None)[source]

Bases: watcher.decision_engine.strategy.strategies.base.WorkloadStabilizationBaseStrategy

Workload Stabilization control using live migration

Description

This is workload stabilization strategy based on standard deviation algorithm. The goal is to determine if there is an overload in a cluster and respond to it by migrating VMs to stabilize the cluster.

Requirements

  • Software: Ceilometer component ceilometer-compute running in each compute host, and Ceilometer API can report such telemetries memory.resident and cpu_util successfully.
  • You must have at least 2 physical compute nodes to run this strategy.

Limitations

  • It assume that live migrations are possible
  • Load on the system is sufficiently stable.

Spec URL

https://review.openstack.org/#/c/286153/

MEMOIZE(fn)
add_migration(resource_id, migration_type, source_node, destination_node)[source]
calculate_migration_case(hosts, instance_id, src_node_id, dst_node_id)[source]

Calculate migration case

Return list of standard deviation values, that appearing in case of migration of instance from source host to destination host :param hosts: hosts with their workload :param instance_id: the virtual machine :param src_node_id: the source node id :param dst_node_id: the destination node id :return: list of standard deviation values

calculate_weighted_sd(sd_case)[source]

Calculate common standard deviation among meters on host

check_threshold()[source]

Check if cluster is needed in balancing

create_migration_instance(mig_instance, mig_source_node, mig_destination_node)[source]

Create migration VM

do_execute()[source]
fill_solution()[source]
classmethod get_display_name()[source]
get_hosts_load()[source]

Get load of every host by gathering instances load

get_instance_load(*arg, **kw)[source]

Gathering instance load through ceilometer statistic.

Parameters:instance_uuid – instance for which statistic is gathered.
Returns:dict
classmethod get_name()[source]
classmethod get_schema()[source]
get_sd(hosts, meter_name)[source]

Get standard deviation among hosts by specified meter

classmethod get_translatable_display_name()[source]
migrate(instance_uuid, src_host, dst_host)[source]
normalize_hosts_load(hosts)[source]
post_execute()[source]

Post-execution phase

This can be used to compute the global efficacy

pre_execute()[source]
simulate_migrations(hosts)[source]

Make sorted list of pairs instance:dst_host

transform_instance_cpu(instance_load, host_vcpus)[source]

Transform instance cpu utilization to overall host cpu utilization.

Parameters:
  • instance_load – dict that contains instance uuid and utilization info.
  • host_vcpus – int
Returns:

float value

Previous topic

The watcher.decision_engine.strategy.strategies.workload_balance Module

Next topic

The watcher.decision_engine.sync Module

Project Source

This Page