Report virtual machine energy consumption based on RAPL

Registered by Cyril Lopez on 2021-05-05

Carbon cost is now followed by company to report publicly how many they create CO2 and What action they take to be more virtuous.

With RAPL [1] we can know how many energy (in Watt) a process consume.

I already tested an implementation named Scaphandre [2] for this calculation with OpenStack Victoria and it works pretty well. Example of Grafana : https://ibb.co/RzMbkKM https://ibb.co/dPY21kb

I propose to implement this metric in ceilometer.

As user, I will be able to know how many "Watt per hour" I consume for a virtual machine / project.

Note : This result will be partially true because with RAPL we will get only CPU consumption and we will forget Disk / Network / GPU. But from my test, this is significant

[1] https://www.kernel.org/doc/html/latest/power/powercap/powercap.html
[2] https://github.com/hubblo-org/scaphandre/

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Cyril Lopez
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.