mcolmant on #58
fix(#58): Refactors the Configu… (compare)
rouvoy on fix#59
rouvoy on develop
fix(#59): Increases the actor t… Merge pull request #68 from Spi… (compare)
rouvoy on #54
rouvoy on develop
fix(#54): Refactors the LibpfmC… Merge pull request #66 from Spi… (compare)
mcolmant on #54
fix(#54): Refactors the LibpfmC… (compare)
mcolmant on #54
fix(#54): Refactors the LibpfmC… (compare)
mcolmant on fix#59
fix(#59): Increases the actor t… (compare)
Hi, I just read the spirals-Team/powerapi documentation and I wonder where to find some modules to be use to get the disk and the memory consumption ...
As I can see on the module section (https://github.com/Spirals-Team/powerapi/wiki/Modules) there are "just" CPU modules ...
I also read the https://github.com/abourdon/powerapi-akka and I don't know which one I should use ... the spirals-Team seems to be a fork of the abourdon one ...
Thanks for your helop !
powerapi-akka
is the root base of Spirals-Team
, but it is not updated anymore.https://github.com/Spirals-Team/powerapi
Hi,
Thanks a lot for your answer !
It would be nice if you clarify this in the https://github.com/Spirals-Team/powerapi
documentation.
Do you have any public report about your experiments on the RAM power consumption ? I'd love to read about it :smile:
Can powerAPI calculate the global energy consumption of a system or a software ?
Don't be sorry, I can understand that it takes a lot of time to do all this work !
Hi, sorry for the late answer.
For the RAM power consumption, if you are on Linux and having a recent processor (since the Sandy Bridge architecture), you can try to play with RAPL (Running Average Power Limit).
You will get the global power estimation for the CPU/Mem intensive workloads for a software or the computer.
If you want the global power consumption, you can use the PowerSpy power meter and then plug it into PowerSPY (module already created).
Cheers,
Process-level Power Estimation in VM-based Systems: M. Colmant, M. Kurpicz, L. Huertas, R. Rouvoy, P. Felber, A. Sobe. European Conference on Computer Systems (EuroSys). April 2015, Bordeaux, France. pp.1-14.
./bin/powerapi
command instead (if you already have java installed).Hi, I’m looking to calculate the dynamic power consumption of websites (eg. calculating power consumed while browsing through YouTube/Facebook for 10 minutes) I’m using a Mac and I downloaded PowerAPI cli from https://github.com/Spirals-Team/powerapi/wiki/Getting-started-CLI and ran the following command from the root folder,
./bin/powerapi modules procfs-cpu-simple monitor --frequency 1000 --pids 808
where the PID 808 is a YouTube video playing in Chrome.
However, the results showed 0 power consumption.
muid=05b695ae-d242-4661-9c94-76bfd06864ed;timestamp=1484883156823;target=808;devices=cpu;power=0.0
muid=05b695ae-d242-4661-9c94-76bfd06864ed;timestamp=1484883157826;target=808;devices=cpu;power=0.0
muid=05b695ae-d242-4661-9c94-76bfd06864ed;timestamp=1484883158834;target=808;devices=cpu;power=0.0
muid=05b695ae-d242-4661-9c94-76bfd06864ed;timestamp=1484883159835;target=808;devices=cpu;power=0.0
.
.
.
I want to know if PowerAPI can in fact calculate the power consumption of websites and if so, what command should I execute?
Thanks
Hello, sorry for the delay ;)
Thanks for using PowerAPI.
You can use PowerAPI to monitor the power consumption of your web browser. If I use your example on MacOS, I would execute instead:
./bin/powerapi modules sigar-cpu-simple monitor --frequency 1000 --pids 808
(MacOS does not have the ProcFS interface).
Did you correctly configure PowerAPI? If not, please look at: https://github.com/Spirals-Team/powerapi/wiki/procfs-cpu-simple.
You have to find the TDP of your CPU in the Intel documentation (just use the reference of your CPU inside google and check the Intel website, you will easily find this information).
Once found, edit the file: conf/powerapi.conf
with the parameter powerapi.cpu.tdp = [YOUR_OWN_TDP_VALUE]
@dsilva0101 We use the TDP as a basis to get the maximum power consumption dissipated by the CPU and to easily provide a power estimation at runtime ;)
If you want to be able to measure the startup power consumption, you will have to do it manually.
You can check this bash script: https://github.com/Spirals-Team/powerapi/blob/master/powerapi-sampling-cpu/src/universal/scripts/start.bash.
As an example, you can use it as follows:
./start.bash stress -c 2 -t 10
This command will create a process, print its PID to the console, and wait a signal before to launch the program with its arguments.
You can next launch PowerAPI with this PID and start the power monitoring.
Once PowerAPI prints text, you can use kill -s SIGCONT $PID
to start the program and thus measuring its startup power consumption.
@mcolmant So I executed the command you told me to and it gave me an error:
Uncaught error from thread [PowerMeter-78546464544537-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[PowerMeter-78546464544537]
java.lang.UnsatisfiedLinkError: org.hyperic.sigar.ptql.SigarProcessQuery.create(Ljava/lang/String;)V
at org.hyperic.sigar.ptql.SigarProcessQuery.create(Native Method)
at org.hyperic.sigar.ptql.ProcessQueryFactory.getQuery(ProcessQueryFactory.java:66)
at org.hyperic.sigar.ptql.ProcessFinder.find(ProcessFinder.java:68)
at org.hyperic.sigar.ptql.ProcessFinder.find(ProcessFinder.java:62)
at org.powerapi.core.SigarHelper.getProcessCpuPercent(OSHelper.scala:464)
at org.powerapi.core.OSHelper$class.getTargetCpuPercent(OSHelper.scala:161)
at org.powerapi.core.SigarHelper.getTargetCpuPercent(OSHelper.scala:410)
at org.powerapi.module.cpu.simple.CpuSensor.targetCpuUsageRatio(CpuSensor.scala:51)
at org.powerapi.module.cpu.simple.CpuSensor.sense(CpuSensor.scala:59)
at org.powerapi.module.SensorComponent
KaTeX parse error: Unexpected character: '$' at position 7: anonfun̲$receive$1.app: anonfun$receive$1.applyOrElse(SensorComponent.scala:45)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170)
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
at org.powerapi.module.SensorComponent.aroundReceive(SensorComponent.scala:36)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[ERROR] [01/24/2017 21:14:04.917] [PowerMeter-78546464544537-akka.actor.default-dispatcher-2] [ActorSystem(PowerMeter-78546464544537)] Uncaught error from thread [PowerMeter-78546464544537-akka.actor.default-dispatcher-2] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.UnsatisfiedLinkError: org.hyperic.sigar.ptql.SigarProcessQuery.create(Ljava/lang/String;)V
at org.hyperic.sigar.ptql.SigarProcessQuery.create(Native Method)
at org.hyperic.sigar.ptql.ProcessQueryFactory.getQuery(ProcessQueryFactory.java:66)
at org.hyperic.sigar.ptql.ProcessFinder.find(ProcessFinder.java:68)
at org.hyperic.sigar.ptql.ProcessFinder.find(ProcessFinder.java:62)
at org.powerapi.core.SigarHelper.getProcessCpuPercent(OSHelper.scala:464)
at org.powerapi.core.OSHelper$class.getTargetCpuPercent(OSHelper.scala:161)
at org.powerapi.core.SigarHelper.getTargetCpuPercent(OSHelper.scala:410)
at org.powerapi.module.cpu.simple.CpuSensor.targetCpuUsageRatio(CpuSensor.scala:51)
at org.powerapi.module.cpu.simple.CpuSensor.sense(CpuSensor.scala:59)
at org.powerapi.module.SensorComponent
anonfun$receive$1.applyOrElse(SensorComponent.scala:45)I tried fixing it by adding the following code in akka.conf (later I tried adding the c
Do you know what's wrong?
Thank you!
You are right, we do not propose such module at this time, @rouvoy already has the opportunity to answer this question ;)
Do not hesitate if you have any question.
Our experience till date on measuring the power consumption of network for servers has shown that the power consumption of the network interface was dominated by the power consumption of CPU spent on networking tasks. Regarding the WiFi, we have no module available yet, but beyond the aforementioned issue, the power consumption of the wireless interface will highly depend on the quality of the signal strength.
Hello, sorry for the answer delay, I did not receive the notification.
What measures did you get? What kind of software systems do you want to target?
For the simple module, PowerAPI uses the TDP (maximal dissipation power) to approximate the power consumption of running software.
To assess our results, we use a PowerSPY bluetooth power meter.
If you target multi-core systems, please check this research paper.
Thank you,
Hi @mFeruz_gitlab , there's a maven dependency specified here: https://github.com/Spirals-Team/powerapi/wiki/Getting-started-API
You'll be able to use powerapi through this dependency. I'll paste you a sample of the code I use to measure the power of a process.
def run(pid: Int): Unit = {
val module = new CpuSimpleModule(new LinuxHelper, tdp, tdpFactor)
val cpu = PowerMeter.loadModule(module)
monitoring = cpu.monitor(Process(pid))
.every(frequency)
.to(console)
}
def stop(): Unit = {
monitoring.cancel()
}
tdp and tdp factor depend on your CPU. You might want to check the characteristics. The console I use is the JFreeChartDisplay
. It'll show the power consumption in a nice chart. But I'm sure there's plenty of other options, especially if you want to save the data. Of course, if you're not running with Linux, don't use the LinuxHelper ;-)
I hope it helps.
(resolvers ++= Seq("OSS Sonatype snapshot repository" at
"https://oss.sonatype.org/content/repositories/snapshots")
def run(pid: Int): Unit = {
val module = new CpuSimpleModule(new LinuxHelper, 15, 0.7) .every(100)
.to(JFreeChartDisplay)
}./bin/powerapi \
modules procfs-cpu-simple \
monitor \
--frequency 500 \
--pids your_C_program \
--console