Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/glenn/wp-config.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/glenn/wp-config.php:94) in /var/www/html/blogs/glenn/wp-includes/feed-rss2.php on line 8
Power Management Archives - Glenn Berry https://www.sqlskills.com/blogs/glenn/tag/power-management/ Semi-random musings about SQL Server performance Tue, 13 Nov 2018 18:52:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 Windows Power Plan Effects on Newer Intel Processors https://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/ https://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/#comments Wed, 11 Feb 2015 01:11:00 +0000 http://3.209.169.194/blogs/glenn/?p=941 I recently was working with a customer who had purchased a new Lenovo ThinkServer RD640 with two 22nm Intel Xeon E5-2697 v2 Ivy Bridge-EP processors. This processor was introduced in Q3 of 2013, and it is one generation behind the latest Intel Xeon E5-2600 v3 series processors. This server had a new, default installation of […]

The post Windows Power Plan Effects on Newer Intel Processors appeared first on Glenn Berry.

]]>
I recently was working with a customer who had purchased a new Lenovo ThinkServer RD640 with two 22nm Intel Xeon E5-2697 v2 Ivy Bridge-EP processors. This processor was introduced in Q3 of 2013, and it is one generation behind the latest Intel Xeon E5-2600 v3 series processors.

This server had a new, default installation of Windows Server 2012 R2 Standard Edition, which meant that it was using the default Windows Balanced Power Plan. Running CPU-Z 1.71.1 showed the actual core speed of Core #0 while the system was at rest, with the Balanced Power Plan (Figure 1) and with the High Performance Power Plan (Figure 2).

clip_image002

Figure 1: CPU-Z Results with Balanced Power Plan

Changing the Power Plan to High Performance had an immediate effect on the processor core speed, as shown in Figure 2.

clip_image002[5]

Figure 2: CPU-Z Results with High Performance Power Plan

 

Here are the Geekbench results for the default Balanced Power Plan (Figure 3) and the High Performance Power Plan (Figure 4). The Single-Core score is more relevant here, since the 32-bit GUI version of Geekbench 3.3 only uses 32 total cores (and there are 48 logical cores in this server).

clip_image002[7]

Figure 3: Geekbench 3.3 Results with Balanced Power Plan

 

clip_image002[9]

Figure 4: Geekbench 3.3 Results with High Performance Power Plan

You need to keep in mind that your BIOS power management settings will override your Windows Power Plan settings, so it is very important to check what is going on with CPU-Z. For you virtualization users, you need to check what your hypervisor power management settings are doing, because they will override what is happening with the guest OS Windows Power Plan settings.

Not only does power management affect your processor core speed (and CPU/memory benchmarks like Geekbench), but it also affects things like the performance of your PCIe expansion slots. In case you want some official Microsoft guidance on this subject, the Microsoft KB article linked below discusses it in quite a bit of detail.

Slow Performance on Windows Server 2008 R2 when using the “Balanced” Power Plan

This issue has been around since Windows Server 2008, and still exists with Windows Server 2012 R2.

The post Windows Power Plan Effects on Newer Intel Processors appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/windows-power-plan-effects-on-newer-intel-processors/feed/ 3
CPU-Z Version 1.67 is Available https://www.sqlskills.com/blogs/glenn/cpu-z-version-1-67-is-available/ https://www.sqlskills.com/blogs/glenn/cpu-z-version-1-67-is-available/#respond Tue, 22 Oct 2013 21:56:55 +0000 http://3.209.169.194/blogs/glenn/?p=845 On October 12, 2013, Frank Delattre released CPU-Z 1.67, which has some support for some new processors and a new validation tool. Even though CPU-Z was originally developed for the hardware enthusiast over-clocking community, it actually is very valuable for server administrators and for database professionals. First, it lets you identify your exact processor model, […]

The post CPU-Z Version 1.67 is Available appeared first on Glenn Berry.

]]>
On October 12, 2013, Frank Delattre released CPU-Z 1.67, which has some support for some new processors and a new validation tool. Even though CPU-Z was originally developed for the hardware enthusiast over-clocking community, it actually is very valuable for server administrators and for database professionals. First, it lets you identify your exact processor model, with all of its specifications and instruction set support. Second, it helps confirm whether you have any form of power management in effect that is reducing the current speed of the processor cores on your database server.

This can be caused by your Windows Power Plan in Windows Server 2008 or newer. By default, the Power Plan is set to Balanced instead of High Performance like we want for a database server. This is easy to change, and goes into effect immediately without rebooting the server. After you make this change in Windows, you should use CPU-Z to see what your processor core speed is. If it is still throttled back, you are going to have to change your BIOS power management setting.

This is necessary because the Windows Power Plan can be overridden by hardware-level power management settings that are set in your main BIOS setup. You typically want to set your hardware-level power management to OS Control or to Max Performance in the BIOS. This will let your processors take advantage of Intel Turbo Boost or AMD Turbo Core, and it will let them run at their full base clock speed or above at all times. This is quite important for OLTP query performance, but have also seen it affect ETL performance. Many storage vendors, such as Fusion-io and LSI also recommend that you make these changes to avoid having the PCI-E expansion slots affected by power management.

Figure 1 shows my desktop processor running at full speed with Turbo Boost (see the Core Speed indicator at the bottom left quarter of the form), while Figure 2 shows the processor being throttled back due to power management.

image

Figure 1: Processor Core Speed without any Power Management

image

Figure 2: Processor Core Speed with Power Management in Effect

I have seen OLTP query performance improve by as much as 25% by making these simple changes. The level of improvement you will see depends on the exact processors you are using (newer processors like Haswell, Ivy Bridge, and Sandy Bridge handle power management better than older processors, such as Nehalem and Westmere), and whether or not you have other big performance bottlenecks.

The post CPU-Z Version 1.67 is Available appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/cpu-z-version-1-67-is-available/feed/ 0
A SQL Server Hardware Tidbit a Day – Day 27 https://www.sqlskills.com/blogs/glenn/a-sql-server-hardware-tidbit-a-day-day-27/ https://www.sqlskills.com/blogs/glenn/a-sql-server-hardware-tidbit-a-day-day-27/#comments Mon, 29 Apr 2013 20:12:32 +0000 http://3.209.169.194/blogs/glenn/?p=750 For Day 27 of this series, I am going to talk about Power Management and its effect on processor performance. I have written about this subject a couple of times before, here and here. Other people, such as Paul Randal (blog|Twitter) and Brent Ozar (blog|Twitter) have written about this subject here and here. Power Management […]

The post A SQL Server Hardware Tidbit a Day – Day 27 appeared first on Glenn Berry.

]]>
For Day 27 of this series, I am going to talk about Power Management and its effect on processor performance. I have written about this subject a couple of times before, here and here. Other people, such as Paul Randal (blog|Twitter) and Brent Ozar (blog|Twitter) have written about this subject here and here.

Power Management is when the clock speed of your processors is reduced (usually by changing the processor multiplier value) in order to use less electrical power when the processor is not under a heavy load. On the surface, this seems like a good idea, since electrical power costs can be pretty significant in a data center. Throttling back a processor can save some electricity and reduce your heat output, which can reduce your cooling costs in a data center. Unfortunately, with some processors, and with some types of SQL Server workloads (particularly OLTP workloads), you will pay a pretty significant performance price (in the range of 20-25%) for those electrical power savings.

When a processor has power management features that are enabled, the clock speed of the processor will vary based on the load the processor is experiencing. You can watch this in near real-time with a tool like CPU-Z, that displays the current clock speed of Core 0. The performance problem comes from the fact that some processors don’t seem to react fast enough to an increase in load to give their full performance potential, particularly for very short OLTP queries that often execute in a few milliseconds.

This problem seems to show up especially with Intel Xeon 5500, 7500 (Nehalem-EP and EX), Intel Xeon 5600, E7 series processors (Westmere-EP and EX families) and with the AMD Opteron 6100, 6200, and 6300 series (Magny Cours, Bulldozer and Piledriver families). Much older processors don’t have any power management features, and some slightly older processors (such as the Intel Xeon 5300 and 5400 series) seem to handle power management slightly better. I have also noticed that the Intel Sandy Bridge-EP processors seem to handle power management a little better than the Nehalem and Westmere did, i.e. they don’t show as noticeable of a performance decrease when power management is enabled.

Basically, you have two types of power management that you need to be aware of as a database professional. The first type is hardware-based power management, where the main system BIOS of a server is set to allow the processors to manage their own power states, based on the load they are seeing from the operating system. The second type is software-based power management, where the operating system (with Windows Server 2008 and above) is in charge of power management using one of the standard Windows Power Plans, or a customized version of one of those plans. When you install Windows Server 2008 or above, Windows will be using the Balanced Power Plan by default. When you are using the Balanced Power Plan, Intel processors that have Turbo Boost Technology will not use Turbo Boost (meaning that they will not temporarily overclock individual processor cores for more performance).

So, after all of this, what do I recommend you do for your database server? First, check your Windows Power Plan setting, and make sure you are using the High Performance Power Plan. This can be changed dynamically without a restart. Next, run CPU-Z, and make sure your processor is running at or above its rated speed. If it is running at less than its rated speed with the High Performance Power Plan, that means that you have hardware power management overriding what Windows has asked for. That means you are going to have to restart your server (in your next maintenance window) and go into your BIOS settings and either disable power management or set it to OS control (which I prefer).

The post A SQL Server Hardware Tidbit a Day – Day 27 appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/a-sql-server-hardware-tidbit-a-day-day-27/feed/ 4