File: workload-stabilization.rst

package info (click to toggle)
watcher 14.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,764 kB
  • sloc: python: 48,904; xml: 312; sh: 265; makefile: 75
file content (144 lines) | stat: -rw-r--r-- 5,991 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
=============================================
Watcher Overload standard deviation algorithm
=============================================

Synopsis
--------

**display name**: ``Workload stabilization``

**goal**: ``workload_balancing``

    .. watcher-term:: watcher.decision_engine.strategy.strategies.workload_stabilization.WorkloadStabilization

Requirements
------------

Metrics
*******

The *workload_stabilization* strategy requires the following metrics:

============================ ============ ======= =============================
metric                       service name plugins comment
============================ ============ ======= =============================
``compute.node.cpu.percent`` ceilometer_  none    need to set the
                                                  ``compute_monitors`` option
                                                  to ``cpu.virt_driver`` in the
                                                  nova.conf.
``hardware.memory.used``     ceilometer_  SNMP_
``cpu``                      ceilometer_  none
``instance_ram_usage``       ceilometer_  none
============================ ============ ======= =============================

.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
.. _SNMP: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#snmp-based-meters

Cluster data model
******************

Default Watcher's Compute cluster data model:

    .. watcher-term:: watcher.decision_engine.model.collector.nova.NovaClusterDataModelCollector

Actions
*******

Default Watcher's actions:


    .. list-table::
       :widths: 30 30
       :header-rows: 1

       * - action
         - description
       * - ``migration``
         - .. watcher-term:: watcher.applier.actions.migration.Migrate

Planner
*******

Default Watcher's planner:

    .. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner

Configuration
-------------

Strategy parameters are:

==================== ====== ===================== =============================
parameter            type   default Value         description
==================== ====== ===================== =============================
``metrics``          array  |metrics|             Metrics used as rates of
                                                  cluster loads.
``thresholds``       object |thresholds|          Dict where key is a metric
                                                  and value is a trigger value.

``weights``          object |weights|             These weights used to
                                                  calculate common standard
                                                  deviation. Name of weight
                                                  contains meter name and
                                                  _weight suffix.
``instance_metrics`` object |instance_metrics|    Mapping to get hardware
                                                  statistics using instance
                                                  metrics.
``host_choice``      string retry                 Method of host's choice.
                                                  There are cycle, retry and
                                                  fullsearch methods. Cycle
                                                  will iterate hosts in cycle.
                                                  Retry will get some hosts
                                                  random (count defined in
                                                  retry_count option).
                                                  Fullsearch will return each
                                                  host from list.
``retry_count``      number 1                     Count of random returned
                                                  hosts.
``periods``          object |periods|             These periods are used to get
                                                  statistic aggregation for
                                                  instance and host metrics.
                                                  The period is simply a
                                                  repeating interval of time
                                                  into which the samples are
                                                  grouped for aggregation.
                                                  Watcher uses only the last
                                                  period of all received ones.
==================== ====== ===================== =============================

.. |metrics| replace:: ["instance_cpu_usage", "instance_ram_usage"]
.. |thresholds| replace:: {"instance_cpu_usage": 0.2, "instance_ram_usage": 0.2}
.. |weights| replace:: {"instance_cpu_usage_weight": 1.0, "instance_ram_usage_weight": 1.0}
.. |instance_metrics| replace:: {"instance_cpu_usage": "compute.node.cpu.percent", "instance_ram_usage": "hardware.memory.used"}
.. |periods| replace:: {"instance": 720, "node": 600}

Efficacy Indicator
------------------

.. watcher-func::
  :format: literal_block

  watcher.decision_engine.goal.efficacy.specs.ServerConsolidation.get_global_efficacy_indicator

Algorithm
---------

You can find description of overload algorithm and role of standard deviation
here: https://specs.openstack.org/openstack/watcher-specs/specs/newton/implemented/sd-strategy.html

How to use it ?
---------------

.. code-block:: shell

    $ openstack optimize audittemplate create \
      at1 workload_balancing --strategy workload_stabilization

    $ openstack optimize audit create -a at1 \
      -p thresholds='{"instance_ram_usage": 0.05}' \
      -p metrics='["instance_ram_usage"]'

External Links
--------------

- `Watcher Overload standard deviation algorithm spec <https://specs.openstack.org/openstack/watcher-specs/specs/newton/implemented/sd-strategy.html>`_