-
Hi everyone, I was wondering if it is possible to get energy consumption metrics per process. Currently, the output from the CSV file provides general metrics, but I’d like to retrieve energy consumption for a specific process, such as nginx. Is there a way to obtain per-process energy consumption using RAPL? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello! RAPL only provides hardware-level information. A processing (transform) step is necessary to compute an estimate of the energy consumed by software components (processes, pods, jobs, whatever) by combining their CPU usage and RAPL energy consumption. This is currently a work in progress. We have a first version of the basic bricks, but there are some caveats. What you need to do:
Example for K8S pods:
We will provide docs, containers and helm charts in the near future :) |
Beta Was this translation helpful? Give feedback.
-
Hey @TheElectronWill , thank you for responding. Is there a way to enable energy attribution? I tried the default way of activating it along with the other plugins, but it didn't work. Also, if I am not wrong, this is the flow for getting the process-level FYI: This is how I started the agent : |
Beta Was this translation helpful? Give feedback.
-
Hello @TheElectronWill, Thank you for clarifying and directing me towards the right steps. I was able to achieve pod-level metrics with energy attribution to each pod. Here are the steps for anyone who might want to try it out: Steps to Set Up Pod-Level Energy Attribution1. Update and Build the Alumet AgentModify
|
metric | timestamp | value | resource_kind | resource_id | consumer_kind | consumer_id | name | namespace | node | uid | __late_attributes |
---|---|---|---|---|---|---|---|---|---|---|---|
cgroup_memory_anonymous_B | 2025-03-28T02:48:17.463295324Z | 1122304 | local_machine | cgroup | /sys/fs/cgroup/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod8435bfbf_d50a_4644_a126_89e51f9daf3d.slice/memory.stat | pod8435bfbf_d50a_4644_a126_89e51f9daf3d | |||||
cgroup_memory_file_B | 2025-03-28T02:48:17.463295324Z | 0 | local_machine | cgroup | /sys/fs/cgroup/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod8435bfbf_d50a_4644_a126_89e51f9daf3d.slice/memory.stat | pod8435bfbf_d50a_4644_a126_89e51f9daf3d |
The uid field contains values like pod8435bfbf_d50a_4644_a126_89e51f9daf3d instead of human-readable pod names.
Beta Was this translation helpful? Give feedback.
Hello @TheElectronWill,
Thank you for clarifying and directing me towards the right steps. I was able to achieve pod-level metrics with energy attribution to each pod. Here are the steps for anyone who might want to try it out:
Steps to Set Up Pod-Level Energy Attribution
1. Update and Build the Alumet Agent
Modify
Cargo.toml
agent
folderModify
main.rs
Add the plugin to the Linux-only plugins list: