Getting to Know powerapi
Background
The power consumption of computing centers is increasing, and the power cost of enterprise data centers accounts for an increasing proportion of enterprise operation costs. The industry has shifted from simply pursuing server performance metrics to pursuing energy efficiency. With the continuous improvement of the scale of processor integration, both servers and ultra-large-scale integrated computing systems need to consider energy efficiency. In terms of energy saving, software plays an important role. With the development of hardware, more power consumption metrics and control functions are generated. These functions require software participation to utilize the advantages. openEuler provides powerapi, a lightweight API collection for unified power consumption management of user-mode programs. powerapi shields the complex OS power consumption system calls, especially the differences between interfaces on different hardware platforms, and provides a set of unified measurement and control services.
Overview
powerapi of openEuler is a collection of APIs for managing system power consumption. it provides a standardized method to manage system power usage, including monitoring, adjusting, and optimizing system power consumption. powerapi helps system administrators better manage system energy consumption, thereby improving system efficiency and reliability and reducing energy costs.
powerapi provides unified energy efficiency control of the applications, especially the cluster scheduler. It can control the energy efficiency of the entire system to save energy. For example, powerapi detects the CPU load and the IPC/memory access miss rate, and adjusts the CPU frequency.
powerapi interfaces are provided as .so library functions. Currently, the x86 and Arm platforms are supported.
Features
- Detects the power consumption of each device and the system running status.
- Detects whether the system automatically adjusts the frequency.
- Automatically adjusts the system working status based on the configured policy.
Components
powerapi is provided as an RPM package, which contains the following two components:
- pwrapis: a service process that provides power consumption management services for eagle and third-party systems.
- libpwrapi.so: powerapi SDK, which contains header files and is used for secondary development of applications.