Notes on comments.
Welcome to our blog dedicated to the engineering of Microsoft Windows 7
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:
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.
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:
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.
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.
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.
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.
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:
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.
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.
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.
Holy hell didnt any of you computer geeks realize that all of the power percentage on the laptop only added up to 90%.
I rely on energy efficiency while I am in the feild, I use batteries and inverters to image and run astronomical instrumentation.
I am suprised at how much better my laptop runs on battery, I now get about 65 minutes as opposed to 35 minutes with Windows XP.
I am now using adaptive screen settings to experiment further with using my CCD camera.
Killing the batteries in your vehicle in the wilderness is not a lot of fun and I have discovered that the laptop is usually the cause of this.
I am so pleased that the development team has listened to even the more geeky users of microsoft products...can't wait for Product Key Issue next week, would like to submit some usage logs to prove the usefullness for scientific computing with the Windows 7 platform.
@Steven, could you include native *.fits
*.aips for windows...you would win over a few more converts from unix
Pie charts are supposed to show the parts of a whole. In fact, that is what it is claimed they are good at. (And they're not really good at that; it's just that they are so ubiquitous, people mistake familiarity with effective information display.)
If you add up the totals of the wedges in the chart, you may find that this pie is really pie-light: the segments add up to 90%.
I have a problem with windows seven, not detect tow devices of the ethernet and audio I have an asrock 775 S61 with an intel (630)(661 fx sis) pentium 4 ht 3.0 ghz and the audio is a C media: cmi9739a/9761 @ sis 7012
Simply put, all this talk of power efficiency and sleep modes is pointless. Sleep mode has never, ever, worked with any of the machines I've ever used - its totally unreliable, and its never been fixed. The problem lies in both a combination of dumb hardware and even dumber software, and those 2 things cannot be fixed in the legacy environment. I do not use Sleep mode, I refuse to take the risk that it won't come out of sleep mode. There are numerous components that fail this test. I'm using a brand-new Alienware with Core i7 and Vista Premium and that won't come back from Sleep. Its too big a risk to lose all your work. I use Shutdown or Hibernate because in effect, everything is saved to disk and when restarting, everything is reloaded and all devices are re-enabled from scratch, which Sleep does not do. Its the only reliable way to have the devices work.
One of the interesting aspects of the power chart was the increase in power for boot. As the chart demonstrates, the power consumption is higher for boot than it is for hibernation. So, in essence, some users may be using a bit more power for shutdown/boot versus hibernation.
On another point, I would suspect these values could vary for different hardware components, including the power supply used in the system.
Can you add the following ?
- A way to turn the monitor off programmatically (notebooks have no screen power button - this could save lot of energy). Lets say, after clicking an option in the start menu a top-level dialog with a Cancel button and a countdown timer appears allowing you to leave the mouse at rest.
There are numerous components that fail this test. I'm using a brand-new Alienware with Core i7 and Vista Premium and that won't come back from Sleep. Its too big a risk to lose all your work. I use Shutdown or Hibernate because in effect, everything is saved to disk and when restarting, everything is reloaded and all devices are re-enabled from scratch, which Sleep does not do. Its the only reliable way to have the devices work.
So using tricks like darkening windows not in the foreground, or using black backgrounds, or screen savers with just a small design lit, these can save significant energy in technologies which are in the pipeline now.
Its too big a risk to lose all your work. I use Shutdown or Hibernate because in effect, everything is saved to disk and when restarting, everything is reloaded and all devices are re-enabled from scratch, which Sleep does not do. Its the only reliable way to have the devices work.
I've ever used - its totally unreliable, and its never been fixed. The problem lies in both a combination of dumb hardware and even dumber software, and those 2 things cannot be fixed in the legacy environment. I do not use Sleep mode, I refuse to take the risk that it won't come out of sleep mode.
There are numerous components that fail this test. I'm using a brand-new Alienware with Core i7 and Vista Premium and that won't come back from Sleep.
just posted this - helpful if you have PCs that steadfastly refuse to go into sleep mode
Phil Wilcock (1E)
*sorry forgot the url*
Nice Article, i appreciate on great work, after clicking an option in the start menu a top-level dialog with a Cancel button and a countdown timer appears allowing you to leave the mouse at rest. It's only and only way to have work with device.