Microsoft to app developers: Time to think about power management

Microsoft to app developers: Time to think about power management

Summary: Both Intel and Microsoft have been knocking themselves out for years, seeking to develop better options for energy efficiency and power management at the hardware and operating system later. Now Microsoft is hoping to rally more application developers to the power management cause.

SHARE:

Both Intel and Microsoft have been knocking themselves out for years, seeking to develop better options for energy efficiency and power management at the hardware and operating system later. Now Microsoft is hoping to rally more application developers to the power management cause.

The need for third-party application developers to accommodate power management modes has become acute, according to Mark Aggar, Microsoft's director of environmental technology, who spoke about the topic this week during a presentation at the Intel Developer Forum.

"Applications have a funny little habit of undermining energy efficiency when you least expect it," Aggar said during a phone interview the day after his speech. Most IT professionals, however, are unaware of the role that applications play in power management agendas, he says.

For example: you wouldn't want your laptop display dimming when you're watching a video, right? But, ahem, I'll bet this might have happened to you when you were using one of the high-profile multimedia players.

The challenge is that very few applications actually were written to acknowledge or override system-level power management settings -- which make make for a case of what Microsoft describes as "PC insomnia." Or, the scenario when your computer should go to sleep, but it can't because of some application that is running. According to one of a series of white papers that Microsoft has prepared on the topic, applications need a tweak if they are going to interoperate well with system sleep or hibernation features. Here are three important factors for development:

  1. An application shouldn't prevent a system from going to sleep
  2. An application shouldn't crash when a computer is entering or exiting sleep mode
  3. An application should be smart enough to prevent the computer from sleeping during a passive activity (like watching a video)

According to Aggar, it is relatively simple to stop an application -- custom or commercial -- from undermining power management goals that are being sought at the system level. Microsoft has some APIs that allow developers to address this in a few lines of code. White papers on everything from the science of setting application timers to more sophisticated practices such as measuring idle power consumption can be found on the "Energy Smart" section of the Microsoft developer Web site.

To close, here are Aggar's top 10 ways to be "Energy Smart":

  1. Be resilient and respectful of sleep transitions
  2. Use system and display availability requests appropriately
  3. Support virtualization
  4. Measure system utilization when your application is idle
  5. Help the system stay idle
  6. Consider and adjust to the power environment
  7. Measure workload power efficiency
  8. Improve workload power efficiency
  9. Scale resource use intelligently
  10. Cloudburst the peak load

Hmm, I wonder what Microsoft's own applications team is doing to support this cause?

Topics: Microsoft, Software Development

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

12 comments
Log in or register to join the discussion
  • I'm staggerred ...

    ... that Microsoft still needs to hammer home to devs points #1 and 2 ... seem like no-brainers!
    Adrian Kingsley-Hughes
  • About time...

    Companies like 1E (www.1e.com) have been talking about this for for a long time and already give the ability to centrally manage the power settings and consumption, on the PC but also in the datacenter. Microsoft also considers the 1E solutions as best-of-breed for obtaining a high level of IT efficiency and a greener IT.
    rodtrent
  • Developers, it's all YOUR fault!

    Microsoft shouldn't have to worry about power managment, the developers should be bearing that burden.
    No we can't ship a slate PC because Windows sucks the battery dry in 45 minutes. Who to blame? Why third parties, of course!
    (The dead weight in Microsoft's CEO suite is sucking down that companys mojo)
    HollywoodDog
    • Are you an idiot?

      Honest question. Apple specifies UI and other programming guidelines. Does that mean that OS X sucks because developers have to worry about UI design?

      Idiot.
      NonZealot
      • RE: Microsoft to app developers: Time to think about power management

        @NonZealot Oh come on! You're always out there to zap OSX! I don't care! <br><br>I was about to respond to Heather's post, saying that it is the responsibility of the OS to manage the power usage; but then I thought about the scenario of video playback...<br><br>No! Hang on! It's still the responsibility of the OS to monitor when it can quiesce.<br><br>What are the problems? A program has a loop looking for input!? Is that keeping the CPU turning? Rubbish way of writing code! A program should be doing nothing until it gets a signal from the OS, then continue until finished, or swapped out by the OS, to continue later.<br><br>It still seems to me that it's the responsibility of the OS!
        I am Gorby
    • RE: Microsoft to app developers: Time to think about power management

      @HollywoodDog - 3rd party developers are a huge part of the problem because there are ways for them to disable power management and they don't consider the impact they would have. Windows is designed to allow the apps to deny power management so that it doesn't create issues but lack of awareness coupled with some people ignoring this issue can completely destroy power managemnt policies.
      Nemesis"T"Warlock
    • Slate PC had to go back to the drawing board

      @HollywoodDog .. reportdly for power managment problems, as in Windows apparently gobbles it up. Was this the fault of 3rd party developers?
      HollywoodDog
  • Still a problem...sigh

    I'm not sure if I care who is to blame, frankly. My Win 7 x64 box at least once a week, sometimes more, will be fully awake and running when I first visit the computer room in the morning. Using powercfg hasn't revealed any issues, and I'm running the same few programs each night, and putting it to sleep when I finish. It's just frustrating to know that at any point it might wake up and stay awake. Does it need to be this difficult?

    Now I'll grant you that I have only spent a small amount of time trying to find the problem, but multiply my electricity waste by the millions of computers in use and you're looking at some real waste!
    bmgoodman
    • RE: Microsoft to app developers: Time to think about power management

      @bmgoodman:

      The problem is usually fairly simple. Took this guy a while to find out that it was Media Center that was waking his computer:
      http://community.compuserve.com/n/pfx/forum.aspx?webtag=ws-winsupport&nav=messages&tid=196556

      The trick that worked for him was Jerry Lippey's suggestion in Message 20. "Open a command prompt (cmd.exe), enter this, and tell us what you see."
      powercfg -lastwake

      That'll tell you what program is (or programs are) waking your system.

      -- Timothy J. McGowan
      TimothyMcGowan
  • This is good news that they are promoting this

    At Verismic we have to move heaven and earth with our PC Power Management products to overcome the barriers developers leave in their products by not taking into account power management needs. As part of the Climate Savers Computing Initiative we've been working on these issues and how developers need to be more aware. Great to see more publicity for it. http://www.verismic.com
    Nemesis"T"Warlock
  • An area ALL could improve on it seems

    nt
    klumper
  • Practice what you preach

    MS would have more credibility in this regard if they practiced what they preach. If my computer is asleep at the time I've scheduled a MS Security Essentials scan, it will not wake up to run it. On the other hand, if the computer is awake when the scan starts, it will invariably go to sleep during the scan if the sleep timer kicks in. Glass houses etc.
    GVC2031