Windows 7 Power Management OverviewPat Stemen
Senior Program ManagerMicrosoft Corporation
The Power of WinHEC 2008!
COR-T540 Windows 7 Power Management Overview Now
MBL-T541 Improving Platform Energy Efficiency (part 1) Today, 2:00–3:00Room 404
MBL-T541 Improving Platform Energy Efficiency (part 2) Today, 3:15–4:15Room 404
COR-C622 Discussion: Windows 7 Power Management Today, 4:30–5:30
Room 402A
COR-T542
NDIS 6.20: Core Network Power Management Fundamentals
Today, 4:30–5:30Room 404
ENT-T551 Windows Server Power Management OverviewThursday, 2:00–3:00Hall K
ENT-T552 Windows Server Power Management Implementation Details
Thursday, 3:15–4:15Hall K
COR-C633 Microsoft Tools for Energy Efficiency Diagnostics
Thursday, 2:00–3:00Room 402A
Agenda
Windows Energy Efficiency VisionIdle Power and Background ActivityDevice Power ManagementTimers and AlarmsPower Policy EnhancementsIdle DetectionPower Efficiency Diagnostics
Windows Energy Efficiency VisionThe Windows OS enables the most energy-efficient computing platform, regardless of underlying hardware, attached devices or software workload.
Idle Efficiency
Workload Scaling
Always Available
SelfDiagnosing
Standards Based
Management
Extensible but Resilient
Deep Focus on Idle
6
0 20 40 60 80 100 -
5.00
10.00
15.00
20.00
25.00
30.00
35.00
40.00
System Power vs. CPU Uti-lization(Idle)
CPU Utilization (%)
Tota
l S
yst
em
Po
we
r (W
att
s)
+10% CPU increases power by ~1.25W
1.25W increase results in 8.3% reduction in battery
life Clean Install
IT Image0%1%2%3%4%5%6%7%8%
CPU Utilization on Idle System
CP
U U
tili
za
tio
n (
%)
Background Activity Improvements
Idle dominates almost all use scenarios for client systems
Reducing idle power key to extending battery life
Periodic background activity increases system power consumption
Very frequent events impact processor and chipset powerLong-running infrequent events prevent the system from idling to sleep
Frequent Idle Activity
Specific Windows 7 improvementsEliminate TCP DPC timer on every system timer interruptReduce frequency of USB driver maintenance timersIntelligent Timer Tick Distribution (ITTD)Timer Coalescing
Eliminate idle activity in drivers and applications
Target average idle period greater than 100ms
Timer Coalescing
Platform energy efficiency can be improved by extending idle periods
New timer coalescing API enables callers to specify a tolerance for due time
Enables the kernel to expire multiple timers at the same time
Extensions should integrate with Windows 7 API/DDI
Timer tick15.6 ms
Periodic Timer Events
Windows 7
Vista
Background Process Management
Background activity on the macro scale (minutes, hours) also important for power
E.g., disk defragmentation, AV scans
Prevents low-power idle and sleep modes
Unified Background Process Manager (UBPM)New Windows 7 infrastructure
Drives scheduling of services and scheduled tasks
Transparent to users, IT pros, and existing APIs
Enables trigger-starting services
Delivers usage data and metrics to Microsoft via CEIP
Trigger-Start Services
Many services configured to Autostart and wait for rare events
UBPM enables Trigger-Start services based on environmental changes
Device arrival/removal, IP address change, domain join, etc.
Examples
Bluetooth service is started only if a Bluetooth radio is currently attached
BitLocker encryption service started only when new volumes detected
Call to ActionLeverage trigger-start capability for value-add services
Validate performance impact with XPerf tools
Some Trigger-Start Services In Windows 7
Service Name Description Trigger Type
AELookupSvc Processes application compatibility cache requests for applications as they are launched
Custom ETW
BDESVC Provides BitLocker client services for user interface and auto-unlocking of data volumes
Custom ETW
BTHSERV The Bluetooth service supports discovery and association of remote Bluetooth devices.
Device
SensorsMTPMonitor Monitors MTP (Media Transfer Protocol) sensors (such as a cell phone with a GPS receiver) to communicate sensor data to programs
Device
TabletInputService Enables Tablet PC pen and ink functionality
Device
WinDefend Protection against spyware and potentially unwanted software
Group Policy
Device Power Management
Adaptive display brightnessDim the mobile PC display after a period of user inactivity
Intelligent policy—timeout automatically adjusts with user input
Does not interfere with presentations, full-screen media playback
Processor power managementUpdates to core performance state algorithm
Core parking
Device Power Management
AudioSupport for the latest Intel HD Audio low-power specificationsUSB audio class selective suspend
BluetoothRadio enters selective suspend when connections are in sniff mode
Wired LAN runtime idle detectionNIC automatically enters D3 when media is disconnected
Power Policy Enhancements
Iterative evolution of Vista power policyContinue 3 plans: Performance, Balanced, Power Saver
Same toolset
Refined UI elements
New power settings for Windows 7 features
Minor changes to idle timeout defaults
OEMs must continue to tailor policy for specific platforms
E.g., meet regulatory compliance standards
New Windows 7 Power Policies
Name GUID Description
Default (Balanced)
AC DC
Unattended sleep timeout
7bc4a2f9-d8fc-4469-b07b-33eb785aaca0
Determines the amount of inactivity time before the system automatically sleeps if the computer resumed without a user present
2 minutes2
minutes
System cooling policy
94d3a615-a899-4ac5-ae2b-e4d8f634367f
Determines if Active or Passive cooling should be favored for thermal zones
Active Active
Reserve battery level
f3c5027d-cd16-4930-aa6b-90db844a8f00
Configures the percentage of battery capacity remaining before displaying the reserve battery warning
n/a 7%
AHCI link power mode
0b2d69d7-a2a1-449c-9680-f91c70521c60
Configures AHCI link power modes (HIPM, DIPM) and link power states (Partial, Slumber, Active)
HIPM, Partial
HIPM, Slumber
Allow System Required
Policy
a4b195f5-8225-47d8-8012-9d41369786e2
Enable applications to prevent the system from idling to sleep
Enabled Enabled
Dim Display After
17aaa29b-8b43-4b94-aafe-35f64daaf1ee
Determines the amount of inactivity time before the system automatically reduces the brightness of the display on a mobile PC
5 minutes2
minutes
Power WMI Provider
Enables power policy configuration through standard WMI interface
Change power setting values
Activate a given plan
Conforms to DMTF data model
To get started…Change a power setting: Win32_PowerSetting
Activate a plan: Win32_Plan.Activate() method
Attend ENT-T552 Windows Server Power Management Implementation Details for additional details
Wake Timers
Opportunity to improve mobile PC experience by reducing spurious wake events
E.g., system wakes up in bag due to application request, remains on, drains battery
Windows 7 mobile PCs will not program wake timer alarm by default
Excludes doze to hibernate
Wake timers continue to be enabled by default on desktop systems
Power policy control to configure wake timers
Low Battery Experience
7%
16%
5%
Automatic Hibernate
All thresholds are configurable in power policy
Media Playback Improvements
Refined optical drive spin-down mechanismConfigurable power policies to force interlaced content to render at 30 fpsCPU utilization improvements for copy-protection and DRM complianceArchitectural changes in DWM to optimize CPU and memory utilizationAttend MBL-T541 Improving Platform Energy Efficiency for detailed power savings information
Idle Detection
Windows 7 is aggressive about placing
the system in sleep when idleUser input and application availability requests only
Availability requests allow applications
to request temporary overrides on power management
Media center recording service prevents idle to sleep when recording TVWindows Media Player prevents display from turning off while watching DVD
Idle Detection
Windows 7 improves failed idle detection diagnostics
Use PowerCfg utility to inspect for requestsPowerCfg /REQUESTS
Network file sharingOpen files in a client-side cache (offline files) will not prevent the client from sleeping
Policy override capabilityOption to override individual availability requests
Option to override all availability requestsIdle detection will be based solely on user input
Idle Detection Diagnostics
demo
Power Efficiency Diagnostics
PowerCfg command-line utility expanded to detect common energy efficiency problems
USB device selective suspend
Processor Power Management (PPM)
Inefficient power policy settings
Platform timer resolution
Platform firmware problems
Battery capacity
…and others
Helps detect major problems at time of system integration
Power Efficiency Diagnostics
Designed to evaluate problems when the system is idle
Close open applications and documents
“PowerCfg /ENERGY” at the command line to start tracing
Inbox with Windows 7 onlyLeverages new inbox ETW instrumentation
Advanced users can run utility and view HTML output
Automatically executed when the system is idleReports data to Microsoft via Customer Experience Improvement Program (CEIP)
Attend COR-C633 Microsoft Tools for Energy Efficiency Diagnostics for demo and details
Power Efficiency DiagnosticsDetected problems
Problem Area Data Collected Warning
ThresholdError
Threshold
USB Device Selective Suspend
Individual device suspend transitions
% of time device was in suspend state
< 80% suspend time
< 50% suspend time
Power Policy
Settings
Idle timeouts (dim, display, sleep)
PPM configuration
Power plan personality
802.11 Wireless Power Save
Idle timeouts < EnergyStar 4.0 Recommendations
Idle timeouts disabled
Processor Utilization
Overall utilization
Per-process utilization (any process over .1%)
Top 3 module utilization in each process
Total utilization >2%
Total utilization > 4%
Power Efficiency DiagnosticsDetected problems
Problem Area Data Collected Warning
ThresholdError
Threshold
Timer Resolution Requests
Current system timer interrupt period (e.g., 15.6ms)
Applications with outstanding timer requests, request amount
None Timer interrupt period < 15.6ms
Power Requests
Applications with outstanding power requests (Display, Sleep, Away Mode)
NoneEach outstanding power request
Platform Capabilitie
s
Sleep state availability
Display dimming capability
Firmware validation problems
PCI Express ASPM status
NoneIf any capability is disabled or missing
Battery Capacity
Battery static data (make, model, serial number, manufacture date)
Last full charge capacity/design capacity
(Last Full Charge Capacity/Designed Capacity) < 50%
(Last Full Charge Capacity/Designed Capacity) < 40%
Call to Action
Attend power and energy efficiency sessions at WinHECFocus on idle—reduce idle activity and power consumptionConvert value-add and custom services to trigger-start modelReview new power policy options, tailor for specific platformsValidate new platform power management using Power Efficiency Diagnostics
Additional ResourcesWeb Resources
Windows Hardware Developer Central – ACPI / Power Managementhttp://www.microsoft.com/whdc/system/pnppwr/powermgmt/default.mspx
Battery Life and Energy Efficiencyhttp://www.microsoft.com/whdc/system/pnppwr/mobilepwr.mspx
Designing Efficient Background Processes for Windows (Trigger-Start Services) http://go.microsoft.com/fwlink/?LinkId=128622
Power Policy Configuration and Deployment in Windows Vista http://www.microsoft.com/whdc/system/pnppwr/powermgmt/PMpolicy_Vista.mspx
Related SessionsMBL-T541 – Improving Platform Energy EfficiencyCOR-C633 – Microsoft Tools for Energy Efficiency DiagnosticsCOR-C622 – Discussion: Windows 7 Power ManagementENT-T551 – Windows Server Power Management OverviewENT–T552 – Windows Server Power Management Implementation Details
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.