Open DLfreak opened 3 years ago
Hey @DLfreak it's a great question, simple answer, complicated fix: no it won't separate. Assuming you're using a Linux-based shared infrastructure, we read RAPL files which are written by CPU chips not cores, therefore if you use 10 cores out of the 80 in the machine there's no way to disentangle the energy consumption of your cores.
We are thinking of fixing this issue by looking at such references https://medium.com/teads-engineering/estimating-aws-ec2-instances-power-consumption-c9745e347959 to map cpu usage to energy consumption.
Would you want to help us out on that front and contribute?
vict0rsch - I know that per-process emissions is a trick that Scaphandre, a somewhat similar project written in Rust uses.
I've documented how it works below:
I'm not too familiar with the codecarbon codebase yet, so I'm not sure how the energy figures are pulled from the RAPL and other chips.
If you're able to read figures from the scaphandre binary I think this would provide per process level figures as outlined, but I think you'd need to:
a) introduce the scaphandre binary into the package b) figure out how to read data from it
If you could point me to the class responsible for reading RAPL readings, I'd be up for at least writing some docs on how it might work as a potential piece of work later in the year, and trying to raise some funding to pay for dev time to implement it.
Thanks @mrchrisadams for this documentation, I have an open PR to use CPU load to estimate a per process emissions : https://github.com/mlco2/codecarbon/pull/316
Hello,
Sorry this is not really an issue but I wanted to ask if there are different experiments running on the server, will codecarbon return the emissions for the whole server or just for my experiment with my Process ID? and is it a feature you might add in the future?
Thanks :)