Several fixes of strategies docs
Removed duplicates of strategies descriptions, added references to that descriptions instead of module descriptions. Change-Id: Ife396ddce5c3cc926cc111f1ff1abd3a42c22561
This commit is contained in:
parent
d86fee294f
commit
92dad3be2d
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``unclassified``
|
**goal**: ``unclassified``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.actuation
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.actuation.Actuator
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``server_consolidation``
|
**goal**: ``server_consolidation``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.basic_consolidation
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.basic_consolidation.BasicConsolidation
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,11 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``thermal_optimization``
|
**goal**: ``thermal_optimization``
|
||||||
|
|
||||||
Outlet (Exhaust Air) temperature is a new thermal telemetry which can be
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.outlet_temp_control
|
||||||
used to measure the host's thermal/workload status. This strategy makes
|
|
||||||
decisions to migrate workloads to the hosts with good thermal condition
|
|
||||||
(lowest outlet temperature) when the outlet temperature of source hosts
|
|
||||||
reach a configurable threshold.
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``saving_energy``
|
**goal**: ``saving_energy``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.saving_energy
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.saving_energy.SavingEnergy
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``airflow_optimization``
|
**goal**: ``airflow_optimization``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.uniform_airflow
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.uniform_airflow.UniformAirflow
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``vm_consolidation``
|
**goal**: ``vm_consolidation``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.vm_workload_consolidation
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.vm_workload_consolidation.VMWorkloadConsolidation
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``workload_balancing``
|
**goal**: ``workload_balancing``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.workload_stabilization
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.workload_stabilization.WorkloadStabilization
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``workload_balancing``
|
**goal**: ``workload_balancing``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.workload_balance
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.workload_balance.WorkloadBalance
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -9,7 +9,7 @@ Synopsis
|
|||||||
|
|
||||||
**goal**: ``hardware_maintenance``
|
**goal**: ``hardware_maintenance``
|
||||||
|
|
||||||
.. watcher-term:: watcher.decision_engine.strategy.strategies.zone_migration
|
.. watcher-term:: watcher.decision_engine.strategy.strategies.zone_migration.ZoneMigration
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
@ -14,16 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*Actuator*
|
|
||||||
|
|
||||||
This strategy allows anyone to create an action plan with a predefined set of
|
|
||||||
actions. This strategy can be used for 2 different purposes:
|
|
||||||
|
|
||||||
- Test actions
|
|
||||||
- Use this strategy based on an event trigger to perform some explicit task
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
@ -34,7 +24,17 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class Actuator(base.UnclassifiedStrategy):
|
class Actuator(base.UnclassifiedStrategy):
|
||||||
"""Actuator that simply executes the actions given as parameter"""
|
"""Actuator
|
||||||
|
|
||||||
|
Actuator that simply executes the actions given as parameter
|
||||||
|
|
||||||
|
This strategy allows anyone to create an action plan with a predefined
|
||||||
|
set of actions. This strategy can be used for 2 different purposes:
|
||||||
|
|
||||||
|
- Test actions
|
||||||
|
- Use this strategy based on an event trigger to perform some explicit task
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_name(cls):
|
def get_name(cls):
|
||||||
|
@ -16,24 +16,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*Good server consolidation strategy*
|
|
||||||
|
|
||||||
Consolidation of VMs is essential to achieve energy optimization in cloud
|
|
||||||
environments such as OpenStack. As VMs are spinned up and/or moved over time,
|
|
||||||
it becomes necessary to migrate VMs among servers to lower the costs. However,
|
|
||||||
migration of VMs introduces runtime overheads and consumes extra energy, thus
|
|
||||||
a good server consolidation strategy should carefully plan for migration in
|
|
||||||
order to both minimize energy consumption and comply to the various SLAs.
|
|
||||||
|
|
||||||
This algorithm not only minimizes the overall number of used servers, but also
|
|
||||||
minimizes the number of migrations.
|
|
||||||
|
|
||||||
It has been developed only for tests. You must have at least 2 physical compute
|
|
||||||
nodes to run it, so you can easily run it on DevStack. It assumes that live
|
|
||||||
migration is possible on your OpenStack cluster.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
@ -47,7 +29,25 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class BasicConsolidation(base.ServerConsolidationBaseStrategy):
|
class BasicConsolidation(base.ServerConsolidationBaseStrategy):
|
||||||
"""Basic offline consolidation using live migration"""
|
"""Good server consolidation strategy
|
||||||
|
|
||||||
|
Basic offline consolidation using live migration
|
||||||
|
|
||||||
|
Consolidation of VMs is essential to achieve energy optimization in cloud
|
||||||
|
environments such as OpenStack. As VMs are spinned up and/or moved over
|
||||||
|
time, it becomes necessary to migrate VMs among servers to lower the
|
||||||
|
costs. However, migration of VMs introduces runtime overheads and
|
||||||
|
consumes extra energy, thus a good server consolidation strategy should
|
||||||
|
carefully plan for migration in order to both minimize energy consumption
|
||||||
|
and comply to the various SLAs.
|
||||||
|
|
||||||
|
This algorithm not only minimizes the overall number of used servers,
|
||||||
|
but also minimizes the number of migrations.
|
||||||
|
|
||||||
|
It has been developed only for tests. You must have at least 2 physical
|
||||||
|
compute nodes to run it, so you can easily run it on DevStack. It assumes
|
||||||
|
that live migration is possible on your OpenStack cluster.
|
||||||
|
"""
|
||||||
|
|
||||||
HOST_CPU_USAGE_METRIC_NAME = 'compute.node.cpu.percent'
|
HOST_CPU_USAGE_METRIC_NAME = 'compute.node.cpu.percent'
|
||||||
INSTANCE_CPU_USAGE_METRIC_NAME = 'cpu_util'
|
INSTANCE_CPU_USAGE_METRIC_NAME = 'cpu_util'
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""
|
||||||
*Good Thermal Strategy*:
|
*Good Thermal Strategy*
|
||||||
|
|
||||||
Towards to software defined infrastructure, the power and thermal
|
Towards to software defined infrastructure, the power and thermal
|
||||||
intelligences is being adopted to optimize workload, which can help
|
intelligences is being adopted to optimize workload, which can help
|
||||||
@ -26,6 +26,10 @@ improve efficiency, reduce power, as well as to improve datacenter PUE
|
|||||||
and lower down operation cost in data center.
|
and lower down operation cost in data center.
|
||||||
Outlet (Exhaust Air) Temperature is one of the important thermal
|
Outlet (Exhaust Air) Temperature is one of the important thermal
|
||||||
telemetries to measure thermal/workload status of server.
|
telemetries to measure thermal/workload status of server.
|
||||||
|
|
||||||
|
This strategy makes decisions to migrate workloads to the hosts with good
|
||||||
|
thermal condition (lowest outlet temperature) when the outlet temperature
|
||||||
|
of source hosts reach a configurable threshold.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
@ -14,24 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*Workload balance using cinder volume migration*
|
|
||||||
|
|
||||||
*Description*
|
|
||||||
|
|
||||||
This strategy migrates volumes based on the workload of the
|
|
||||||
cinder pools.
|
|
||||||
It makes decision to migrate a volume whenever a pool's used
|
|
||||||
utilization % is higher than the specified threshold. The volume
|
|
||||||
to be moved should make the pool close to average workload of all
|
|
||||||
cinder pools.
|
|
||||||
|
|
||||||
*Requirements*
|
|
||||||
|
|
||||||
* You must have at least 2 cinder volume pools to run
|
|
||||||
this strategy.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
@ -16,31 +16,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
[PoC]Uniform Airflow using live migration
|
|
||||||
|
|
||||||
*Description*
|
|
||||||
|
|
||||||
It is a migration strategy based on the airflow of physical
|
|
||||||
servers. It generates solutions to move VM whenever a server's
|
|
||||||
airflow is higher than the specified threshold.
|
|
||||||
|
|
||||||
*Requirements*
|
|
||||||
|
|
||||||
* Hardware: compute node with NodeManager 3.0 support
|
|
||||||
* Software: Ceilometer component ceilometer-agent-compute running
|
|
||||||
in each compute node, and Ceilometer API can report such telemetry
|
|
||||||
"airflow, system power, inlet temperature" successfully.
|
|
||||||
* You must have at least 2 physical compute nodes to run this strategy
|
|
||||||
|
|
||||||
*Limitations*
|
|
||||||
|
|
||||||
- This is a proof of concept that is not meant to be used in production.
|
|
||||||
- We cannot forecast how many servers should be migrated. This is the
|
|
||||||
reason why we only plan a single virtual machine migration at a time.
|
|
||||||
So it's better to use this algorithm with `CONTINUOUS` audits.
|
|
||||||
- It assumes that live migrations are possible.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
@ -17,8 +17,21 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*VM Workload Consolidation Strategy*
|
from oslo_config import cfg
|
||||||
|
from oslo_log import log
|
||||||
|
import six
|
||||||
|
|
||||||
|
from watcher._i18n import _
|
||||||
|
from watcher.common import exception
|
||||||
|
from watcher.decision_engine.model import element
|
||||||
|
from watcher.decision_engine.strategy.strategies import base
|
||||||
|
|
||||||
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
||||||
|
"""VM Workload Consolidation Strategy
|
||||||
|
|
||||||
A load consolidation strategy based on heuristic first-fit
|
A load consolidation strategy based on heuristic first-fit
|
||||||
algorithm which focuses on measured CPU utilization and tries to
|
algorithm which focuses on measured CPU utilization and tries to
|
||||||
@ -53,21 +66,6 @@ This strategy assumes it is possible to live migrate any VM from
|
|||||||
an active compute node to any other active compute node.
|
an active compute node to any other active compute node.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_log import log
|
|
||||||
import six
|
|
||||||
|
|
||||||
from watcher._i18n import _
|
|
||||||
from watcher.common import exception
|
|
||||||
from watcher.decision_engine.model import element
|
|
||||||
from watcher.decision_engine.strategy.strategies import base
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
|
||||||
"""VM Workload Consolidation Strategy"""
|
|
||||||
|
|
||||||
HOST_CPU_USAGE_METRIC_NAME = 'compute.node.cpu.percent'
|
HOST_CPU_USAGE_METRIC_NAME = 'compute.node.cpu.percent'
|
||||||
INSTANCE_CPU_USAGE_METRIC_NAME = 'cpu_util'
|
INSTANCE_CPU_USAGE_METRIC_NAME = 'cpu_util'
|
||||||
|
|
||||||
|
@ -16,35 +16,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*[PoC]Workload balance using live migration*
|
|
||||||
|
|
||||||
*Description*
|
|
||||||
|
|
||||||
This strategy migrates a VM based on the VM workload of the hosts.
|
|
||||||
It makes decision to migrate a workload whenever a host's CPU or RAM
|
|
||||||
utilization % is higher than the specified threshold. The VM to
|
|
||||||
be moved should make the host close to average workload of all
|
|
||||||
hosts nodes.
|
|
||||||
|
|
||||||
*Requirements*
|
|
||||||
|
|
||||||
* Hardware: compute node should use the same physical CPUs
|
|
||||||
* Software: Ceilometer component ceilometer-agent-compute
|
|
||||||
running in each compute node, and Ceilometer API can
|
|
||||||
report such telemetry "cpu_util" and "memory.resident" successfully.
|
|
||||||
* You must have at least 2 physical compute nodes to run
|
|
||||||
this strategy.
|
|
||||||
|
|
||||||
*Limitations*
|
|
||||||
|
|
||||||
- This is a proof of concept that is not meant to be used in
|
|
||||||
production.
|
|
||||||
- We cannot forecast how many servers should be migrated.
|
|
||||||
This is the reason why we only plan a single virtual
|
|
||||||
machine migration at a time. So it's better to use this
|
|
||||||
algorithm with `CONTINUOUS` audits.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
@ -76,7 +47,7 @@ class WorkloadBalance(base.WorkloadStabilizationBaseStrategy):
|
|||||||
* Software: Ceilometer component ceilometer-agent-compute running
|
* Software: Ceilometer component ceilometer-agent-compute running
|
||||||
in each compute node, and Ceilometer API can report such telemetry
|
in each compute node, and Ceilometer API can report such telemetry
|
||||||
"cpu_util" and "memory.resident" successfully.
|
"cpu_util" and "memory.resident" successfully.
|
||||||
* You must have at least 2 physical compute nodes to run this strategy
|
* You must have at least 2 physical compute nodes to run this strategy.
|
||||||
|
|
||||||
*Limitations*
|
*Limitations*
|
||||||
|
|
||||||
|
@ -16,18 +16,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*Workload Stabilization control using live migration*
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
This strategy has been tested in a small (32 nodes) cluster.
|
|
||||||
|
|
||||||
It assumes that live migrations are possible in your cluster.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import itertools
|
import itertools
|
||||||
@ -59,7 +47,16 @@ def _set_memoize(conf):
|
|||||||
|
|
||||||
|
|
||||||
class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
||||||
"""Workload Stabilization control using live migration"""
|
"""Workload Stabilization control using live migration
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
This strategy has been tested in a small (32 nodes) cluster.
|
||||||
|
|
||||||
|
It assumes that live migrations are possible in your cluster.
|
||||||
|
"""
|
||||||
|
|
||||||
MIGRATION = "migrate"
|
MIGRATION = "migrate"
|
||||||
MEMOIZE = _set_memoize(CONF)
|
MEMOIZE = _set_memoize(CONF)
|
||||||
|
@ -11,13 +11,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
"""
|
|
||||||
*Zone migration using instance and volume migration*
|
|
||||||
|
|
||||||
This is zone migration strategy to migrate many instances and volumes
|
|
||||||
efficiently with minimum downtime for hardware maintenance.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
from dateutil.parser import parse
|
from dateutil.parser import parse
|
||||||
import six
|
import six
|
||||||
@ -48,7 +41,11 @@ IN_USE = "in-use"
|
|||||||
|
|
||||||
|
|
||||||
class ZoneMigration(base.ZoneMigrationBaseStrategy):
|
class ZoneMigration(base.ZoneMigrationBaseStrategy):
|
||||||
"""Zone migration using instance and volume migration"""
|
"""Zone migration using instance and volume migration
|
||||||
|
|
||||||
|
This is zone migration strategy to migrate many instances and volumes
|
||||||
|
efficiently with minimum downtime for hardware maintenance.
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, config, osc=None):
|
def __init__(self, config, osc=None):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user