Performance Tuning Windows 2012: Power Consumption and Performance

In this article of our Windows 2012 series we’ll discuss the power consumption efficiency and performance trade-offs. Windows Server 2012 is optimized for excellent energy efficiency with minimum performance impact, but there are some tradeoffs.

We’ll discuss the energy-efficiency tradeoffs to help you decide if you need to adjust the power settings of your server. Although for the most generic workloads, you should not have to make many changes to the power tuning settings when running Windows Server 2012.




How to calculate server energy efficiency

When adjusting your server settings for energy savings, you should consider performance. Tuning your energy settings affects performance and not always in proportionate amounts. Consider your power budget and performance goals to determine whether the tradeoff is acceptable. You can calculate your server’s energy efficiency ratio for a useful metric that incorporates power and performance information. Energy efficiency is the ratio of work that is done to the average power that is required during a specified amount of time. The equation would then be like: Energy Efficiency = Rate of Work Done / Avg. Watts Required.

You can use this metric to set targets that take into consideration the tradeoff between power and performance. A target of 10 percent energy savings across the entire data center fails to capture the corresponding effects on performance and vice versa. Similarly, if you tune your server to increase performance by 5 percent, resulting in 10 percent higher energy consumption, this result might not be acceptable to you.  Using the energy efficiency metric, you can make a more informed decision than using power or performance metrics by themselves.

Measuring Energy Consumption

Before you tune your server for energy efficiency, you should establish a baseline power measurement. You can use the power metering and budgeting features in Windows Server 2012 to view system-level energy consumption using Performance Monitor. You can only use metering and budgeting if the hardware model of your server qualifies for the Enhanced Power Management qualification as part of the  the Windows Logo Program. Or you can manually check for the counters in PerfMon. To do so, open PerfMon, select Add Counters, and locate the Power Meter counter group. If named instances of power meters appear, then your platform supports metering. The Power counter that shows power in watts appears in the selected counter group. If your server platform does not support metering, you could use a physical device connected to the power supply to measure energy consumption. To establish a baseline, you should measure the average power required at various system load points, from idle to 100 percent, also called a “load line.”

You can use load lines to evaluate the performance and energy consumption of different configurations at various load points. There can be scenarios where one configuration works best for heavy workloads and one works best for light workloads. It is important that you understand your workload requirements in order to select an optimal configuration. Don’t assume that when you find a good configuration, it will always remain optimal. You should measure system utilization and energy consumption on a regular basis and after changes in workloads, workload levels, or server hardware.

Diagnosing Energy Efficiency Issues

You can use the Windows PowerCfg command-line tool to analyze the idle energy efficiency of your server. When you run the powercfg command with the /energy option, it performs a 60-second test to detect potential energy efficiency issues. The utility will generate a simple HTML report for your review. To make sure you get  n accurate analysis, close all local applications before running the command. By the way, Windows PowerCfg is not available in operating systems earlier than Windows 7 and Windows Server 2008 R2.

Some of the behavioral issues that are detected by the powercfg /energy command are; shortened timer tick rates, drivers that lack power management support, and excessive CPU utilization. This utility provides a simple way to identify and fix power management issues, and can help establishing significant cost savings in a large datacenter.

Using Power Plans in Windows Server

Windows Server 2012 has three built-in power plans designed to meet different sets of business needs. These plans provide a simple way to customize a server to meet power or performance goals. The table below shows the different power plans and the common scenarios when to use each plan:


Balanced (recommended) Default setting. Targets good energy efficiency with minimal performance impact. · General computing Matches capacity to demand. Energy-saving features balance power and performance.
High Performance Increases performance at the cost of high energy consumption. Power and thermal limitations, operating expenses, and reliability considerations apply. · Low latency applications· Application code that is sensitive to processor performance changes Processors are always locked at the highest performance state (including “turbo” frequencies). All cores are unparked.
Power Saver Limits performance to save energy and reduce operating cost. · Deployments with limited power budgets· Thermal constraints Caps processor frequency at a percentage of maximum (if supported), and enables other energy-saving features.


Processor Power Management Tuning

Each power plan shown in the table represents a combination of various power management parameters. The built-in plans are collections of recommended settings that cover a variety of workloads and scenarios. However, these plans might not meet your individual needs. The following sections describe ways to tune specific processor power management parameters to meet objectives not addressed by the built-in plans. If you need to understand power parameters better, check out the MSDN article Power Policy Configuration and Deployment in Windows for a detailed explanation of power plans and parameters. It also includes instructions for adjusting parameters using the PowerCfg tool.

Processor Performance Boost Mode

Intel Turbo Boost and AMD Turbo CORE allow processors to perform better at high system loads. However, this feature increases energy consumption, so Windows Server 2012 configures Turbo technologies based on the power policy that is in use and the specific processor implementation. Turbo is enabled for High Performance power plans on all Intel and AMD processors and it is disabled for Power Saver power plans. For Balanced power plans on systems that rely on traditional frequency management, Turbo is enabled by default, but only if the platform supports the EPB register.

For Intel Nehalem and AMD processors, Turbo is disabled by default on P-state-based platforms. However, if a system supports Collaborative Processor Performance Control (CPPC) (a new alternative mode of performance communication between the operating system and the hardware) Turbo may be enabled if the Windows operating system dynamically requests the hardware to deliver the highest possible performance levels.

To enable or disable the Turbo Boost feature, you must configure the Processor Performance Boost Mode parameter. Processor Performance Boost Mode has five allowable values. We listed them in the table below. For P-state-based control, the choices are Disabled, Enabled (Turbo is available to the hardware whenever nominal performance is requested), and Efficient (Turbo is available only if the EPB register is implemented). For CPPC-based control, the choices are Disabled, Efficient Enabled (Windows specifies the exact amount of Turbo to provide), and Aggressive (Windows asks for “maximum performance” to enable Turbo). In Windows Server 2012, the default value for Boost Mode is 3.

Value (Name) P-state-based Behavior CPPC Behavior
0 (Disabled) Disabled Disabled
1 (Enabled) Enabled Efficient Enabled
2 (Aggressive) Enabled Aggressive
3 (Efficient Enabled) Efficient Efficient Enabled
4 (Efficient Aggressive) Efficient Aggressive

You can user the PowerCfg command line utility and enter the following commands to enable Processor Performance Boost Mode on the current power plan:

  • Powercfg -setacvalueindex scheme_current sub_processor PERFBOOSTMODE 1
  • Powercfg -setactive scheme_current

This does not require you  to reboot the server. To set this value for power plans other than the currently selected plan, you can use aliases such as SCHEME_MAX (Power Saver), SCHEME_MIN (High Performance), and SCHEME_BALANCED (Balanced) in place of SCHEME_CURRENT. Replace “scheme current” in the powercfg -setactive commands previously shown with the desired alias to enable that power plan. For example, to adjust the Boost Mode in the Power Saver plan and make Power Saver the current plan, run the following commands:

  • Powercfg -setacvalueindex scheme_max sub_processor PERFBOOSTMODE 1
  • Powercfg -setactive scheme_max

Minimum and Maximum Processor Performance State

Processors can change between performance states quickly to match supply to demand, delivering performance where necessary and saving energy when possible. If your server has specific high-performance or minimum-power-consumption requirements, you might consider configuring the Minimum Processor Performance State parameter or the Maximum Processor Performance State parameter. The values for the Minimum and Maximum Processor Performance State parameters are a percentage of maximum processor frequency, with a value in the range 0 – 100.

If your server requires ultra-low latency, invariant CPU frequency, or the highest performance levels, you might not want the processors switching to lower-performance states. For such a server, you can cap the minimum processor performance state at 100 percent by using the following commands:

  • Powercfg -setacvalueindex scheme_current sub_processor PROCTHROTTLEMIN 100
  • Powercfg -setactive scheme_current

If your server requires lower energy consumption, you might want to cap the processor performance state at a percentage of maximum. For example, you can restrict the processor to 75 percent of its maximum frequency by using the following commands:

  • Powercfg -setacvalueindex scheme_current sub_processor PROCTHROTTLEMAX 75
  • Powercfg -setactive scheme_current

Note that can only cap processor performance at a percentage if the processor supports it. Check your processor documentation to determine whether it does, or view the Perfmon counter “% of maximum frequency” in the Processor group to see if any frequency caps were applied.

Processor Performance Core Parking Maximum and Minimum Cores

Core parking is a technology where The Windows processor power management engine and the scheduler work together to dynamically adjust the number of cores that are available to run threads. The PPM engine chooses a minimum number of cores for the threads that will be scheduled. Cores that are chosen to “park” will not have any threads scheduled, and drop into very low power states when they are not processing interrupts, DPCs, or other strictly affinitized work. The remaining set of “unparked” cores are responsible for the remainder of the workload. Core parking can potentially increase energy efficiency during lower usage periods on the server because parked cores can drop into deep low-power states.

For most servers, the default core-parking settings provides a decent balance of performance and energy efficiency.  If your server has specific core parking requirements, you can control the number of cores that are available to park by using the Processor Performance Core Parking Maximum Cores parameter or the Processor Performance Core Parking Minimum Cores parameter in Windows Server 2012.

One scenario that core parking has difficulty with is when there are one or more active threads associated to a non-trivial subset of CPUs in a NUMA node (that is, more than 1 CPU, but less than the entire set of CPUs on the node). When the core parking algorithm is picking cores to unpark (assuming an increase in workload intensity occurs), it does not know to pick the cores within the active affinitized subset (or subsets) to unpark, and thus may end up unparking cores that won’t actually be utilized.

The values for these parameters are percentages in the range 0 – 100. The Processor Performance Core Parking Maximum Cores parameter controls the maximum percentage of cores that can be unparked (available to run threads) at any time, while the Processor Performance Core Parking Minimum Cores parameter controls the minimum percentage of cores that can be unparked. To turn off core parking, set the Processor Performance Core Parking Minimum Cores parameter to 100 percent by using the following commands:

  • Powercfg -setacvalueindex scheme_current sub_processor CPMINCORES 100
  • Powercfg -setactive scheme_current

To reduce the number of schedulable cores to 50 percent of the maximum count, set the Processor Performance Core Parking Minimum Cores parameter to 50 as follows:

  • Powercfg -setacvalueindex scheme_current sub_processor CPMAXCORES 50
  • Powercfg -setactive scheme_current

Processor Performance Core Parking Utility Distribution

Utility Distribution is an algorithmic optimization in Windows Server 2012 that is designed to improve power efficiency for some workloads. It tracks “unmovable” CPU activity (that is, DPCs, interrupts, or strictly affinitized threads), and it predicts the future work on each processor based on the assumption that any movable work can be distributed equally across all unparked cores. Utility Distribution is enabled by default for the Balanced power plans for some processors. It can reduce processor power consumption by lowering the requested CPU frequencies of workloads that are in a reasonably steady state. However, Utility Distribution is not necessarily a good algorithmic choice for workloads that are subject to high activity bursts or for programs where the workload quickly and randomly shifts across processors. For such workloads, we recommend disabling Utility Distribution by using the following commands:

  • Powercfg -setacvalueindex scheme_current sub_processor DISTRIBUTEUTIL 0
  • Powercfg -setactive scheme_current


Hopefully this article has been helpful and given you an overview of just how much you can tweak the processor performance/energy efficiency ratio with Windows 2012. In our next article we’ll cover optimizations of the network subsystem.