From cf8d7bb2f4f92fb0ca1e1baa48b47150de85f38c Mon Sep 17 00:00:00 2001 From: Yumeng_Bao Date: Wed, 6 Sep 2017 18:27:24 +0800 Subject: [PATCH] Add documentation about saving energy strategy Change-Id: I9746239c83ea7bff364ad6939e4174748be2d299 Closes-Bug: #1713402 --- doc/source/strategies/saving_energy.rst | 100 ++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 doc/source/strategies/saving_energy.rst diff --git a/doc/source/strategies/saving_energy.rst b/doc/source/strategies/saving_energy.rst new file mode 100644 index 000000000..a608665ce --- /dev/null +++ b/doc/source/strategies/saving_energy.rst @@ -0,0 +1,100 @@ +====================== +Saving Energy Strategy +====================== + +Synopsis +-------- + +**display name**: ``Saving Energy Strategy`` + +**goal**: ``saving_energy`` + + .. watcher-term:: watcher.decision_engine.strategy.strategies.saving_energy + +Requirements +------------ + +This feature will use Ironic to do the power on/off actions, therefore +this feature requires that the ironic component is configured. +And the compute node should be managed by Ironic. + +Ironic installation: https://docs.openstack.org/ironic/latest/install/index.html + +Cluster data model +****************** + +Default Watcher's Compute cluster data model: + + .. watcher-term:: watcher.decision_engine.model.collector.nova.NovaClusterDataModelCollector + +Actions +******* + + .. list-table:: + :widths: 30 30 + :header-rows: 1 + + * - action + - description + * - ``change_node_power_state`` + - .. watcher-term:: watcher.applier.actions.change_node_power_state.ChangeNodePowerState + +Planner +******* + +Default Watcher's planner: + + .. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner + + +Configuration +------------- + +Strategy parameter is: + +====================== ====== ======= ====================================== +parameter type default description + Value +====================== ====== ======= ====================================== +``free_used_percent`` Number 10.0 a rational number, which describes the + the quotient of + min_free_hosts_num/nodes_with_VMs_num +``min_free_hosts_num`` Int 1 an int number describes minimum free + compute nodes +====================== ====== ======= ====================================== + + +Efficacy Indicator +------------------ + +Energy saving strategy efficacy indicator is unclassified. +https://github.com/openstack/watcher/blob/master/watcher/decision_engine/goal/goals.py#L215-L218 + +Algorithm +--------- + +For more information on the Energy Saving Strategy please refer to:http://specs.openstack.org/openstack/watcher-specs/specs/pike/implemented/energy-saving-strategy.html + +How to use it ? +--------------- +step1: Add compute nodes info into ironic node management + +.. code-block:: shell + + $ ironic node-create -d pxe_ipmitool -i ipmi_address=10.43.200.184 \ + ipmi_username=root -i ipmi_password=nomoresecret -e compute_node_id=3 + +step 2: Create audit to do optimization + +.. code-block:: shell + + $ openstack optimize audittemplate create \ + at1 saving_energy --strategy saving_energy + + $ openstack optimize audit create -a at1 + +External Links +-------------- + +*Spec URL* +http://specs.openstack.org/openstack/watcher-specs/specs/pike/implemented/energy-saving-strategy.html