Skip to content

Commit

Permalink
Fix typo in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
LudovicRousseau authored Mar 8, 2021
1 parent f307075 commit 1f616a8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h1><a class="header" href="#how-scaphandre-computes-per-process-power-consumpti
<h2><a class="header" href="#some-details-about-rapl" id="some-details-about-rapl">Some details about RAPL</a></h2>
<p>We'll talk here about the case where scaphandre is able to effectively measure the power consumption of the host (see <a href="../compatibility.html">compatibility</a> section for more on sensors and their prerequesites) and specifically about the <a href="../references/sensor-powercap_rapl.html">PowercapRAPL</a> sensor.</p>
<p>Let's clarify what's happening when you collect metrics with scaphandre and this sensor.
RAPL stands for <a href="https://01.org/blogs/2014/running-average-power-limit-%E2%80%93-rapl">Running Average Power Limit</a>. It's a technnology embedded in most Intel and AMD x86 CPUs produced afeter 2012. Thanks to this technology it is possible to get the total energy consumption of the CPU, of the consumption per CPU socket, plus in some cases, the consumption of the DRAM controller. In most cases it represents the vast majority of the energy consumption of the machine (except when running GPU intensive workloads, for example). Further improvements shall be made in scaphandre to fully measure the consumption when GPU are involved (or a lot of hard drives on the same host...).</p>
RAPL stands for <a href="https://01.org/blogs/2014/running-average-power-limit-%E2%80%93-rapl">Running Average Power Limit</a>. It's a technnology embedded in most Intel and AMD x86 CPUs produced after 2012. Thanks to this technology it is possible to get the total energy consumption of the CPU, of the consumption per CPU socket, plus in some cases, the consumption of the DRAM controller. In most cases it represents the vast majority of the energy consumption of the machine (except when running GPU intensive workloads, for example). Further improvements shall be made in scaphandre to fully measure the consumption when GPU are involved (or a lot of hard drives on the same host...).</p>
<p>Between scaphandre and those data is the powercap kernel module that writes the energy consumption in files. Scaphandre, reads those files, stores the data in buffer and then allows for more processing through the exporters.</p>
<h2><a class="header" href="#how-to-get-the-consumption-of-one-process-" id="how-to-get-the-consumption-of-one-process-">How to get the consumption of one process ?</a></h2>
<p>The PowercapRAPL sensor does actually some more than just collecting those energy consumption metrics (and casting it in power consumption metrics). Every time the exporter asks for a measurement (either periodically like in the <a href="../references/exporter-stdout.html">Stdout</a> exporter, or every time a request comes like for the Prometheus exporter) the sensor reads the values of the energy counters from powercap, stores those values and does the same for the CPU usage statistics of the CPU (the one you can see in <code>/proc/stats</code>) and for each running process on the machine at that time (see <code>/proc/PID/stats</code>). With those data it is possible to compute the ratio of CPU time actively spent for a given PID on the CPU time actively spent doing something. With this ratio we can then get the subset of power consumption that is related to that PID on a given timeframe (between two measurement requests).</p>
Expand Down

0 comments on commit 1f616a8

Please sign in to comment.