joular / joularjx

JoularJX is a Java-based agent for software power monitoring at the source code level.
https://www.noureddine.org/research/joular/joularjx
GNU General Public License v3.0
71 stars 17 forks source link

Make JoularJX work in VM #36

Closed adelnoureddine closed 2 months ago

adelnoureddine commented 10 months ago

Currently, JoularJX only works on host systems directly, as it requires access to RAPL on PC/servers. RAPL is read through powercap that is only available on hosts and not in guest OS in virtual machines.

Proposed solutions:

adelnoureddine commented 10 months ago

Idea:

Some docs for Qemu/KVM. Similar approach can be made for VirtualBox and VMware as explained in the user guide.

pangteckchun commented 5 months ago

Hi, any updates to this track ? Most apps today run on VMs or k8s hence this bridge will be an important one. Happy to contribute if there some work related to this.

adelnoureddine commented 5 months ago

Thanks @pangteckchun for suggesting to help. We haven't worked much on it due to lack of time now. If you're willing to contribute, it'll be with pleasure.

The main idea I have to implement VM measuring is:

So for JoularJX itself, the works is mainly adding a new implementation for the CPU interface and a couple of properties. Then mostly, testing it in a VM environment (virtualbox or vmware locally for instance), and make sure that the format/value of power monitoring in the host is well understood by JoularJX (scaphandre and powerjoular might provide different output or granularity).

adelnoureddine commented 2 months ago

Support for monitoring inside virtual machines has been merged into our other tool PowerJoular with this pull request. We should be able now to integrate it into JoularJX quite easily as the approach is implemented and tested there.