Tech Tip #73: Measure idle power first

Before you measure your code, measure the machine doing nothing.

The problem

Many platforms draw a large share of their peak power at idle. A reading taken under load mixes the machine's idle draw with your software's, and two teams will report different numbers depending on how they treat it.

The fix you can use today

  • Record the idle baseline on the same machine before each test.
  • Report whether your figure includes or excludes idle power.
  • Use the same rule every time you compare.

GreenCode researchers found that machines draw a lot of power doing nothing, so they measure that first.

Tools that help

  • GreenCode Constitution profiler (profile.sh) (GreenCode researchers): a script from the Constitution tooling that measures the energy of a command from processor counters, GPU sensors and an optional smart plug, and writes the result as JSON
  • green-languages (GreenCode researchers): a command-line tool that measures the energy of whole programs or marked sections of code, across languages
  • PowerJoular: monitors the power of a machine and of individual processes on PCs, servers and single-board computers

How GreenCode helps

GreenCode helps tackle this by tying each energy figure to a specific version, configuration and test run, and stating the allocation rule and confidence, so a figure can be traced back to what produced it. More on this.

Tags

#measurement#idle#reporting

Sources

All GreenCode Tech Tips

  • Tip #73
  • For Ops and infrastructure
  • Category Measuring energy
  • Format short video
GreenCode

Want this checked on your own system? Talk to the GreenCode team.

Get in touch