Kepler

Purpose:: Analyse Kubernetes power consumption and visualize it
Type:: #tool/dev

Website:: https://sustainable-computing.io/
Docs:: https://sustainable-computing.io/installation/kepler/
Source Code:: https://github.com/sustainable-computing-io/kepler
Community:: https://github.com/sustainable-computing-io/kepler/discussions

Description

Kepler = Kubernetes-based Efficient Power Level Exporter

Kepler (Kubernetes-based Efficient Power Level Exporter) is a Prometheus exporter. It uses eBPF to probe CPU performance counters and Linux kernel tracepoints.

These data and stats from cgroup and sysfs can then be fed into ML models to estimate energy consumption by Pods.

Technology Radar (ThoughtWorks)

Assess as of April 2023

Measuring energy consumption is an important step for teams to reduce the carbon footprint of their software. Cloud Carbon Footprint (CCF) estimates energy based on billing and usage data retrieved from cloud APIs. Kepler β€” short for Kubernetes-based Efficient Power Level Exporter β€” goes one step further: it uses software counters via RAPL, ACPI and nvml to measure power consumption by hardware resources and employs an eBPF-based approach to attribute power consumption to processes, containers and Kubernetes pods.

β€” Kepler | Technology Radar | Thoughtworks

Methodology

Collecting System Power Consumption

Kepler-1703088961600.jpeg

Source: https://www.cncf.io/blog/2023/10/11/exploring-keplers-potentials-unveiling-cloud-application-power-consumption/

Data sources on bare-metal (Kepler Energy Sources):

There are 3 model approaches:

Baremetal with x86 architecture and no power meter:

Per Process/Container Measurement

More information:

See also Measure energy consumption of software per process.

Isolating Idle Power

Sunyanan Choochotkaew, Marcelo Amaral, Huamin Chen - – Idle Power Matters- Kepler Metrics for Pub...

Idle Power Matters: Kepler Metrics for Public Cloud Energy Efficiency | CNCF TAG Environmental Sustainability ‴

It is crucial to isolate idle power from dynamic power for reasons including fair attribution of power consumption to applications and to help create more accurate power models.

Installation

Using Helm

GitHub - sustainable-computing-io/kepler-helm-chart

Add helm repo:

helm repo add kepler https://sustainable-computing-io.github.io/kepler-helm-chart

Install:

helm install kepler kepler/kepler --namespace kepler --create-namespace

Uninstall:

helm delete kepler --namespace kepler

Estimation

If Kepler doesn't have access to interfaces like RAPL, it uses model-based estimation approach.

In the most minimal deployment, a Local Linear Regression Estimator is used that uses usage metrics to estimate power consumption. No special configuration or extra deployment is required.

If you want to get a model with better estimation accuracy, Kepler may connect to a remote Kepler Model Server.

More Information: Kepler Power Estimation Deployment

Models

Model Version 0.7: https://github.com/sustainable-computing-io/kepler-model-db/tree/main/models/v0.7

Model Server

GitHub - sustainable-computing-io/kepler-model-server: Model Server for Kepler

πŸ”— References

Articles:

Podcasts:

Research Papers: