CPU Energy Meter: A Tool for Energy-Aware Algorithms Engineering
CC Attribution 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Beyer, Dirk
Verification algorithms are among the most resource-intensive computation tasks. Saving energy is important for our living environment and to save cost in data centers. Yet, researchers compare the efficiency of algorithms still in terms of consumption of CPU time (or even wall time). Perhaps one reason for this is that measuring energy consumption of computational processes is not as convenient as measuring the consumed time and there is no sufficient tool support. To close this gap, we contribute CPU Energy Meter , a small tool that takes care of reading the energy values that Intel CPUs track inside the chip. In order to make energy measurements as easy as possible, we integrated CPU Energy Meter into BenchExec , a benchmarking tool that is already used by many researchers and competitions in the domain of formal methods. As evidence for usefulness, we explored the energy consumption of some state-of-the-art verifiers and report some interesting insights, for example, that energy consumption is not necessarily correlated with CPU time.
 Welcome! This presentation provides an overview over CPU energy meter, which is a tool that helps with energy-aware algorithms engineering. My name is Dick Beyer, I am from LMU Munich in Germany and this is joint work with Philipp Wendler. First, why should we measure energy? Well, verification consumes a lot of it and green methods are needed. But we do not know how much energy is consumed. You cannot improve what you cannot measure. But how can we measure energy? We can use an energy meter, but this requires additional hardware and a complex setup, while it provides a low measurement resolution and is not doable for shared machines. A possible solution is to use Intel's Rappel interface. The CPU has energy counters that you can read, comes for free with most Intel CPUs. It's a great resolution, measures all main components. CPU energy meter is a small program that reads the counters for you. It is open source, available on Debian and Ubuntu as package. It's integrated with BenchExec, which you probably use already anyway. For example, you can run the tool and let it measure the energy consumption until you stop it. This is shown in this example here. At the top it shows the command and that you can then break it with control C. And at the bottom you see the output of the CPU energy meter. It shows you the various energy consumptions for various parts. Or you can start it together with a program of which you want to measure the energy consumption. Most elegant is to use it with BenchExec, which also lets you set time limits, memory limits and so on using the C Group's kernel features. It spits out all the measurements and it provides an easy to process format. BenchExec can be used to generate nice tables of the results. And it is simple now to add a new column that reports the energy. And as a tooltip we can also have statistics regarding evaluation of the tool. Let's do some simple analysis on results of SVComp. The competition on software verification uses CPU energy meters in several years. The first insight is the power usage varies a lot across tools and across verification tasks. As you can see in the tools get uploads on the left for CBMC and on the right for CPA checker. The X axis shows the wall time and the Y axis shows the CPU energy. As you can see, for example, looking at the wall time of about 850 seconds or so, you see a large vertical column. And this shows that although the wall time is the same for all those blue results, the energy varies greatly. The second insight is high values for CPU time do not imply high values for energy consumption. This is get uploads show. Again on the left CBMC on the right CPA checker. The third insight is comparing algorithms regarding CPU time can lead to different conclusions than comparing energy consumption. On the left we compare the CPU time of CBMC versus CPA checker. On the right we compare the energy consumption of the two tools on SVComp verification runs. To conclude, energy-aware research is becoming more important. Energy measurement is more difficult than time measurement. And time is not a good proxy for energy consumption. So the solution is measure energy as far as possible with the Rappel interface using CPU energy meter and add energy efficiency as a measure to competitions and performance evaluations. So with NGXIC and CPU energy meter, there is no excuse left. Thank you for your interest in energy measurement and in our tool. Please have a look at our paper. References given on the title page. The next slide has also some references to look up and my slides are also available on my webpage.
 Welcome! This presentation provides an overview over CPU energy meter, which is a tool that  helps with energy-aware algorithms engineering. My name is Dick Beyer, I am from LMU Munich  in Germany and this is joint work with Philipp Wendler. First, why should we measure energy?  Well, verification consumes a lot of it and green methods are needed. But we do not know  how much energy is consumed. You cannot improve what you cannot measure. But how can we measure  energy? We can use an energy meter, but this requires additional hardware and a complex  setup, while it provides a low measurement resolution and is not doable for shared machines.  A possible solution is to use Intel's Rappel interface. The CPU has energy counters that  you can read, comes for free with most Intel CPUs. It's a great resolution, measures all  main components. CPU energy meter is a small program that reads the counters for you. It  is open source, available on Debian and Ubuntu as package. It's integrated with BenchExec,  which you probably use already anyway. For example, you can run the tool and let it measure  the energy consumption until you stop it. This is shown in this example here. At the  top it shows the command and that you can then break it with control C. And at the bottom  you see the output of the CPU energy meter. It shows you the various energy consumptions  for various parts. Or you can start it together with a program of which you want to measure  the energy consumption. Most elegant is to use it with BenchExec, which also lets you  set time limits, memory limits and so on using the C Group's kernel features. It spits  out all the measurements and it provides an easy to process format. BenchExec can be used  to generate nice tables of the results. And it is simple now to add a new column that  reports the energy. And as a tooltip we can also have statistics regarding evaluation of  the tool. Let's do some simple analysis on results of SVComp. The competition on software  verification uses CPU energy meters in several years. The first insight is the power usage  varies a lot across tools and across verification tasks. As you can see in the tools get uploads  on the left for CBMC and on the right for CPA checker. The X axis shows the wall time  and the Y axis shows the CPU energy. As you can see, for example, looking at the wall  time of about 850 seconds or so, you see a large vertical column. And this shows that  although the wall time is the same for all those blue results, the energy varies greatly.  The second insight is high values for CPU time do not imply high values for energy consumption.  This is get uploads show. Again on the left CBMC on the right CPA checker. The third insight  is comparing algorithms regarding CPU time can lead to different conclusions than comparing  energy consumption. On the left we compare the CPU time of CBMC versus CPA checker. On  the right we compare the energy consumption of the two tools on SVComp verification runs.  To conclude, energy-aware research is becoming more important. Energy measurement is more  difficult than time measurement. And time is not a good proxy for energy consumption.  So the solution is measure energy as far as possible with the Rappel interface using CPU  energy meter and add energy efficiency as a measure to competitions and performance evaluations.  So with NGXIC and CPU energy meter, there is no excuse left. Thank you for your interest  in energy measurement and in our tool. Please have a look at our paper. References given  on the title page. The next slide has also some references to look up and my slides are  also available on my webpage.
604907f51a80aac83ca25d87_0_527.png 604907f51a80aac83ca25d87_528_2843.png 604907f51a80aac83ca25d87_2844_2999.png 604907f51a80aac83ca25d87_3000_3623.png 604907f51a80aac83ca25d87_3624_5315.png 604907f51a80aac83ca25d87_5316_6671.png 604907f51a80aac83ca25d87_6672_7223.png 604907f51a80aac83ca25d87_7224_9251.png 604907f51a80aac83ca25d87_9252_9347.png 604907f51a80aac83ca25d87_9348_9524.png