Power Management Configuration

Kubernetes Power Management is a tool that allows you to expose and use the
power control technologies present in some processors in a Kubernetes cluster.
Its main application is directed to energy control in situations of workloads in
known periods and energy optimization even in high performance workloads.

Story: 2010737
Task: 47983
Change-Id: I596577571e5b66ddf81f86687c05350e09bbed3c
Signed-off-by: Romão Martines <romaomatheus.martinesdejesus@windriver.com>
This commit is contained in:
Romão Martines 2023-05-12 09:56:46 -04:00
parent d3421cc962
commit b5b25e18c7
1 changed files with 293 additions and 0 deletions

View File

@ -0,0 +1,293 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License. http://creativecommons.org/licenses/by/3.0/legalcode
==============================
Configurable Power Management
==============================
Storyboard: `#2010737`_
The objective of this spec is to introduce Configurable Power Management in
StarlingX Platform.
Problem description
===================
`Kubernetes Power Manager`_ is a tool that allows you to expose and use the
powercontrol technologies present in some processors in a Kubernetes cluster.
Its main application is directed to energy control in situations of workloads in
known periods and energy optimization even in high performance workloads.
By controlling frequency (p-states) and activation levels of CPU functions
(c-states), the tool allows each core to be individually controlled according
to the needs of each application's workload. Due to this feature and its
adherence to the StarlingX proposal, this spec seeks to observe the
applicability, requirements and quality of operation of the Kubernetes Power
Manager in StarlingX platform.
Below, there is a study about Power Management functionalities in
:ref:`Kubernetes Power Management Technologies` section and all required
changes regarding StarlingX Platform in :ref:`Proposed Change` and :ref:`Work
Items`
.. _Kubernetes Power Management Technologies:
Kubernetes Power Management Technologies
----------------------------------------
Intel® SpeedStep®
*****************
Enables an operating system to control and select P-state.
In summary, the key features of Enhanced SpeedStep® Technology are:
* Multiple frequency and voltage points (P-states) for optimal performance and
power
efficiency.
* Software-controlled frequency selection through model-specific registers
(MSRs).
* Voltage optimization based on the selected frequency and number of active IA
cores.
* Phase Locked Loop (PLL) locks onto the target frequency once the voltage is
established.
* All active IA cores share the same frequency and voltage.
* Software-requested transitions are accepted at any time, with new transitions
deferred until previous transitions are completed.
* Processor controls voltage ramp rates internally to ensure glitch-free
transitions.
Intel® Speed Shift®
*******************
Provides faster responsiveness with short-lived performance changes, allowing
the processor to more quickly select its best operating frequency and voltage
for optimal performance and energy efficiency.
Speed Shift feature provides multiple levels of control for performance hints:
PECI, Core, and Package. PECI, if available, has the highest priority and
controls p-state hints. Core level control is applied to each core and has the
highest priority after PECI, while Package level control has the lowest
priority of the three. However, PECI support is not common, so most users can
focus on Core and Package level controls.
Intel® Turbo Boost®
*******************
Increases the processor frequency above the nominal frequency to improve
performance.
Intel® Speed Select Technology - Core Power
*******************************************
This feature allows for more flexibility in workloads that benefit from a
higher base frequency on some of the processor's cores. While the maximum turbo
frequency remains constant across all cores, a subset of the cores can be
designated to run at a higher base frequency, while the remaining cores run at
a lower base frequency.
Intel® Speed Select Technology - Base Frequency
***********************************************
This feature allows users to increase the guaranteed base frequency on certain
high-priority cores while decreasing the base frequency on the remaining
low-priority cores. This improves overall performance by boosting the frequency
on critical cores.
Kubernetes Power Management Components
--------------------------------------
* Power Manager: controls the nodes, serves as a manager, or source of truth
gathering information on the energy profiles applied to each node;
* Power Config Controller: part of the power manager, is responsible for
evaluating the presence of a default power configuration for the node and,
when present, starting the Power Node Agent;
* Power Config: describes the energy configuration of a given node
indicating one or more profiles that can be used;
* Power Node Agent: applied to each node, it is a daemonset responsible for
managing the energy profiles applied. Communicates with Power Manager to
establish power policies to be applied to the node;
* Power Profile: power profiles that establish CPU operating frequency
ranges, Energy Performance Preference (EPP), and governor. The profile has
a generic aspect, that is, it only describes a possible style of energy
control, and its application is the responsibility of Power Workload.The
pods' deployment files,
or Power Config files, can indicate the profiles they want to use by
including the device power.intel.com/<POWERPROFILE>. It is also important
to note that all CPUs not assigned to a specific power profile are pooled
in a profile known as the "Shared". This profile must be created manually
by the user;
* Power Workload: responsible for applying a Power Profile. Its scope is
set automatically, when a pod requests a default power profile, or via a
configuration file that describes the affected CPUs. Preset profiles have
workloads createdautomatically. The Shared Power Profile, and other
personalized profiles, does not have an automatically assigned workload
(need to be created manually).
Use Cases
---------
As an end-user, I want to be able to manage power configurations through
StarlingX Platform, controlling frequency and also activation levels of CPU
functions.
.. _Proposed Change:
Proposed change
===============
Alternatives
------------
Data model impact
-----------------
None
REST API impact
---------------
None
Security impact
---------------
None
Other end-user impact
---------------------
.. _Performance Impact:
Performance Impact
------------------
Another deployer impact
-----------------------
Developer impact
----------------
Upgrade impact
--------------
Implementation
==============
Assignee(s)
-----------
Primary assignee:
* Guilherme Batista Leite (guilhermebatista)
Other contributors:
* Caio Cesar Ferreira (ccesarfe)
* Davi Frossard (dbarrosf)
* Eduardo Alberti (ealberti)
* Fabio Studyny Higa (fstudyny)
* Pedro Antônio de Souza Silva (pdesouza)
* Reynaldo Patrone Gomes Filho (rpatrone)
* Romão Martines (rmartine)
* Thiago Antonio Miranda (tamiranda)
Repos Impacted
--------------
List repositories in StarlingX that are impacted by this spec:
.. _Work Items:
Work Items
----------
Investigations and design
*************************
* Investigation and evaluation of CPU Power Manager architecture
and requirements;
* Evaluation of platform and application control for p-states and
c-states;
* Design proposal and review for p-state and c-state control.
Power Manager Integration
*************************
* Flux application for Power Management (power-management);
* Default policy configuration (platform and applications).
System Engineering
******************
* Resource requirements of new Power Manager containers;
* System platform CPU and Memory Scaling requirements update based on C6
enablement (if required)
Dependencies
============
* `Kubernetes Power Manager`_ release v2.2.0
* `Node Feature Discovery`_ v0.13.1
Testing
=======
System configuration
********************
Test Scenarios
**************
Documentation Impact
====================
The end-user documentation will need do be changed, adding Power Manager
application deployment and configuration. Also it needs to be added the
customization of default and new policies.
Documentation should also review the processes of Pod Workload for its
integration and usage considering the Power Management changes.
References
==========
#. `Kubernetes Power Manager`_
History
=======
.. list-table:: Revisions
:header-rows: 1
* - Release Name
- Description
* - stx-9.0
- Introduced
.. Abbreviations
.. |EPP| replace:: :abbr:`EPP (Energy Performance Preference)`
.. |PLL| replace:: :abbr:`PLL (Phase Locked Loop)`
.. |PECI| replace:: :abbr:`PECI (Platform Environment Control Interface)`
.. |MSR| replace:: :abbr:`MSR (Model-Specific Register)`
.. |MSRs| replace:: :abbr:`MSRs (Model-Specific Registers)`
.. Links
.. _#2010087: https://storyboard.openstack.org/#!/story/2010737
.. _Kubernetes Power Manager: https://github.com/intel/kubernetes-power-manager
.. _Node Feature Discovery: