Ultrabook™ and the Intel® Energy Checker SDK

Abstract

With the advent of the Ultrabook™1, the demand for applications that are power misers continues to rise. The Intel® Energy Checker SDK can be used to instrument an application and collect data to help a developer pinpoint power hungry features that can be optimized for power. This article gives an overview of the Intel Energy Checker SDK and discusses how it can be used to advantage when improving energy usage on an Ultrabook.

More Work, Less Power

An Ultrabook™ needs to budget its power consumption very carefully to extend usefulness while running on battery. Therefore, applications that use less energy are preferred. Often, application developers create their program on a desktop system where power/energy consumption is less important than raw performance. Not only should applications be developed to conserve power when active, they should also be developed to minimize energy usage during program idle periods, this is often overlooked and can greatly extend battery life. If power issues are ignored, running a program on an Ultrabook will result in unpleasant surprises for the user. If developers test their application on an Ultrabook system during development, they will gain insight into how well the program runs in a power limited environment. An analysis tool such as the Intel® Energy Checker SDK can be a powerful companion during the optimization phase for software designed for an Ultrabook.

Energy Efficency

Before explaining what Intel Energy Checker SDK contains, a discussion on Energy Efficiency (EE) is in order. This is a term that is used extensively in the Intel Energy Checker SDK. There is no universally accepted definition of EE, so for the purposes of this tool it is defined as:

EE=Work/Energy

Work is defined as the amount of “useful work” done by a software application. There is no concise, easy definition of the term useful work either, as what is considered useful work in one program may be quite different in another application. The developer is required to make that determination. For example, one might consider the areas of a movie player program where it provides the customer value (such as decoding the movie) as useful work whereas areas of the program that are accessing resources, waiting on input, or performing synchronization would not.

Code Instrumentation

The first step in using Intel Energy Checker SDK to help determine an application’s EE is to create and use “counters” in the software to determine quantities of “useful work”. A counter is defined as a 64-bit (8 byte) variable that keeps a running total of how many times a particular event occurs. In the “C” language, this becomes an unsigned long long data type. A developer can create one or more counters during the initialization portion of the software. Next, a container for the counters can be created, called a “Productivity Link” (PL)2. Each PL holds up to 512 counters, and up to 10 different PL’s can be open at one time, but most software will require far smaller numbers of counters and PL’s.

During the application runtime, values can be written to any counter in the PL, based on the developer’s requirements. Intel Energy Checker SDK can collect the information from the PL’s in order to determine how much work was done.

Energy Consumed

The second part of finding the EE of a software application is to measure how much energy was consumed while the program was running. To do this, Intel Energy Checker SDK uses two tools which are included in the SDK download: Energy Server (ESRV) and Temperature Server (TSRV). ESRV is used to monitor energy and power consumption as reported by external power tools while TSRV monitors temperature related information as reported by environmental probes. ESRV and TSRV counters can be accessed by any program using the Intel Energy Checker API. In addition to the counters created by the developer to determine quantities of work, the developer will want to add counters to collect information from ESRV and possibly TSRV. There are three different ways to set up ESRV:

  1. Use a power meter to collect actual “platform energy and power” information.

    There are several different power meters that work with the Intel Energy Checker SDK. Please consult the Intel® Energy Checker SDK User Guide included in the download or found on the Intel® Energy Checker SDK page to determine which power meters will work and how they should be attached to the test system.
  2. Use Intel® Power Gadget to collect “processor energy and power” usage information on 2nd Generation Intel Core™ processor family. External power meters can also be used which report platform power together with Intel Power Gadget that provides processor power.The blog Accessing Intel® Power Gadget From Intel® Energy Checker SDK by Intel engineer Jun De Vega discusses how to enable Intel® Power Gadget with Intel® Energy Checker.
  3. Choose to use the simulation method which will use the CPU utilization percentage returned from the OS. This method does not require a hardware probe. The Intel Energy Checker SDK offers this method as an option for all processors (rather than just the 2nd Generation Intel Core processor family as with the Intel Power Gadget) in order for enable the user who does not have a power meter. Included in the SDK is a support library for accessing this metric.



Figure 1: Conceptualized drawing of Intel Energy Checker setup with Instrumented Application, Power Meter and Environmental probes attached

Intel Energy Checker Extras

There are two companion tools that are bundled with the Intel Energy Checker SDK in addition to those already mentioned. The PL GUI Monitor is a user interface that displays Productivity Link (PL) counters in a running program that has already been instrumented with the Intel Energy Checker API. The PL CSV Logger3 is an application that can collect and write PL counters to a CSV file for later analysis in a variety of spreadsheet applications.

Included with the Intel Energy Checker SDK is the Intel® Energy Checker SDK Companion Application User Guide that discusses the features and capabilities of both of these tools.



Figure 2: PL GUI Monitor running while a picture is being rendered

The entire Intel Energy Checker SDK includes other build, scripting, interoperability, and monitoring tools to help developers instrument code and collect energy metrics.

A white paper entitled “How Green Is Your Software?” is available for download from the SDK site. This paper discusses approaches for making software power efficient. Look for it in the “Code, Resources and Documentation” section of the Intel Energy Checker SDK page. Several blogs about Intel Energy Checker that were written by Intel Engineer Jamel Tayeb will also be helpful:

Using the Intel® Energy Checker SDK at Home

Creating a Simple Device Library for Intel® Energy Checker SDK

Measuring the energy consumed by a command using the Intel® Energy Checker SDK

All of these resources allow a developer to get started in gathering helpful information.

Optimizing Applications for Ultrabooks

Once a program has been instrumented to collect counter information and an energy collection plan is in place (either simulation or power meter), the setup is complete. The developer will then be able to gather information about the application’s energy usage profile and to incorporate optimizations to improve results.

There are several areas of optimization the Ultrabook developer can select for improvements:

Consider modifying the application to be aware of the power status and changing usage to reduce energy consumption when the system is on battery.

Check the hardware and software system power management possibilities to choose a balanced power setting. This could be a recommended setting suggested in application documentation.

Reduce power usage while the application is actively running or doing work. Compute intensive parts of the program will likely benefit from multi-threading and vectorization techniques.

Reduce power usage while the application is idle. Being able to minimize the timer tick rate or setting up periodic actions to happen within the same wakeup period are examples of how to reduce idle application power usage.



Summary

With the growth of Ultrabook devices, it will benefit program designers and developers to take a look at ways to save energy while providing a great user experience on an Ultrabook. Intel Energy Checker SDK can provide the means to identify the key areas of focus and confirm the positive results achieved after optimization. Long live Ultrabook!

About the Author

Judy Hartley is a Software Applications Engineer who has been working in the Software and Services Group since 2005. She has contributed to many software products and written about her experiences through blogs and whitepapers. Recently Judy has been working on Graphics and Power tools and training for future Intel processors.



1 Ultrabook is a trademark of Intel Corporation in the U.S. and/or other countries.

2 A Productivity Link is a term used by Intel Energy Checker to represent an arbitrary or logical collection of counters.

3 CSV is the acronym for Comma Separated Values.

For more complete information about compiler optimizations, see our Optimization Notice.

Comments

Soheil Negahbani's picture

Very well written. Enjoyed learning about it the Energy Checker SDK.

Question, is the Energy Checker SDK included in Intel's DCM?

I look forward to reading Judy's future articles.

Regards,

Soheil

's picture

Hi Soheil,
Thanks for the kind comments. The Intel(R) Energy Checker SDK is not part of the Intel(r) Data Center Manager (Intel(R) DCM). I can see why you would think so, however. Intel DCM uses Intel(R) Intelligent Power Node Manager for node power and thermal management. The Intel Energy Checker SDK was originally created to collect power information, but can actually be used to collect counter information for many other types of metrics. It is also not contrained to just servers or server farms.

Cheers,
Judy