Scrigroup - Documente si articole

Username / Parola inexistente      

Home Documente Upload Resurse Alte limbi doc  


AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

Windows Disk Idle Detection

windows

+ Font mai mare | - Font mai mic



Windows Disk Idle Detection

Abstract

This paper details the infrastructure supporting disk idle detection in the Windows operating system. The Windows power manager cooperates with disk driver software to automatically spin down hard disk drive rotational media to reduce power consumption when the system is idle.




System manufacturers will learn how to configure the disk idle detection power policies in their system preload. System manufacturers and test personnel will learn how to use the PwrTest utility to observe the mechanics of disk idle detection.

This information applies for the following operating systems:
Windows Vista with Service Pack 1
Windows Server 2008

The current version of this paper is maintained on the Web at:
https://www.microsoft.com/whdc/system/pnppwr/powermgmt/Disk_Idle_Detection.mspx

References and resources discussed here are listed at the end of this paper.

Contents

Introduction

Preliminary Reading 

Disk Idle Detection Overview 

Disk Idle Detection Requirements 

Disk Idle Detection Infrastructure 

Disk Idle Detection Policies 

Disk Idle Time-out 

Disk Burst Activity Time 

Disk Idle Detection Operation 

Configuring Disk Idle Detection Policies 

Using PowerCfg to Configure Disk Idle Detection Policies

Configuring Disk Idle Detection for Maximum Power Savings

Configuring Disk Idle Detection for Maximum Performance

Configuring the Disk Burst Ignore Time-Out

Using PwrTest to Observe Disk Idle Detection

PwrTest DISK Scenario Overview 

PwrTest DISK Scenario XML Log Elements 

Conclusion

Call to Action

Resources

Disclaimer

This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. 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 presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred.

© 2007 Microsoft Corporation. All rights reserved.

Microsoft, Windows, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Document History

Date

Change

September 27, 2007

First publication

November 20, 2007

Correct Web references; no technical content change

Introduction

To help achieve maximum system energy efficiency, the Windows® power manager cooperates with various software drivers to automatically power down devices when they are not in use. This mechanism—called 'device idle detection'—allows devices to change their power state automatically based on system environment, power policy, and current device usage.

Although any device can participate in device idle detection, several devices are more tightly integrated with the Windows power manager to help ensure maximum system power savings. The hard disk drive device in a desktop or mobile PC is one device that is tightly integrated with the Windows power manager. Device idle detection for hard disk devices involves changing the state of the rotational media within the disk device.

Powering down the rotational media in a hard disk drive is called a 'spin-down,' and powering up the rotational media in a hard disk drive is called a 'spin-up.' Disk idle detection is key in achieving maximum mobile PC battery life because the difference in power consumption between the spin-up and spin-down states can be up to 500 milliwatt (mW) on mobile PC form-factor disk devices. The difference in power consumption between the spin-up and spin-down states is larger on full-size desktop PC form-factor hard disk devices.

The Windows power manager uses disk activity, power policy, and system power source (AC/DC) to determine when to spin down and when to spin up the disk device. Power policy configures the time interval between the last disk access and spin-down of the device, as well as any amount of disk activity that should be ignored to be more aggressive in entering the spin-down state.

In addition to power policy, Windows Vista with Service Pack 1 and later Windows operating systems include diagnostic events that allow the system administrator to observe the mechanics of disk idle detection and ensure correct operation. These diagnostic events are displayed and logged by the PwrTest utility, which supports various Windows power management test scenarios.

This paper details the infrastructure that supports idle detection for disk devices, which includes hard disk drives based on rotational media. System manufacturers will learn how to configure the disk idle detection policies for maximum power savings or performance. System manufacturers will also learn how to use the PwrTest utility to validate correct operation of disk idle detection in their pre-installation images.

Preliminary Reading

Readers of this paper are encouraged to first review 'Power Policy Configuration and Deployment for Windows Vista,' which details the Windows Vista power policy configuration architecture. This white paper is available on the WHDC Web site.

Disk Idle Detection Overview

Disk idle detection is a cooperative arrangement between the Windows power manager and the disk software driver stack. This arrangement helps enable rich configuration of disk idle detection policies and helps achieve maximum mobile PC battery life.

Disk Idle Detection Requirements

Although disk idle detection is supported on all recent versions of the Windows operating system, the infrastructure and policies described in this paper apply to Windows Vista with Service Pack 1 and later versions of Windows.

Disk idle detection as described in this paper applies only to hard disk devices with rotational media connected to the system through an ATA-compatible bus, including IDE and SATA. Disk idle detection is not supported for hard disk devices connected through 1394 or USB. Disk idle detection is also not supported for hard disk devices connected to a storage controller that uses a Storport-based driver.

Disk Idle Detection Infrastructure

Disk idle detection is a cooperative arrangement between the Windows kernel power manager and the disk software driver stack. This arrangement allows for detailed policy configuration and automatic changes to the current idle detection policies based on system environment, including power source (AC or battery power).

Configuration Parameters
Disk idle detection policy parameters are delivered to the kernel power manager from the power policy store. The policy parameters are initially delivered shortly after boot of the system and thereafter as changes occur due to the user manipulating individual policy values or the active power plan.

Disk Activity
Applications and services on the system generate disk activity through various mechanisms, including file accesses, page file usage, or registry accesses.

Disk Activity Indicator
The power manager is notified of each disk read or write access. This allows the power manager to track the time since the last disk access and statistics for the amount of disk accesses over time.

Power-down Notification
If no disk activity has occurred for at least the current disk idle time‑out, the power manager sends a power-down notification to the disk software driver stack indicating that the disk should spin down. The notification takes the form of a device power I/O request packet (IRP) for the D3 device power state.

Spin-down Notification
The Microsoft ATA disk driver translates the D3 device power IRP into a standby-immediate ATA command. This command instructs the disk device to stop spinning the rotational media in the hard disk drive.



ATA Command Delivery
The disk controller driver issues the standby-immediate ATA command to the hard disk drive device. The rotational media in the disk drive stops spinning until further disk activity.

Power Source (AC/DC) Change Notification
The platform hardware and firmware can notify the ACPI driver of changes in the current system power source. For example, the system might transition from AC to DC (battery) power periodically during normal use of the system.

Power Source (AC/DC) Change Notification
The ACPI driver forwards the power source change notifications to the kernel power manager. Many power policies, including disk idle detection policies, have separate values for AC and DC (battery) power. If the system changes power sources, the kernel power manager automatically changes to the correct disk idle detection policy for AC or DC (battery) power.

Figure . Disk Idle Detection Infrastructure

If the disk is in the spin-down state and the disk driver detects additional disk activity, the disk driver automatically spins up the disk device by requesting a device power IRP for the D0 device power state.

Disk Idle Detection Policies

The configuration parameters for disk idle detection are stored as discrete power policy values. Integration of disk idle detection with power policy allows the policies to automatically change based on system power source (AC or battery power) and the user’s selection of power plan. For example, disk idle detection policies can aggressively favor power savings on battery power and in the Power Saver power plan. Similarly, disk idle detection can be completely disabled for the High Performance power plan.

Disk Idle Time-out

The primary disk idle detection policy is the disk idle time‑out, which is the amount of consecutive time without disk activity after which the disk should be powered down. Table 1 details the disk idle time-out power policy setting.

Table 1. Disk Idle Time-Out Policy

Friendly name

Turn off hard disk after

Description

Specify how long the hard drive is inactive before the disk turns off.

PowerCfg Alias

DISKIDLE

Group Policy Path

Administrative TemplatesSystemPower Management
Hard Disk SettingsTurn Off the Hard Disk

GUID

6738e2c4-e8a5-4a42-b16a-e040e769756e

Symbol

GUID_DISK_POWERDOWN_TIMEOUT

Defined In

Ntpoapi.h

Balanced Defaults

60 minutes (AC)

30 minutes (DC)

The disk idle time‑out is specified in seconds and has a minimum value of 30 seconds. Disk idle detection is evaluated on 15-second intervals. Therefore, the disk is placed in the spin-down state after the disk idle time‑out 15 seconds without disk activity.

Disk Burst Activity Time

Although the disk idle time‑out alone can be configured to favor power savings or performance, some Windows systems might exhibit very small amounts of disk activity separated by relatively long amounts of disk idle time. This pattern of disk activity impacts system power savings because the disk is powered up periodically. The disk then remains in the spin-up state for at least the disk idle time‑out, even if the amount of disk activity that caused the disk to spin up is very small.

The disk burst activity time addresses these scenarios by allowing the administrator to configure an amount of disk activity that will be ignored as the power manager accrues disk idle time. Table 2 details the disk burst activity time power policy setting.

Table 2. Disk Burst Activity Time Policy______________

Friendly name

Hard disk burst ignore time

Description

Ignores a burst of disk activity up to the specified time when determining if a hard disk is idle.

PowerCfg Alias

Not applicable

Group Policy Path

Not applicable

GUID

80e3c60e-bb94-4ad8-bbe0-0d3195efc663

Symbol

GUID_DISK_BURST_IGNORE_THRESHOLD

Defined In

Ntpoapi.h

Balanced Defaults

30 seconds (AC)

30 seconds (DC)

The power manager uses a sliding window algorithm that resets the disk idle time‑out counter if disk activity is observed for longer than the hard disk burst ignore time. Similarly, the current amount of hard disk burst ignore time is decremented for each period of observed disk inactivity.

Note that the disk burst ignore time policy is hidden. Administrators or system manufacturers must use the PowerCfg utility to change the disk burst ignore time policy value.

Disk Idle Detection Operation

The power manager uses both the disk idle time‑out and the disk burst ignore time policies to evaluate disk idle detection and determine when to power off the disk.

The disk is powered off if the amount of disk idle time is larger than the disk idle time‑out that is specified in power policy. If the disk burst ignore time is set to 0 (disabled), the current amount of disk idle time is reset each time the disk activity occurs. If the disk burst ignore time is set to a value greater than 0, then the amount of disk idle time is reset if the disk has been consecutively busy for the disk burst ignore time.



Figure 2. Disk Idle Detection Operation

Configuring Disk Idle Detection Policies

The configuration parameters for disk idle detection are exposed in power policy to enable easy configuration for end users and IT administrators. The primary method of power policy configuration, including the disk idle detection policies, is to use PowerCfg. PowerCfg is a command-line tool included with Windows Vista for enumerating and configuring power policy objects.

For an introduction to power policy, see 'Windows Vista Power Policy Configuration and Deployment' on the WHDC Web site.

Using PowerCfg to Configure Disk Idle Detection Policies

System manufacturers and administrators should use the PowerCfg utility to configure disk idle detection policies.

C:>powercfg /qh SCHEME_CURRENT SUB_DISK

Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)

Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442 (Hard disk)

Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e (Turn off hard disk after)

Minimum Possible Setting: 0x00000000

Maximum Possible Setting: 0xffffffff

Possible Settings increment: 0x00000001

Possible Settings units: Seconds

Current AC Power Setting Index: 0x000004b0

Current DC Power Setting Index: 0x00000078

Power Setting GUID: 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 (Hard disk burst ignore time)

Minimum Possible Setting: 0x00000000

Maximum Possible Setting: 0xffffffff

Possible Settings increment: 0x00000001

Possible Settings units: Seconds

Current AC Power Setting Index: 0x0000001e

Current DC Power Setting Index: 0x0000001e

In the preceding example, the disk idle time‑out for AC power is 1,200 (0x4b0) seconds, or 20 minutes. Similarly, the hard disk burst ignore time is 30 (0x1e) seconds for both AC and DC power.

It is important to remember that power policies might be different for each power plan on the system. In the preceding example, the SCHEME_CURRENT alias was used to enumerate settings for the current power plan, which is the Power Saver plan.

To change the disk idle time‑out or the disk burst ignore time‑out, PowerCfg should also be used. In the following example, the disk burst ignore time‑out is disabled (set to 0) for both AC and DC power on the current power plan. To make the configuration change global on the system, the administrator must update the AC and DC values on all installed power plans. Installed power plans can be enumerated by using the PowerCfg /LIST option:

C:>powercfg -setacvalueindex SCHEME_CURRENT SUB_DISK 80e3c60e-bb94-4ad8-bbe0-0d

3195efc663 0

C:>powercfg -setdcvalueindex SCHEME_CURRENT SUB_DISK 80e3c60e-bb94-4ad8-bbe0-0d

3195efc663 0

C:>powercfg -setactive SCHEME_CURRENT

Configuring Disk Idle Detection for Maximum Power Savings

The disk idle detection policy values can be configured to favor system performance or power savings.

To favor power savings, the disk idle time‑out should be reduced from the default value of 30 or 60 minutes. To further favor power savings, the disk burst ignore threshold should be set to a non-zero value between 15 and 60 seconds.

We suggest that changes to the disk idle detection policies scale appropriately with power plan as well as AC and DC power sources. For example, the disk idle time‑out should be shorter on battery (DC) than on AC power and the disk burst ignore threshold should be greater on battery power to favor quickly turning the disk off after small amounts of disk activity.

System manufacturers should evaluate changes to the disk idle detection policies on their specific systems with value-added software installed.

Configuring Disk Idle Detection for Maximum Performance

The disk idle detection policy values can be configured to favor system performance or power savings.

To favor performance, the disk idle time‑out can be extended from the default of 30 or 60 minutes or disabled entirely. To disable disk idle detection, set the disk idle time‑out to 0.

Another opportunity to favor performance and prevent the likelihood of frequent disk spin-down is to disable the disk burst ignore behavior. To disable the disk burst ignore behavior, set the disk burst ignore time‑out to 0.

We suggest that changes to the disk idle detection policies scale appropriately with power plan as well as AC and DC power sources. For example, the disk idle time‑out should be longer on AC power than on battery (DC power). Additionally, the disk idle time‑out can be disabled on both AC and DC for High Performance power plans, but still enabled on AC and DC for Power Saver plans.

System manufacturers should evaluate changes to the disk idle detection policies on their specific systems with value-added software installed.

Configuring the Disk Burst Ignore Time-Out

System administrators and IT professionals should pay special attention to the disk burst ignore time-out policy value on systems with multiple internal hard disk devices. Disk idle detection applies equally to all supported disk devices on the system, regardless of whether they are the disk from which the Windows installation was booted.

Systems with page files configured on disks other than the Windows installation boot disk.

Workloads with highly intermittent disk activity (such as once per hour for 2 seconds) where very short latency is required.

If t he disk burst ignore time-out is enabled, the system favors power savings over performance and aggressively spins down disk devices, even when a relatively long disk idle time-out is configured in power policy.

Using PwrTest to Observe Disk Idle Detection

System manufacturers and enterprise administrators might need to validate that disk idle detection is functioning correctly on their systems. The PwrTest utility, which is provided in the Windows Driver Kit (WDK), is designed to facilitate validation of disk idle detection. The PwrTest utility features a DISK scenario that displays information about the disks present on the system, their current disk idle detection policies, and the current power state of the disk device.

To obtain the PwrTest utility, install the WDK. More information is available on the WHDC Web site.

PwrTest DISK Scenario Overview

The device ID for disks currently registered for idle detection.

The disk idle detection policy values currently in use (disk idle time‑out and disk burst ignore time‑out).

The amount of idle time accrued for each disk.

The amount of disk burst time ignored for each disk.

The power state (on, off) for each disk.

The PwrTest DISK scenario is designed to allow system manufacturers to validate that the disk can be powered off on systems with the original equipment manufacturer (OEM) pre-installation image installed.

C:Program FilesMicrosoft PwrTest>pwrtest /disk

Executing PwrTest DISK scenario for 30 minutes. Press 'q' anytime to quit

Timestamp D# St Event Data Notes

0 On New IDEDiskHTS721010G9SA00_____ _______ ______ __________MCZIC10

V5&5aa830&0&0.0.0

0 On Busy Idle: 0s, NonIdle: 0s

* -- Pol Timeout: 120s, IgnoreThreshold: 0s

0 On Busy Idle: 0s, NonIdle: 0s Idle Reset

0 On Busy Idle: 0s, NonIdle: 0s Idle Reset

0 On Idle: 15s, NonIdle: 0s

0 On Idle: 30s, NonIdle: 0s

0 On Idle: 45s, NonIdle: 0s

0 On Idle: 60s, NonIdle: 0s

0 On Busy Idle: 0s, NonIdle: 0s Idle Reset

0 On Busy Idle: 0s, NonIdle: 0s Idle Reset

0 On Idle: 15s, NonIdle: 0s

11:29:05 0 On Idle: 30s, NonIdle: 0s

11:29:20 0 On Idle: 45s, NonIdle: 0s

11:29:35 0 On Idle: 60s, NonIdle: 0s

11:29:50 0 On Idle: 75s, NonIdle: 0s

11:30:05 0 On Idle: 90s, NonIdle: 0s

11:30:20 0 On Idle: 105s, NonIdle: 0s

11:30:35 0 Off Idle: 120s, NonIdle: 0s Spin-down

11:30:50 0 Off Idle: 135s, NonIdle: 0s

11:31:05 0 Off Idle: 150s, NonIdle: 0s

Timestamp
The current time when the event occurred.

D# (Disk Number)
The number of the disk associated with this event. Disk devices are enumerated initially when the DISK scenario starts or on demand as new disk devices are detected.

St (State)
Whether the disk is currently powered on or off.

Event
The overall event type, which is one of the following:

New
A new disk device has been detected. The disk device’s hardware ID appears.



Busy
The disk was busy during the last 15-second period. The accrued idle time and non-idle time appear.

Pol
The disk idle time‑out policy has been changed. This occurs when the policy is changed by using Power Options or the PowerCfg utility. The disk idle time‑out policy also changes when the system transitions from AC to DC power. The disk idle time‑out and disk burst ignore time policy values appear.

PwrTest also stores disk event data in memory. When the DISK scenario has completed, PwrTest generates a corresponding XML log file that can be post-processed to inspect correct function of disk idle detection. The XML file contains all of the data that PwrTest displays in a format that is easily parsed by script utilities or imported into a spreadsheet program for advanced analysis. The XML log elements are described in the following section.

PwrTest DISK Scenario XML Log Elements

Table 3. PwrTest DISK Scenario XML Log Elements

Element

Description

<DiskIdleEvents>

PwrTest DISK scenario event information.

<DiskIdleChangeEvent>

Event data relating to arrival or removal of a disk device.

<Timestamp>

The time when the event occurred.

<DiskNumber>

The number of the disk. PwrTest maintains a list of disk devices and associates a 0-based index list of disk numbers.

<InstancePath>

The hardware/instance ID of this disk device.

<Description>

A textual description of the event impact, such as 'DeviceDetected' when a new disk device is first discovered.

<DiskIdleEvent>

A periodic event that indicates disk spin-down statistics, including accrued idleness and current power state.

<Device>

A pointer value to the disk device’s DEVICE_OBJECT structure. Software must not use the pointer value directly—it is provided solely to determine corresponding <DiskIdleEvent> elements.

<Pdo>

A pointer value to the DEVICE_OBJECT structure of the physical device object (PDO) in the disk device’s driver stack. Software must not use the pointer value directly—it is provided solely to determine corresponding <DiskIdleEvent> elements.

<BusyCount>

The number of disk read/write actions accrued since the last <DiskIdleEvent>.

<AccruedBusyCount>

The total accrued disk read/write actions for the corresponding disk.

<IdlePowerState>

The device power state (such as '3' for D3) to which the disk device will transition when it is turned off.

<CurrentPowerState>

The current device power state of the disk device.

<Timeout>

The current spin-down time‑out in use for the disk device, in seconds.

<IgnoreThreshold>

The current amount of disk active time to be ignored before resetting accrued idle time, in seconds.

<AccruedIdleTime>

The accrued disk idle time, in seconds. The accrued disk idle time must be equal to or larger than the time‑out for the disk to be spun down.

<AccruedNonIdleTime>

The amount of accrued non-idle time, in seconds. If the accrued non-idle time is greater than the ignore threshold, the accrued idle time is reset.

<Analysis>

A textual description of the result of this event, such as 'Spin-down' when the accrued idle time is equal to or larger than the current time‑out.

<DiskIdlePolicyChange>

An indication that the spin-down policy value has changed. This element includes updated <Timeout> and <IgnoreThreshold> elements.

Conclusion

Disk idle detection is a cooperative arrangement between the Windows power manager and the disk software driver stack. This arrangement helps enable rich configuration of disk idle detection policies and helps achieve maximum mobile PC battery life. The configuration parameters for disk idle detection are stored as discrete power policy values, which change based on system power source (AC or battery power) and the user’s selection of power plan.

OEMs and system integrators can customize the disk idle detection policies to favor power savings or performance. Disk idle detection policies are configured by using the PowerCfg utility, and operation of disk idle detection can be observed by using the PwrTest utility.

Call to Action

Validate correct operation of disk idle detection on their platforms.

Customize the disk idle time‑out and the disk burst ignore time‑out policies. The disk idle detection policies can be customized for performance or power savings.

Observe disk idle detection diagnostic events by using the PwrTest utility and Windows Vista with Service Pack 1.

Resources

PowerCfg utility command-line documentation on the TechNet Web site
https://technet2.microsoft.com/WindowsVista/en/library/1d58b934-f56a-4796-b2df-7be2eb9c03bc1033.mspx?mfr=true
Advanced policy parameters documented in “Processor Power Management in Windows Vista and Windows Server 2008” on the WHDC Web site at:
https://www.microsoft.com/whdc/system/pnppwr/powermgmt/ProcPowerMgmt.mspx

PwrTest utility, command-line documentation on MSDN
https://msdn2.microsoft.com/en-us/library/aa906552.aspx

WHDC Web site
https://www.microsoft.com/whdc
How to Obtain the WDK:
https://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx

Windows Vista Power Policy Configuration and Deployment
https://www.microsoft.com/whdc/system/pnppwr/powermgmt/PMpolicy_Vista.mspx






Politica de confidentialitate



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 888
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2021 . All rights reserved

Distribuie URL

Adauga cod HTML in site