Giter VIP home page Giter VIP logo

rapl-formula's Introduction

RAPL-formula

A powerAPI formula using RAPL counters to provides power consumption information of each socket of the monitored machine.

Use RAPL data collected with the hwpc-sensor and convert it into power consumption measures (in Watt). The power consumption measures are store in a MongoDB database.

Quick start

We detail here how to quickly start rapl-formula and connect it to a hwpc-sensor using a mongoDB instance.

For more detail see our documentation here

Get input data

You have to launch the hwpc-sensor to monitor sockets. The sensor must store its data in a mongoDB database. This database must be accessible by the rapl_formula.

Configuration

You can pass the configuration through a file or the CLI. In both case the parameters to precises are the following :

  • verbose (bool)
  • stream (bool): If working with a sensor in real-time
  • input
  • output
  • enable-cpu-formula (bool): Enable CPU formula', default=True
  • enable-dram-formula (bool): Enable DRAM formula, default=True
  • 'cpu-rapl-ref-event (str): RAPL event used as reference for the CPU power models, default='RAPL_ENERGY_PKG'
  • 'dram-rapl-ref-event (str): RAPL event used as reference for the DRAM power models, default='RAPL_ENERGY_DRAM'
  • 'sensor-report-sampling-interval (int): (for stream mode) The frequency with which measurements are made (in milliseconds)

rapl-formula's People

Contributors

altor avatar dromeroac avatar gfieni avatar kayoku avatar ldesauw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rapl-formula's Issues

CSV not working as input or output

Hi, I'm having problems using a csv with the rapl-formula, as the title suggests. Whenever I try to run it (using the commands provided in the documentation) I recieve the following console output:

DEBUG::1673959442.8503227::pusher_power::received message StartMessage
INFO::1673959442.8508985::pusher_power::pusher_power started
DEBUG::1673959442.8619356::cpu_dispatcher::received message StartMessage
INFO::1673959442.8625019::cpu_dispatcher::cpu_dispatcher started
DEBUG::1673959442.8739498::puller::received message StartMessage
INFO::1673959442.874641::puller::puller started
WARNING::1673959442.941727::puller::received unrecognized message : Poison<WakeupMessage(0:00:00.050000, None)>: Traceback (most recent call last):
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/actorManager.py", line 163, in _handleOneMessage
actor_result = self.actorInst.receiveMessage(msg, envelope.sender)
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/actors.py", line 838, in receiveMessage
r = getattr(klass, methodName)(self, message, sender)
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/actor.py", line 188, in receiveMsg_WakeupMessage
self._launch_task()
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/puller.py", line 97, in _launch_task
raw_report = self._pull_database()
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/puller.py", line 132, in _pull_database
return next(self.database_it)
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/database/csvdb.py", line 136, in next
current_timestamp = self.saved_timestamp
AttributeError: 'CsvIterDB' object has no attribute 'saved_timestamp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/actorManager.py", line 178, in _handleOneMessage
actor_result = self.actorInst.receiveMessage(copy.deepcopy(msg), envelope.sender)
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/actors.py", line 838, in receiveMessage
r = getattr(klass, methodName)(self, message, sender)
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/actor.py", line 188, in receiveMsg_WakeupMessage
self._launch_task()
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/puller.py", line 97, in _launch_task
raw_report = self._pull_database()
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/puller.py", line 132, in _pull_database
return next(self.database_it)
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/database/csvdb.py", line 136, in next
current_timestamp = self.saved_timestamp
AttributeError: 'CsvIterDB' object has no attribute 'saved_timestamp'

Is there anything I can do to fix this issue?

DRAM power consumption formula problems

Hi,
I was using the option in the rapl-formula for measuring the dram consumption. But after running the senor, I try to start the docker for rapl-formula I get the error:
Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/powerapi/.local/lib/python3.8/site-packages/rapl_formula/main.py", line 257, in
run_rapl(conf)
File "/opt/powerapi/.local/lib/python3.8/site-packages/rapl_formula/main.py", line 181, in run_rapl
supervisor.launch(puller_cls, puller_start_message)
File "/opt/powerapi/.local/lib/python3.8/site-packages/powerapi/supervisor.py", line 128, in launch
answer = self.system.ask(address, start_message) File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/actors.py", line 736, in ask
return self._systemBase.ask(actorAddr, msg, timeout)
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/systemBase.py", line 261, in ask
txwatch = self._tx_to_actor(anActor, msg) # KWQ: pass timeout on tx??
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/systemBase.py", line 154, in _tx_to_actor
self.transport.scheduleTransmit(
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/transport/asyncTransportBase.py", line 213, in scheduleTransmit
transmitIntent.serMsg = self.serializer(transmitIntent)
File "/opt/powerapi/.local/lib/python3.8/site-packages/thespian/system/transport/MultiprocessQueueTransport.py", line 714, in serializer
discard = pickle.dumps(wrappedMsg)
AttributeError: Can't pickle local object 'setup_dram_formula_actor..'
If I can have some assistance?
Thank you.

CLI - Shortcuts for MongoDB & DB parameters

When input/output databases are the same, one could use a single option to set both input/ouput with the same values. This could typically apply to the DB URI and the DB name.

DOC - Documentation of GPU power measurements

Beyond CPU power measurements reported by RAPL, it would be good to share an example for reporting GPU power measurements when the associated counters are made available by the underlying system.

Problem with database OUTPUT name

Hi, i'm currently working with POWERAPI to estimate the power consumption. But actually i've got a little problem with influxDB output to display these data in Grafana.
I'm using a docker with powerapi-sensor, all is working at this point. I use another docker for rapl-formula. I use this command : docker run -td --net=host --name powerapi-formula powerapi/rapl-formula -s --input mongodb -u mongodb://localhost:8425 -d powerapi -c sensor --output influxdb --uri localhost --port 8086 --db power_consumption --name grafana_output All is working with this command.
But when i change the --db option to another name like --db test It doesn't work. The database is created but get no data. Do we have to name our database "power_consumption"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.