Continual Demand for New Services Typical Operational Practices Traditional Application Architecture Increasing IT Footprint Rising Costs Decreasing Productivity Inefficient IT Increasing IT Footprint Stressed Power Systems Rising Costs Decreasing Productivity Increasing IT Footprint Stressed Power SystemsDecreasing Rising Costs Productivity Increasing IT Power • Increasing Regulatory attention • Shareholder & NGO Scrutiny •

Download Report

Transcript Continual Demand for New Services Typical Operational Practices Traditional Application Architecture Increasing IT Footprint Rising Costs Decreasing Productivity Inefficient IT Increasing IT Footprint Stressed Power Systems Rising Costs Decreasing Productivity Increasing IT Footprint Stressed Power SystemsDecreasing Rising Costs Productivity Increasing IT Power • Increasing Regulatory attention • Shareholder & NGO Scrutiny •

Continual
Demand for
New Services
Typical
Operational
Practices
Traditional
Application
Architecture
Increasing IT
Footprint
Rising Costs
Decreasing
Productivity
Inefficient IT
Increasing IT
Footprint
Stressed
Power
Systems
Rising Costs
Decreasing
Productivity
Increasing IT
Footprint
Stressed
Power
SystemsDecreasing
Rising Costs
Productivity
Increasing IT Power
• Increasing Regulatory
attention
• Shareholder & NGO Scrutiny
• Power Constraints & Outages
• Grid
• Local
Increasing IT
Footprint
Stressed
Power
SystemsDecreasing
Rising Costs
Productivity
Manageable
Service
Demands
Efficient ITSmart
New
Operational
Practices
Application
Resource
Use
Reliable
Reliable & Secure
Reliable, Secure & Efficient
Building
Management
Infrastructure
Hardware Package
Applications
Operating
System
Silicon
Improve Data Center PUE
Increase Facility Utilization
Increase Server Utilization
Centralized PC Power Management
Rightsizing
Efficient Power Supply
Remove Unnecessary Components
Energy Efficient & Aware Applications
Platform Power Management
Low-power components
Client
• Reduced battery life – important user feature
• Cost of system insomnia (additional cost to enterprises)
• Poor user experience (laptop as bag warmer)
Cloud
• Less effective virtualization/consolidation
• More servers - Increased Capex/Opex/disposal
• Stressed power and cooling systems
Enables transition to a low power mode while saving OS and
application state
Allows active system to reduce power needs without negatively
impacting user productivity
Provides users and administrators with controls to save energy
Power
Efficient
System
Hardware
Applications
OS
Allows the
system to reduce
power when
possible
Respects user
preferences to
save energy
Responds to
system state and
power source
changes
“Energy Smart” Application
Client Code
• Verify system sleep and display power management behavior
Server Code
• Measure application energy consumption
• Establish goals and a schedule for improvement
All Code
• Detect and analyze timer resolution changes
• Encourage use of timer coalesce
Verizon
185,000 PCs
$7 million savings
FedEx
20,000 PCs
$1 million savings
Function name
PowerCreateRequest
PowerClearRequest
PowerSetRequest
Description
Creates a power context object and returns a handle to it.
Removes an outstanding availability request on a particular request context object
Activates a power availability request and indicates the type of request.
http://msdn.microsoft.com/en-us/library/ff550682(VS.85).aspx
void EatBatteryLife()
{
HANDLE sharedResource = NULL;
//spawn multiple threads, one of which does this:
while (sharedResource == NULL)
{
waitTime++;
Sleep(1);//or just keep spinning on a lock or mutex
}
}
//thread 1’s code
void UpdateSharedResource()
{
//set sharedResource
sharedResource = UpdateResource();
/thread 2's code
void ConsumeSharedResource()
{
DWORD dwWaitResult;
dwWaitResult = WaitForSingleObject(
sharedResourceIsReadyEvent,
INFINITE); // indefinite wait
//Set sharedResourceIsReadyEvent to signaled
SetEvent(sharedResourceIsReadyEvent);
}
switch (dwWaitResult)
{
case WAIT_OBJECT_0:
//
// TODO: use sharedResource
//
break;
default:
return 0;
}
}
Vista
Windows 7
BOOL WINAPI SetWaitableTimerEx(
__in
HANDLE hTimer,
__in
const LARGE_INTEGER *lpDueTime,
__in
LONG lPeriod,
__in_opt PTIMERAPCROUTINE pfnCompletionRoutine,
__in_opt LPVOID lpArgToCompletionRoutine,
__in_opt PREASON_CONTEXT WakeContext,
__in
ULONG TolerableDelay
);
void CreateAndSetPeriodicTimer()
{
myTimer = CreateWaitableTimerEx(NULL,
TimerName,
NULL,
TIMER_MODIFY_STATE);
}
//string with chosen timer name
//required security attribute to call
//SetWaitableTimerEx
bError = SetWaitableTimerEx(myTimer,
DueTime,
10000,
CompletionRoutinePointer,
ArgsToCompletionRoutine,
WakeContext,
1000);
//UTC due time
//periodic timer duration is ten seconds
//APC completion routine
//completion routine arguments
//only if waking the machine
//tolerable delay is one second
//DO WORK
bError = CancelWaitableTimer(myTimer);
//be sure to cancel periodic timers!
Scaled Power vs. Throughput (Run1)
100.00%
Power (% of Max Watts)
90.00%
80.00%
70.00%
OOB
1ms
60.00%
50.00%
40.00%
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
Throughput (% of max SSJ_Ops)
70.00%
80.00%
90.00%
100.00%
//
// Register for Power Setting Notifications.
//
// The RegisterPowerSettingNotification API returns a handle to the
// registration which we cache in a local variable so that we can
// unregister when the window is closed. We also do the registration here
// because it is explicitly obvious that the dialog is initialized and the
// handle to the window is valid.
//
hPowerPersonality = RegisterPowerSettingNotification(m_hWnd,
&GUID_POWERSCHEME_PERSONALITY,
DEVICE_NOTIFY_WINDOW_HANDLE);
hBatteryPercentage = RegisterPowerSettingNotification(m_hWnd,
&GUID_BATTERY_PERCENTAGE_REMAINING,
DEVICE_NOTIFY_WINDOW_HANDLE);
hACDCSource = RegisterPowerSettingNotification(m_hWnd,
&GUID_ACDC_POWER_SOURCE,
DEVICE_NOTIFY_WINDOW_HANDLE);
//Custom handler for processing WM_POWERBROADCAST messages
LRESULT CPowerMonDlg::OnWMPowerBroadcast(WPARAM wParam, LPARAM lParam)
{
…
switch(LOWORD(wParam)) {
case PBT_POWERSETTINGCHANGE:
//
// This is the type of message sent by the power manager when a
// power event such as a power plan personality or a system power source
// change event occurs. We need to take the
// POWERBROADCAST_SETTING struct pointed to by the lParam and
// analyze it to determine what setting changed.
//
PowerMessageSetting = (PPOWERBROADCAST_SETTING)lParam;
if (IsEqualGUID(PowerMessageSetting->PowerSetting,
GUID_POWERSCHEME_PERSONALITY) &&
PowerMessageSetting->DataLength == sizeof(GUID)) {
//
// This is a powerscheme personality change.
// Determine power scheme, then take appropriate actions
//
PowerMessageGUID = *(GUID*)PowerMessageSetting->Data;
if (IsEqualGUID(PowerMessageGUID, GUID_TYPICAL_POWER_SAVINGS)){ // Balanced
SQL Server 2008 R2
• Avoided use of 1ms timer resolution
Adobe Flash 10.1 Release Candidate
• Power Availability Requests
• Indirect (close audio channel on multi-media pause)
• Direct (prevent display dimming when playing video in visible window)
• Contextual timer resolution changes
• Default when loaded doing nothing or paused
• 1ms only when rendering video
• Frame-rate throttling
• Drop video to 2fps when rendering video in hidden window
http://www.microsoft.com/whdc/system/pnppwr/mobile_bat_Win7.mspx
http://msdn.microsoft.com/en-us/library/ff550682(VS.85).aspx
http://www.microsoft.com/whdc/system/pnppwr/powermgmt/PMapps_samp.mspx
www.microsoft.com/teched
www.microsoft.com/learning
http://microsoft.com/technet
http://microsoft.com/msdn
Sign up for Tech·Ed 2011 and save $500
starting June 8 – June 31st
http://northamerica.msteched.com/registration
You can also register at the
North America 2011 kiosk located at registration
Join us in Atlanta next year