Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 02 2015 09:05
    mcolmant synchronize #67
  • Jun 02 2015 09:05

    mcolmant on #58

    fix(#58): Refactors the Configu… (compare)

  • Jun 02 2015 09:00

    rouvoy on fix#59

    (compare)

  • Jun 02 2015 09:00

    rouvoy on develop

    fix(#59): Increases the actor t… Merge pull request #68 from Spi… (compare)

  • Jun 02 2015 09:00
    rouvoy closed #68
  • Jun 02 2015 09:00

    rouvoy on #54

    (compare)

  • Jun 02 2015 09:00

    rouvoy on develop

    fix(#54): Refactors the LibpfmC… Merge pull request #66 from Spi… (compare)

  • Jun 02 2015 09:00
    rouvoy closed #66
  • Jun 02 2015 08:47

    mcolmant on #54

    fix(#54): Refactors the LibpfmC… (compare)

  • Jun 02 2015 08:47
    mcolmant synchronize #66
  • Jun 01 2015 14:47
    mcolmant synchronize #66
  • Jun 01 2015 14:47

    mcolmant on #54

    fix(#54): Refactors the LibpfmC… (compare)

  • Jun 01 2015 13:30
    mcolmant closed #59
  • Jun 01 2015 13:29
    mcolmant assigned #68
  • Jun 01 2015 13:29
    mcolmant labeled #68
  • Jun 01 2015 13:29
    mcolmant opened #68
  • Jun 01 2015 13:26

    mcolmant on fix#59

    fix(#59): Increases the actor t… (compare)

  • Jun 01 2015 13:16
    mcolmant closed #60
  • Jun 01 2015 13:16
    mcolmant commented #60
  • Jun 01 2015 13:16
    mcolmant assigned #60
GreenFLOPS
@greenflops
btw Ilook for a similar tool to measure power on GPUs and FPGAs...
Maxime Colmant
@mcolmant
Ok then PowerAPI is not designed to work on such component, but being modular, it is thus possible to create new models for fitting your needs. We plan to study and to model the GPU power consumption but it is not yet scheduled
Romain Masclef
@RMasclef_twitter

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 !

Romain Masclef
@RMasclef_twitter

I also should tell you that I am completely novice in Scala and Maven :/

Again, thank you for your answer !

Maxime Colmant
@mcolmant
Hi,
The powerapi-akka is the root base of Spirals-Team, but it is not updated anymore.
The current up-to-date repo is https://github.com/Spirals-Team/powerapi
For now, we have only a CPU module which works correctly.
We made the choice to not investigate the RAM anymore because our experiments have shown that the RAM power consumption follows a contant value (just trigerred where the RAM in ON or OFF).
I’m currently working on the SSD power consumption, but it is under progress, sorry.
Romain Masclef
@RMasclef_twitter

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 !

Maxime Colmant
@mcolmant

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.

https://hal.inria.fr/hal-01130030

dsilva0101
@dsilva0101
Hello, I am new to this area of measuring power consumption and would like to use the PowerAPI tool. I downloaded the file and I already unpacked it. But now I do not know how to install ... can anyone help me?
Maxime Colmant
@mcolmant
Hi, thanks for using PowerAPI? You don’t have to install anything from the archive to get it works.
You can directly use the ./bin/powerapi command instead (if you already have java installed).
You can also check the wiki to have more information about the configuration of PowerAPI.
Cheers,
dsilva0101
@dsilva0101
Thank you very much Do you have any installation prerequisites (sbt)? Because I have Java installed, but it is not going ...
Maxime Colmant
@mcolmant
Can you send me the error message?
Which files do you download? The CLI or the repository?
dsilva0101
@dsilva0101
I downloaded the CLI. I unzipped everything in /bin. But when I type ./bin/powerapi it says that the directory was not found, and in fact doesn't have any powerapi folder there
Maxime Colmant
@mcolmant
Ok, just unzipped the CLI somewhere (in your Desktop for example).
The archive is composed on several folders (bin, conf, scripts,…).
You have just to go inside the root folder of PowerAPI, configure it (check the Wiki), and use ./bin/powerapi from this folder
dsilva0101
@dsilva0101
Thank you, I did it. Now I will see the Wiki to know how to use.
dsilva0101
@dsilva0101
Hello, I installed the PowerAPI tool and it is working perfectly. But, I would like to understand why it is necessary to add TDP, why?.... Thank you
dsilva0101
@dsilva0101
Can anyone give me a hint of what to do so that the PowerAPI tool monitors an application before it starts running? So that I do not lose any information of the initial energy consumption of the application? Because as I have to pass the PID of the application to the tool, it only starts to monitor the application after it has started, so I lose information of the initial consumption.
Pranav Gupta
@phgupta

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

Maxime Colmant
@mcolmant

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]

Maxime Colmant
@mcolmant

@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 $PIDto start the program and thus measuring its startup power consumption.

Pranav Gupta
@phgupta

@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)
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)

I tried fixing it by adding the following code in akka.conf (later I tried adding the c

  • I tried fixing it by adding the following code in akka.conf (later I tried adding the code in application.conf too) but it gave me a similar error
    akka {
    jvm-exit-on-fatal-error = false
    }

Do you know what's wrong?

Thank you!

Maxime Colmant
@mcolmant
Hi, which version of PowerAPI did you use?
The bug has been fixed in a previous release and I’m able to use this module with the release 4.0.
Pranav Gupta
@phgupta
It works! Thank you so much. One last question, under devices there’s only CPU. Does that mean PowerAPI does not take into account power consumption due to network?
Maxime Colmant
@mcolmant

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.

Pranav Gupta
@phgupta
Hi @mcolmant , I’m conducting energy measurements on programs that rely heavily on floating-point precision. I was curious to know if PowerAPI specifically takes into account floating point instructions or not. Thanks
Maxime Colmant
@mcolmant

Hi, sorry for the delay.

Not for the simple version that uses the TDP, we cannot distinguish the operation type. However, we already propose several alternatives but they require to have a power meter to learn a power model.

mos424
@mos424
Hi, I tried to use Power API to measure the power consumption of an intel i3 processor (default setting is : 2 physical cores for 4 logical cores) in case of differents core settings. I would like to know if power API is still able to measure correctly the power consumption of a given multi-core processor if some of these cores are disabled ( from the BIOS settings( physical cores) and from the OS (logical cores)). because I tried to do so and the obtained measurement do not seem to be correct. is there a way to make these kind of measurements correctly with Power API? how can I know that the measurement are correct ? I also would like to know which kind of power does provide Power API, is it active power, MAX power or RMS power ...? thank you very much for all your answers.
Maxime Colmant
@mcolmant

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,

ranidentity
@ranidentity
Hi, i am new to power measurement. ok straight to the point.
i tried with the powerapi modules procfs-cpu-simple monitor --frequency 1000 --pids xxx
and somehow i get 0 mhz.
I already set the TDP as 47 ( get from googling my laptop spec)
image.png
ranidentity
@ranidentity
Anyone here?
Romain Rouvoy
@rouvoy
@ranidentity Can you give us a bit more context? Was is the machine your are using for running PowerAPI and which command line did you execute ?
ranidentity
@ranidentity
@rouvoy i open an issue thread at the github. Anyway can you check on the download links on the github? i trying to download the PowerAPI but fail to do so
fernandobohrer
@fernandobohrer
Hi there! I'm having some problems with the last version [4.2] of powerapi running in command line mode. I created a systemd service that sends the output from the powerapi to an influxdb database but from times to times the powerapi process dies with no apparent reason. After some time the systemd is able to restart the process and everything works perfectly until the next episode of process dying. Are there any special requirements to run powerapi? I'm having this scenario in 6 different machines running RHEL 7. Any help would be great. Thanks!
dsilva0101
@dsilva0101
@rouvoy Hi! According to an article that I read, the PowerAPI tool monitors the power consumption for component? How do I monitor the power consumed by memory and disk for example. By the cpu I know that I have to use the procfs-cpu-simple module. Can someone help me?
Muyassarov Feruz
@mFeruz_gitlab
Hi. I am doing a project to measure energy consumption of application running on bare metal. Thus, according to comments I chose to use powerapi over bitWatts. However, I can't really download CLI from the following link https://github.com/Spirals-Team/powerapi/wiki/Getting-started-CLI, because it prompts 404 error. Second, if I clone it from the git repo, what should I do afterwards to get values of power consumption? I have Java, Maven installed, but I am confused with the steps? Can someone please share the installation steps and how to run experiments? I know that there are wiki pages related to powerapi but not installation guide. Thank you very much in advance.
Thibault Béziers la Fosse
@orichalque

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.

Muyassarov Feruz
@mFeruz_gitlab
Hi @orichalque , First of all thank you very much. Now, it is more clear. So, what I did is:
  1. clone the powerapi rep (git clone git://github.com/Spirals-Team/powerapi)
  2. Compile it ($ sudo sbt publishLocal)
  3. Include repository location in build.sbt file as mentioned in https://github.com/Spirals-Team/powerapi/wiki/Getting-started-API
             (resolvers ++= Seq("OSS Sonatype snapshot repository" at 
              "https://oss.sonatype.org/content/repositories/snapshots")
  4. Create a scala file with the following code (I added my processeor's TDP):
       def run(pid: Int): Unit = {
    val module = new CpuSimpleModule(new LinuxHelper, 15, 0.7)
    val cpu = PowerMeter.loadModule(ProcFSCpuSimpleModule())
    monitoring = cpu.monitor(Process(8052))
                 .every(100)
                 .to(JFreeChartDisplay)
    }
    def stop(): Unit = {
    monitoring.cancel()
    }
  5. Compile this scala file
  6. and expect for nice chart:)), which is not there yet((. Could you please confirm that I am not missing anything here. Thank you for your time and attention.
Thibault Béziers la Fosse
@orichalque
Hi, this seems ok, except that you declare a val module with your tpd but use a different one (i.e. ProcFSCpuSimpleModule()) in your PowerMeter :)
Muyassarov Feruz
@mFeruz_gitlab
@orichalque Thanks a lot, got it
Headphone jack
@ujjwalsays1_twitter
Can I use PowerAPI to profile c code ?
Thibault Béziers la Fosse
@orichalque
Hey @ujjwalsays1_twitter ,
I guess you can start the CLI of PowerAPI, giving it the PID of your running C code and it would work
./bin/powerapi \
    modules procfs-cpu-simple \
    monitor \
      --frequency 500 \
      --pids your_C_program \
      --console
Headphone jack
@ujjwalsays1_twitter
i want to profile the specific function inside c code.
Thibault Béziers la Fosse
@orichalque
Does instrumenting your C code in order to start PowerAPI at the start of the function would work ?
Headphone jack
@ujjwalsays1_twitter
@orichalque i didn't get exactly what are you saying. How can i call PowerAPI at the starting of function?
Thibault Béziers la Fosse
@orichalque
Well, you have to get the PID of your C code at runtime, and then start powerAPI using system command line (I guess, I'm really not good at C)
If you cannot modify the C source code to do that, you may have to instrument the compiled code.
I hope that's clearer :/