Engineering Windows 7

Welcome to our blog dedicated to the engineering of Microsoft Windows 7

Windows 7 Energy Efficiency

Windows 7 Energy Efficiency

  • Comments 81

Happy New Year!  The following post continues our discussion of fundamentals with a focus on power management.  Power Management (or energy efficiency) is something that every contributor to the PC Ecosystem must always address—the energy efficiency of a running PC is limited by the weakest component.  In engineering Windows 7 we had an explicit focus on the energy usage patterns of the running system and will continue to work with hardware and software makers to realize the collective benefit of all of this work.  While we talk about the balancing of needs in every area, energy consumption is probably the most easily visualized—when we test running systems we connect them to power meters and watch a very clear number change as we run tests.  (If you’ve seen the film Apollo 13 then you’ve seen a similar (albeit much more mission critical) struggle with a power budget.)  This post is by Dean DeWhitt in program management team on our Kernel team. --Steven     PS: Quite a few of us are at CES this week!

Energy efficiency is one of the most active topics in modern computing today. As evidence, consider that processor and chipset vendors are marketing products on “performance per watt”, instead of just processor clock frequency and benchmark performance. Perhaps you have seen a press release for one of the many industry consortiums focused on “Green Computing”--reducing the power consumption and environmental impact of computing. Finally, battery life continues to be a major purchasing and usability factor for mobile PCs. These related energy efficiency efforts in the PC industry result in an ever-increasing interest in how Windows manages power.

In engineering Windows 7, our goal is to deliver the capabilities and features users want from a Windows PC while reducing power consumption over previous releases. Windows already provides a rich set of energy saving features, including the ability to turn off the display and automatically put the system to sleep when the user is not interacting with the computer. For Windows 7, we are building upon the investments in these areas by extending the existing capabilities and focusing on reducing power consumption when the system is idle. Although Windows is responsible for managing the power state of many devices, including the processor, hard drive and display, the remaining devices and software running on the computer have just as much (if not more) impact on power consumption and battery life.  This is a challenge for everyone contributing to the PC experience.

When we talk about energy efficiency and power consumption, we like to break down the problem area into 3 main components:

  • Base Hardware Platform: The processor, chipset and memory and in the case of mobile platforms this also includes the battery capacity. The base hardware platform can have a significant impact on the power consumption of the platform—maximum processor speed, the number of cores, if the processor is designed for mobile devices, and the amount of RAM are all factors.
  • Windows: The PC operating system is responsible for managing many of the devices in the system, making smart tradeoffs between performance and power consumption based on usage and allowing the end-user to dictate power management policy through power plans and settings. The challenges in this area are to properly manage device power and to ensure new Windows features are as efficient as possible in the amount of system resources (CPU, memory and disk) they use.
  • Extensions: Extensions is a general category which includes other devices, drivers, services and applications. Devices, drivers and other software can have a significant impact on power consumption and a single application can impact battery life by 20% or more.

Realizing great energy efficiency from a Windows PC requires efforts in each of these areas. A problem with any single component in any area can have a significant impact on power consumption. Thus approaching energy efficiency from a platform approach and paying special attention to each component on the platform is required.

Base Hardware Platform

The base hardware platform is really dictated by the system manufacturer. The customer gets the ultimate choice when they buy a system—the customer can buy a system with ultra-efficient hardware components or can buy a system with components that favor performance over power consumption. There are desktop and mobile PCs in all kinds of form factors, with varying capabilities and power consumption levels. Some mobile PCs have a normal 3 or 6-cell battery, while others have an extended 9-cell battery or another external battery that can be added to the computer. The challenge for Windows is to be energy efficient across the wide range of hardware in the Windows ecosystem. Looking at a modern laptop, here is where the power goes:

Laptop power consumption.Desktops will have a similar power distribution although higher in watts. The display is a large amount of the energy consumed in using your desktop PC as well.

Operating System

The Windows operating system can have just as big an influence as any other component in the platform. In engineering Windows 7 our goal is to make sure Windows provides a great foundation and energy saving opportunities within the operating system starting with configuration of power policy settings.

The first place most users encounter Windows power management is through Power Options in control panel, or the battery meter on a mobile PC. For as long as Windows has had power management, Windows has had power schemes or power plans. The power plans allow you to easily change from one set of power settings to another, depending on your preferences.

Power Options control panel.

Within a power plan, you can change a variety of Windows power-saving features, including inactivity timers for turning off the display, automatically putting the system to sleep or even creating a new custom power plan for the exact settings you want. The display and sleep idle features are very important for power savings and battery life. As above, the display can consume approximately 40% of the power budget on the typical mobile PC and anywhere from 30-100+ Watts on a desktop PC.

PC OEMs, especially makers of laptops, will often develop a custom set of power schemes that work to take advantage of differentiated hardware and unique software available on a specific model.  So often you will see power schemes that carry the name of your PC OEM in the title.  These have been developed by the OEM who is just as committed to energy efficiency.

Quick tips: The easiest way to save power on a desktop PC is reduce the display idle timeout to something very aggressive, such as 2 or 5 minutes. If you have a screen saver enabled, disable it to allow the display to turn off. On a mobile PC, the easiest way to extend battery life is to reduce the brightness of the display in addition.  Also note that many of the new all-in-one machines use laptop components and thus from a power management perspective look like laptops.

Windows manages the processor performance and changes it dynamically based on the current usage to provide performance boost when required and conserve power based on the current workload. For example, when the system is mostly idle, such as when I’m typing this blog post, there is no need to be running the processor in the maximum performance mode, instead the processor voltage and frequency can be reduced to a lower value to save power. Similarly, the hard disk drive and a variety of other devices can be placed in low-power modes or turned off completely to save power when not in use.

For Windows 7, we’re refining the user experiences for power management, focusing on reducing idle power consumption and supporting new device power modes.

There are two reasons to optimize idle power consumption on the system. First there are various times throughout the day when the PC is idle and the more the system gets to idle and stays idle, the less power it uses. Second, idle power consumption is the ‘base’ power consumption for all other workloads. A system which consumes 15W at Idle will consume additional power over the idle power consumption while is use for other workloads. By reducing the idle power consumption on the platform we will improve most other scenarios as well.

The first step in reducing idle power is optimizing the amount of processor, memory and disk utilization. Reducing processor utilization is the most important, because the processor has a wide range of power consumption. When truly idle, the processor power consumption can be as low as 100-300mW. But, when fully busy, the processor can consume up to 35W. This large range means that even small amounts of processor activity can have a significant impact on overall power consumption and battery life. There are several areas of investment in Windows 7 that help reduce processor utilization and thereby enabling longer periods of time where the processor can enter into low power modes. One of these investments is in the area of services that are running on the platform and having those services only start when they are required referred to as “Trigger-Start”. While these services are efficient and have minimal impact by themselves, the additive effect of several services can add up. We are looking at smart ways to manage these services both within Windows but making our investments in this area extensible for others who are writing services to take advantage of this infrastructure. (Also note these are the same features that contribute to improvements in boot time as well).

To further help reduce idle power, we are focusing on core processor power management improvements. Windows scales processor performance based on the current amount of utilization, and making sure Windows only increases processor performance when absolutely required can have a big impact on power consumption.

We have made several investments in the area of device power management including enhancements to USB device classes to enable selective suspend across a broad range of devices including audio, biometrics, scanners, and smart cards. These investments available in Windows 7 enable more energy efficient PC designs. We have also invested in improvements to power management for networking devices, both wired and wireless.

While many of our investments in the core infrastructure improves energy efficiency across several scenarios, in Windows 7 we also focused on several key customer scenarios to identify resource utilization improvements to extend battery life on mobile platforms. One of these scenarios that we identified was media playback. The optimizations for DVD playback include reducing processor and graphics utilization, audio improvements, and optical disk drive enhancements. These improvements are already paying off and showing significant increase in battery life across a broad range of mobile platforms which we demonstrated at the WinHEC conference.

Extensions

Graphics devices, USB devices, device drivers, background services and installed applications are all extensions to Windows. Large improvements in power consumption and energy efficiency can be realized by improving the efficiency of platform extensions.

For example, consider a single USB device that does not support Selective Suspend. That USB device itself may have very low power consumption (e.g., a fingerprint reader), but until that device enters the suspend state, the processor and chipset must poll the device at a very high frequency to see if there is new data. That polling prevents the processor from entering low power idle states, and on a typical business-class notebook reduces battery life by 20-25%.

Devices are not the only area that require efforts for great energy efficiency. Application and service software can also have a big impact on power consumption. Take for example an application that increases the platform timer resolution using the timeBeginPeriod API. The platform timer tick resolution will be increased and the processor will not be able to efficiently use low power idle modes. We have observed a single application that keeps the timer resolution increased to 1ms can have up to a 10% impact on battery life on a typical notebook PC.

We’re committed to helping improve the energy efficiency of Windows platform extensions by working closely with our partners. The strategy we’re employing is to provide rich tools to identify energy efficiency problems in hardware and software. For Windows 7, we’ve added a new inbox utility that provides an HTML report of energy efficiency issues—a “Top 10” checklist of power problems. If you want to try it out on Windows 7, run powercfg /energy at an elevated command prompt. Be sure to close any open applications and documents before running powercfg—this utility is designed to find energy efficiency problems when the system is idle. powercfg with the /energy parameter can detect USB devices that are not suspending and applications that have increased the platform timer resolution.

For more advanced analysis, we have provided the Windows Performance Toolkit. The Performance Toolkit http://www.microsoft.com/whdc/system/sysperf/perftools.mspx makes it very easy for software developers to observe the resource utilization of their applications, resolve performance bottlenecks and identify issues impacting energy efficiency.

What about turning my PC off?

So far, we have been talking about how to save power while the PC is ON. But, there are power savings to gain by entering low power modes when the PC is not in use. Many users simply Shut Down their computer when it is not in use, yet others use Sleep and sometimes Hibernate on mobile PCs. Windows features each of these power-saving modes so you can choose the right mode for how you use the system:

  • Sleep : All of the open programs, documents and files are preserved in system RAM and the rest of the system is powered off. Because only memory is powered, Sleep consumes a very small amount of power—typically less than 1W on a mobile PC and typically less than 3W on a desktop PC. The primary benefit of Sleep is that resume is very fast—most systems resume from sleep in less than 2 seconds.
  • Hibernate: All of the open programs, documents and files are copied from system RAM to the hard drive. The resulting file is called the Hiberfile. After RAM is copied into the Hiberfile, all of the PC is powered off. Hibernate is most often used on mobile PCs because it consumes nearly 0W on most laptops, and even if the battery does eventually drain, all of the open programs and documents are saved in the Hiberfile. As RAM continues to grow, and as some PCs have limited storage, Hibernate might not be the best option for folks.  (As a quick tip, the disk cleanup wizard, or powercfg –hibernate off, can remove the disk space pre-allocated to hibernate). 
  • Shut Down - This is a normal Windows shutdown, nothing is saved to memory or disk, and the system boots again the next time the system is powered on.

Using an example desktop PC, we measured power consumption for Sleep, Hibernate, Shut Down and the basic ON state, with just the desktop shown and no open programs. We also measured resume latency—the amount of time to get the system back to the ON state.

Comparing Sleep, Hibernate, and Boot Power v. Time to On

The chart makes it pretty clear why we focus on Sleep reliability and performance, and encourage most people to use it when they are not using their computer. Sleep consumes nearly the same amount of power as Shut Down, but resumes the system in less than 2 seconds, instead of going through the boot process.  You can see that boot takes a significant amount of power so when considering whether to turn off your machine to save power or to put it into a low power state, think about how long your machine will be out of use.  Nevertheless, as we’ve talked about in previous blogs boot (and shutdown) are obviously very important performance scenarios as we engineer Windows 7.

Next Steps

We are committed to continuously improving the energy efficiency of Windows PCs, and have made significant improvements to core platform power management for Windows 7, as well as tools to identify where power is consumed. We still have more work to do, and look forward to our upcoming Beta release and monitoring incoming CEIP telemetry for energy efficiency and power management results.  Of course we continue to work very closely with the other members of the ecosystem as we all have much to contribute to energy efficiency—from the manufacturing, usage, and end of life of a PC, software, and peripherals.

--Dean

Leave a Comment
  • Please add 7 and 8 and type the answer here:
  • Post
  • Some feature requests:

    1. Bring back "Add the user what to do every time when hardware power or sleep button is pressed with a touch enabled UI overlay.

    2. With systems having more RAM it would be better to provide a progress bar while hibernating. By next build?

    3. Is an any app similar to Gnome Power Manager's that provides history graphs?

    4. Put the Task Manager power actions back like in XP. They were present there in case the system gets unstable and if the only thing we can start at that time is the Task Manager. Even Process Explorer has them. Again, this is a minor thing to add.

  • Great post!!

    Thank's and Happy New Year :D

    Go MIcrosoft go!!!!

    PS . countdown for REAL Beta start NOW :-)

  • Hi,

    The only reason why I use hibrinate instead of sleep mode is because the fan in my desktop pc keept rotating thus making alot of noise. The desktop is in my bedroom so I like it to be quite when i sleep.

    Also, i love hibrenate!! But the boot process from in hibrenate is way slower than the regular boot process on my older desktop.

    Nice post folks!! Beta tomorrow at CES ?

  • So far on w7 hibernation didn't work for me but I used it all the time on vista for my laptop

    Sometimes it wouldn't hibernate/shutdown but showed the "menu" asking if I really wanted to terminate the running applications and this menu never shutted itself automaticly which is the most anoying thing ever since I sometime wanna close my laptop and get it in my bag cause the new classes begin and I don't have the 2 minutes to wait for my laptop to evacuated the hot air and make sure it really powers off.

    I want to be sure it will power off in less than 2 minutes in my backpack even if there were unresponsible program running or whatever.

  • @Domenico

    Link?

    Still hope for statement from MS for 7. January 09

  • Yes it is efficient, Will definitly use in buisness when released.

    I am a hoping for a few more improvements, but the Window 7 teams done a great job!

    Why the announcement on the count-down...

    The Windows 7 site is gone, the downloads for developers are gone...Blah-Blah-Blah

  • @bluefisch200

    http://blogs.zdnet.com/microsoft/?p=1792

  • Good post, love the energy usage pie!

    Agree with the "be sure it will power off in my backpack" suggestion... hehe

  • Please drum it into OEMs that having a laptop drain nearly 10% battery when OFF is not acceptable.

    My HP DV9000 will be at 92% if I do a full shutdown (at 100%) and then start it up a day later. If I take the battery out then it will only go down by about 2%.

    I have contacted their support they say that's normal. Even log shows it not turning on or anything.

    Anyway, that's just my case but I know it happens a lot.

    Leaving it on standby is even worse. Yes, resuming in 2 seconds is great, but if that leaves you with just over 5 minutes of battery life left then you've not gained much.

    Compare this to the Mac experience, where a MacBook left in sleep can last weeks, not days. Hibernate (aka Deep sleep) is only needed when it's left for months on end.

    DPilcher: The maximum amount of RAM that could potentially be saved t disk needs to be reserved for hibernate. Otherwise, when the battery is low, but you happen to have lots of stuff open, Windows will not be able hibernate. How annoying would that be?

  • Helmore > Some betas of vista were public and private, but the private beta feedback were prioritize, the public beta is more to test it yourself.

    On your power consumption concerns I think we have to account for the fact that more and more chipsets have integrated graphics so maybe the data doesn't differenciated the two.

    Jalf> If you you sell 12 differents laptop configurations (or 20 I don't know) you can optimize the whole OS/drivers to run very efficiently,

    But I do understand your point, there is room for amelioration on Microsoft part to take the increase of the battery life more seriously than it did before, especially since more and more classroom have wireless access. (and the classes can last 3h+) I look forward to my first week this semester to test it hands-on, but so far I haven't noticed much difference in battery life between vista<->seven.

    one more observation: Why did you remove the "high performance" choice from the power icon in the system tray? Now I have to do 2-3 more clicks to get my computer to full power! (I do this because sometimes balanced mode takes too long to get my cpu up to speed when I start a game or simply need more responsive applications)

    One last note on the remote-deskop connection from xp to seven, it works even if the w7 system just booted which didn't work for me on vista where I had to manually log-in on the vista machine the first time after it booted or woke up from sleep. Good work. (Maybe it wasn't suppose to be this way I don't know)

    you seem to have brought many things people liked in XP back to life, but giving us what we already had is not really an innocation now is it? (It may sound depressing but it's the way I feel right now when thinking that the ultimate edition will cost 350+$ retail)

    Keep up the good work and thx for listening/reading us, enthusiast, students, profesionnals, etc. it's much appreciated.

  • misspelled innocation > innovation ... should really read my post again :)

    oh and for everyone who want the latest info on the availability of the beta: http://www.microsoft.com/presspass/events/ces/default.mspx you can watch steve ballmer's keynote @ 6:30 p.m. PST, Jan. 7. (not related to the post directly but many people asked about the availability)

  • On that laptop pie chart, any way of giving a breakup of how much goes towards the LCD elements and how much to the backlight (at different levels)?

  • Quite intelligent!!

    What you did NOT mention on the comparison chart with respect to power consumption is that the 1.8W for boot are only consumed once while 1.5W for sleep are consumed PER HOUR.

    That means that suspending the PC to sleep is better if I will need it again in the next 1 hour and 12 minutes. Otherwise it's better to turn it off, esp. when I'm out-of-office at night or (even more important) during weekends and vacation.

    Let's take a simple example: If I let my PC sleep at night (for simplicity 12 hours @ 1.5W) it will consume 18Wh compared to the 1.8Wh the boot on the next day costs. That's 10x the power consumption on a usual work day!!!

  • @Ooh -- sorry we weren't clear.  That was what was meant by the text in the blog "You can see that boot takes a significant amount of power so when considering whether to turn off your machine to save power or to put it into a low power state, think about how long your machine will be out of use."  We just didn't do the math that you did, which is correct.

    You also want to think about your own time and frequency of these events as well.

    --Steven

  • It is great to see how much improovemt6s you guys have made, after every post heter at the E7, I get more excitet for the beta version every time I read a post!

    When I look at the diagram of the time of boot time, hibernate, sleep and is on. I really think that you could reduce so the hibernate does not take so long time to use.

    It wil be fun to se how the final product is going to be, and how the PC uses the power more intelligent than before.

    Martin

Page 2 of 6 (81 items) 12345»