Energy-Efficient Software Checklist

You may also be interested in the Energy-Efficient Software Guidelines

Download PDF

Download Energy-Efficient Software Criteria [PDF 132KB]

Checklist for creating software applications that is energy-efficient. The checklist is OS agnostic except where otherwise noted

Computational Efficiency

1

Multithreading

  • Taking advantage of multiple threads and cores to speed-up execution? Faster execution means more time to idle
  • Are threads balanced? Imbalanced threads may increase power consumption

2

Reduce usage of High-Resolution Periodic Timers

  • Using a timer rate appropriate for the application? Intervals < 15ms have low benefit on most systems. Always make sure to disable periodic timer in case it is not in use.
  • (Linux*) Using timer APIs in application so that timers can be grouped (e.g. round_jiffies) or utilizing deferrable kernel timers?

3

Loops

  • Minimized the use of tight loops?
  • Converted polling loops to being event driven?
  • Using efficient polling loops (largest possible polling interval) when polling loops are necessary?
  • Eliminated busy wait (spinning) loops, where possible? Might still be required for certain locking/synchronization tasks.

4

Performance Libraries/Extensions

  • Utilizing instruction set extensions (such as MMX™, SSE, or newer) to accelerate computations?
  • Utilizing Performance Libraries such as Intel® Performance Primitives or Intel® Math Kernel Library?

5

Algorithms< /p>

  • Using high performance algorithms & data structures (gets the job done faster)?
  • If requirements allow, can you select a less complex algorithm that is more power efficient?
  • Minimized use of heavily recursive algorithms? These can be power inefficient

6

Compiler Optimization Options

  • Is application optimized for speed?
  • Is application optimized (profiled) for most common execution path?

7

Drivers

  • Utilizing kernel/drivers that are idle power friendly?
  • Identified drivers causing excessive interrupts?

8

  • Using a programming language implementation and libraries that are idle power friendly?

Data Efficiency

10

  • Can data be pre-fetched from optical disk and buffered, allowing disk to idle?

11

  • Can data be pre-fetched from hard-disk and buffered, allowing disk to idle?

12

  • Avoiding frequent reads/writes to disk?

13

  • Can read/write requests be batched into one operation?

14

  • Using algorithms that minimize data movement, memory (cache vs. RAM) and hierarchies that keep data close to processor?

15

  • Identified processor resources shared between cores? Synchronize threads on different cores to work simultaneously and idle simultaneously.

Context-Aware (Power-Aware) Behavior

20

Handling Sleep Transitions Seamlessly

  • Is application preventing/delaying system sleep or hibernate state transitions? Make sure to handle appropriate transition events.
  • (Windows*) Are you preventing System Idle Timeouts only when necessary? Remember to reset execution state when task is complete (SetThreadExecutionState)

21

Respond/Adapt to System Power Events

  • Responding to transition between Battery and AC operation?
  • Handling Low Battery event by saving work/state/checkpoint? Avoid duplicating work in case of standby.
  • (Windows) Responding to PBT_APMSUSPEND within 2 seconds?
  • Application adapting to user selected OS power policy?

22

Scale Behavior Based on Machine Power State

  • Can resource usage be reduced when on battery power (such as avoiding background updates)?
  • Is it possible switch to “low-power” algorithms on Low Battery?
  • Depending on machine state, have you explored the option of letting the application inform the user to select a low(er) power profile for efficient execution?

23

  • Utilizing context awareness toolkits such as Intel® Mobile Platform SDK, Intel® Laptop Gaming TDK, or Intel® Web 2.0 TDK?

24

  • Can unused peripherals be shut off/disabled (e.g. Bluetooth*, 802.11) if no activity?

Testing for Energy-Efficiency

30

Profile system power during application runtime

  • Understand the Power impact of application at Idle and Running state
  • Examine C-state behavior
  • Examine P-state behavior
  • Examine timer interrupts
  • Examine interrupt statistics
  • Examine disk and file access statistics

Tools

40

Perfmon

Windows* XP, Vista*

41

PwrTest/Windows Driver Kit

Windows XP, Vista

42

Windows Event Viewer (Timer tick change events, Microsoft-Windows-Kernel-PowerDiagnostic log)

Windows XP, Vista

43

Intel PowerInformer

Windows XP, Vista

44

Windows ETW (performance monitoring framework)

Windows XP, Vista

45

Intel Application Energy Toolkit

Windows XP, Vista, Linux, Mac

46

PowerTOP

Linux

47

Battery Life Toolkit (BLTK)

Linux

48

Linux command line tools: strace, blktrace, iostat etc.

Linux



For details on the above topics and references to existing white papers and articles, please refer to the extended document, Energy-Efficient Software Guidelines. This checklist created by Intel as a general suggestion. If you have feedback, suggestions, or would like more information about power management go to http://www.intel.com/software/power/

Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.