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
Windows Server 2012 R2 Archives - Glenn Berry https://www.sqlskills.com/blogs/glenn/category/windows-server-2012-r2/ Semi-random musings about SQL Server performance Sun, 03 May 2020 23:56:11 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 Operating System Support for SQL Server Versions https://www.sqlskills.com/blogs/glenn/operating-system-support-for-sql-server-versions/ https://www.sqlskills.com/blogs/glenn/operating-system-support-for-sql-server-versions/#comments Thu, 12 Jan 2017 23:13:03 +0000 http://3.209.169.194/blogs/glenn/?p=1142 (New: we’ve published a range of SQL Server interview candidate screening assessments with our partner Kandio, so you can avoid hiring an ‘expert’ who ends up causing problems. Check them out here.) There are currently six major versions of SQL Server that I commonly see being used in Production, along with five major versions of […]

The post Operating System Support for SQL Server Versions appeared first on Glenn Berry.

]]>
(New: we’ve published a range of SQL Server interview candidate screening assessments with our partner Kandio, so you can avoid hiring an ‘expert’ who ends up causing problems. Check them out here.)

There are currently six major versions of SQL Server that I commonly see being used in Production, along with five major versions of Windows Server. Only certain combinations of SQL Server and Windows Server are officially supported by Microsoft, but tracking down this information is a little tedious.

Table 1 shows these possible combinations and whether they are officially supported by Microsoft. One possibly surprising combination is the fact that SQL Server 2012 is not officially supported on Windows Server 2016. Perhaps this is less surprising if you keep in mind that SQL Server 2012 will fall out of mainstream support on July 11, 2017, which is not that far away.

Picture1

Table 1: OS Support for Recent Versions of SQL Server

The available links that document this are listed below:

Hardware and Software Requirements for Installing SQL Server 2008 R2

Hardware and Software Requirements for Installing SQL Server 2012

Hardware and Software Requirements for Installing SQL Server 2014

Hardware and Software Requirements for Installing SQL Server (for 2016 and later)

If you are getting ready to deploy a new instance of SQL Server 2014 or SQL Server 2016, then you should prefer Windows Server 2016, even though they are also supported on older operating systems. If you are getting ready to deploy a new instance of SQL Server 2008 through SQL Server 2012, then you should prefer Windows Server 2012 R2, even though they are supported on older operating systems.

Finally, if you are getting ready to deploy a new instance of SQL Server 2005, then I feel a little sorry for you! SQL Server 2005 is out of extended support, and it is missing so many useful features that were added in newer versions of SQL Server.

Actually, I recently helped a client deploy some new instances of SQL Server 2005 for some pretty valid business reasons. We ended up deploying to a VM (on new, very fast host hardware) that was running Windows Server 2008 R2, which worked perfectly fine.

The post Operating System Support for SQL Server Versions appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/operating-system-support-for-sql-server-versions/feed/ 24
AES-NI Encryption Support in SQL Server 2016 https://www.sqlskills.com/blogs/glenn/aes-ni-encryption-support-in-sql-server-2016/ https://www.sqlskills.com/blogs/glenn/aes-ni-encryption-support-in-sql-server-2016/#respond Fri, 10 Jun 2016 19:51:35 +0000 http://3.209.169.194/blogs/glenn/?p=1091 Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these posts, SQL 2016 – It Just Runs Faster – AlwaysOn AES-NI Encryption describes how SQL Server 2016 improved and simplified Endpoint creation for AlwaysOn AGs to default to AES, and to better […]

The post AES-NI Encryption Support in SQL Server 2016 appeared first on Glenn Berry.

]]>
Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these posts, SQL 2016 – It Just Runs Faster – AlwaysOn AES-NI Encryption describes how SQL Server 2016 improved and simplified Endpoint creation for AlwaysOn AGs to default to AES, and to better leverage hardware support for AES-NI (when you are also running on Windows Server 2012 R2 or newer).

Intel describes AES-NI this way:

Intel AES New Instructions (Intel AES-NI) are a set of instructions that enable fast and secure data encryption and decryption. AES-NI are valuable for a wide range of cryptographic applications, for example: applications that perform bulk encryption/decryption, authentication, random number generation, and authenticated encryption.

Intel provides more complete documentation of AES here:

Intel Advanced Encryption Standard (Intel AES) Instructions Set

Now that we have a better idea of what AES-NI is, we need to know which server processors have AES-NI support. AES-NI was introduced with the 32nm Westmere microarchitecture. In the server space, this means the Intel Xeon 5600 product family (Westmere-EP) for two-socket servers and the Intel Xeon E7-4800/8800 product family (Westmere-EX) for four and eight-socket servers. Any newer Intel product family will also have AES-NI support.

These product families were released in Q1 2010 and Q2 2011 respectively, so they are both pretty old by modern standards. If you are planning to upgrade to SQL Server 2016, I would hope that you would use a new server with newer processors (ideally the latest 14nm Broadwell-EP or Broadwell-EX).

You can also use CPU-Z to confirm whether a particular processor has AES-NI support. Just to confuse things, CPU-Z displays AES-NI support as “AES”, which is the name of the broader standard. Figure 1 shows AES as one of the supported instructions for an Intel Xeon X5660 processor.

 

image

Figure 1: CPU-Z CPU Details for Intel Xeon X5650

 

The post AES-NI Encryption Support in SQL Server 2016 appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/aes-ni-encryption-support-in-sql-server-2016/feed/ 0
Hardware Extension Support in SQL Server 2016 https://www.sqlskills.com/blogs/glenn/hardware-extension-support-in-sql-server-2016/ https://www.sqlskills.com/blogs/glenn/hardware-extension-support-in-sql-server-2016/#comments Wed, 08 Jun 2016 23:25:46 +0000 http://3.209.169.194/blogs/glenn/?p=1088 Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these, How It Works: SQL Server 2016 SSE/AVX Support talks about how SQL Server 2016 added the use of SSE and AVX instructions in various code paths to improve performance when your processor […]

The post Hardware Extension Support in SQL Server 2016 appeared first on Glenn Berry.

]]>
Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these, How It Works: SQL Server 2016 SSE/AVX Support talks about how SQL Server 2016 added the use of SSE and AVX instructions in various code paths to improve performance when your processor supports one of those instruction sets.

Unless you are a hardware enthusiast, you might be wondering what these instructions are and how you can determine whether your processor supports them or not. First, we have some basic definitions:

Advanced Vector Extensions (AVX) were introduced in the server space with the Sandy Bridge-EP architecture, which was released in Q1 2012. This was the Intel Xeon E5-2600 Product Family. This means that if you have a server with Intel Xeon E5-2600 (Sandy Bridge-EP), Intel Xeon E5-2600 v2 (Ivy Bridge-EP), Intel Xeon E5-2600 v3 (Haswell-EP), or Intel Xeon E5-2600 v4 (Broadwell-EP) processors, you will have AVX support which SQL Server 2016 will use for better performance.

You will also have AVX support with the Intel Xeon E7-4800/8800 v2 (Ivy Bridge-EX), Intel Xeon E7-4800/8800 v3 (Haswell_EX), and Intel Xeon E7-4800/8800 v4 (Broadwell-EX) product families. Anything older than these families will not have AVX support.

This is yet another reason to use a new server when you upgrade to SQL Server 2016 (which is a good idea anyway for lots of other reasons).

Advanced Vector Extensions 2 (AVX2), is a newer version of AVX that was introduced with the Haswell-EP/EX architecture. If you have a Haswell-EP/EX or Broadwell-EP/EX processor, then you will have AVX2 support.

Streaming SIMD Extensions (SSE) are a much older instruction set that were introduced back in 1999. Since then, there have been several newer versions such as SSE2, SSE3, SSE4.1, and SSE4.2. The latest SSE4.2 version was introduced in the Nehalem-EP/EX architecture, which came out in Q1 2009 and Q1 2010 respectively. This means that the Intel Xeon 5500 (Nehalem-EP) and Intel Xeon 7500 (Nehalem-EX) Product families are the oldest models that will have SSE4.2 support. From Bob’s post, it appears that the same code path in SQL Server 2016 will be used if you have any version of SSE (but you don’t have AVX or AVX2 support), so even much older Xeon processors will have some level of SSE support. Just to be clear, AVX and AVX2 are newer and better than any version of SSE.

The CPU-Z utility shows the various extension instructions supported by your processor. As you can see in Figure 1, the Intel Xeon E5-2690 supports the AVX instruction set.

image

Figure 1: Intel Xeon E5-2690 CPU Details

A current model Intel Core i7-6700K Skylake desktop processor supports the newer FMA, and Transactional Synchronization Extensions (TSX) instructions, as shown in Figure 2. These were both introduced with the Haswell microarchitecture, and they might be useful in a future version of SQL Server, if Microsoft decides to use them.

image

 Figure 2: Intel Core i7-6700K CPU Details

The post Hardware Extension Support in SQL Server 2016 appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/hardware-extension-support-in-sql-server-2016/feed/ 1
Using Windows Resource Monitor to Find Unusual Performance Bottlenecks https://www.sqlskills.com/blogs/glenn/using-windows-resource-monitor-to-find-unusual-performance-bottlenecks/ https://www.sqlskills.com/blogs/glenn/using-windows-resource-monitor-to-find-unusual-performance-bottlenecks/#comments Tue, 07 Jul 2015 22:56:29 +0000 http://3.209.169.194/blogs/glenn/?p=964 I recently had an interesting issue with a new SQL Server 2014 Enterprise Edition instance that was going to be hosting about 200 user databases that each use the SQL Server Filetable feature. The reported problem was that this new instance was taking two-three times longer to restore each full database backup than the restores […]

The post Using Windows Resource Monitor to Find Unusual Performance Bottlenecks appeared first on Glenn Berry.

]]>
I recently had an interesting issue with a new SQL Server 2014 Enterprise Edition instance that was going to be hosting about 200 user databases that each use the SQL Server Filetable feature. The reported problem was that this new instance was taking two-three times longer to restore each full database backup than the restores were taking on a different instance (that had similar hardware and storage resources).

I had several initial ideas about what the problem might be, including:

  1. Windows instant file initialization was not enabled
    1. This would force Windows to have to “zero-initialize” the database data file after it was created during the restore, which slows down the restore
    2. It was already enabled on this instance, so that was not the problem
  2. The transaction log files were particularly large for these user databases
    1. Windows instant file initialization does not work on log files, only on data files
    2. This issue would be present on any database instance, not just one
  3. The VLF counts were particularly high in the log files for these databases
    1. This causes the recovery portion for a full database restore (or crash recovery) to take much longer
    2. None of the VLF counts were above 300, plus this would behave the same on any database instance

After my initial ideas were found to be incorrect, I tried restoring a full backup of one of the user databases to the new database server, making sure to use the Stats = 1 option, so the restore progress statistics would update every 1%. This gives you more immediate and fine-grained feedback about the progress of the restore, which is always a good idea.

While the restore was running, I carefully watched the disk activity in Windows Resource Monitor.  You can sort the columns in Windows Resource Monitor to see the highest Reads and Writes (in bytes/second) while the database restore is running. This will show the reads from the database backup file, then the writes to the database data file(s) and the database log file. It also showed the writes to the filetable files, and then something that I did not expect…

The full database restore went very fast until it got to 92%. Then I saw a huge number of parallel reads by the MsMpEng.exe process (which is the Microsoft Antimalware service), which slowed the restore progress to an absolute crawl, also pegging one of the CPU cores on the instance (so it looks like that service is single-threaded).  This seemed to be a major factor in the slowness of the database restore as MsMpEng.exe process was scanning the 8,684 Filetable documents that were in this particular user database.

The solution to this issue was simply changing the exclusion rules for the Microsoft Antimalware Service to not scan the files in the filetable directories. This one change decreased the database restore time by 56%.

Here is the restore command and the results of the test.

-- Test restore of TestUserDatabase
-- This database uses Filetables
RESTORE DATABASE [TestUserDatabase] 
FROM  DISK = N'T:\BackupRestoreTest\TestUserDatabase_FULL.bak' WITH  FILE = 1,  
MOVE N'TestUserDatabase' TO N'D:\SQLDATA\TestUserDatabase.mdf',  
MOVE N'TestUserDatabase_log' TO N'L:\Logs\TestUserDatabase_log.ldf',  
MOVE N'DOCUMENTS' TO N'D:\SQLDATA\TestUserDatabase_DOCUMENTS',  NOUNLOAD,  STATS = 1;
GO

-- Actual elapsed time 6:21 (Before directory exclusion change)
--Processed 2358856 pages for database 'TestUserDatabase', file 'TestUserDatabase' on file 1.
--Processed 4 pages for database 'TestUserDatabase', file 'TestUserDatabase_log' on file 1.
--Processed 208905 pages for database 'TestUserDatabase', file 'DOCUMENTS' on file 1.
--RESTORE DATABASE successfully processed 2567764 pages in 378.708 seconds (52.971 MB/sec).


-- Actual elapsed time 2:52 (After directory exclusion change)
--Processed 2358856 pages for database 'TestUserDatabase', file 'TestUserDatabase' on file 1.
--Processed 4 pages for database 'TestUserDatabase', file 'TestUserDatabase_log' on file 1.
--Processed 208905 pages for database 'TestUserDatabase', file 'DOCUMENTS' on file 1.
--RESTORE DATABASE successfully processed 2567764 pages in 167.607 seconds (119.688 MB/sec).

 

Figure 1: T-SQL for Database Restore Test

 

One thing you might notice is that the filetable directory is on the same LUN as the PRIMARY data file for this database, which is not really the best location. Ideally this directory would be on a separate LUN from any other SQL Server database files, but this may not always be possible due to economic resource constraints.

Here is some more information about filestream performance:

High-performance FILESTREAM tips and tricks

Best Practices on FILESTREAM implementations

The post Using Windows Resource Monitor to Find Unusual Performance Bottlenecks appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/using-windows-resource-monitor-to-find-unusual-performance-bottlenecks/feed/ 7
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
Getting the Best Performance From an Intel DC P3700 Flash Storage Card https://www.sqlskills.com/blogs/glenn/getting-the-best-performance-from-an-intel-dc-p3700-flash-storage-card/ https://www.sqlskills.com/blogs/glenn/getting-the-best-performance-from-an-intel-dc-p3700-flash-storage-card/#comments Fri, 17 Oct 2014 16:42:45 +0000 http://3.209.169.194/blogs/glenn/?p=920 I recently had the opportunity to work on a new Dell PowerEdge R720 system that has two, 2TB Intel DC P3700 PCIe Flash Storage Cards installed. This particular card is the largest capacity model of the high-end P3700 series (Intel has lower-end P3600 and P3500 cards in this same family). As with most flash storage, […]

The post Getting the Best Performance From an Intel DC P3700 Flash Storage Card appeared first on Glenn Berry.

]]>
I recently had the opportunity to work on a new Dell PowerEdge R720 system that has two, 2TB Intel DC P3700 PCIe Flash Storage Cards installed. This particular card is the largest capacity model of the high-end P3700 series (Intel has lower-end P3600 and P3500 cards in this same family). As with most flash storage, larger capacity devices typically have much better performance than lower capacity devices from the same product family because there are more NANDs to read and write to and there are more channels to use.

Initially, I was somewhat disappointed by the CrystalDiskMark results for this device, as shown in Figure 1. These results are not terrible, especially compared to most SANs or a single 6Gbps SAS/SATA SSD, but they were not nearly as good as I was expecting.

It turns out that Windows Server 2012 R2 has native NVMe support, with some generic, default drivers. These drivers let Windows recognize and use an NVMe device, but they do not give the best performance. Installing the native Intel drivers makes a huge difference in performance from these cards.

You will need to download and install the drivers first (which will require a reboot), and then you will want to download and install the Intel Solid State Drive Data Center Tool (which is a command-line only tool), so you can check out the card and update the firmware if necessary. The links for those two items are below:

Intel Solid-State Drive Data Center Family for PCIe Drivers
Intel Solid-State Drive Data Center Tool

You should also confirm that you are using the Windows High Performance Power Plan and that your BIOS is not using any power management settings that affect the voltage supplied to the PCIe slots in your server. Setting the BIOS power management to OS control or high performance is usually what you need to do, but check your server documentation.

clip_image002

Figure 1: CrystalDiskMark Results with Default Microsoft Driver

Here are the relevant results in text form:

Sequential Read :   682.778 MB/s
Sequential Write :   700.335 MB/s
        
Random Read 4KB (QD=32) :   381.311 MB/s [ 93093.6 IOPS]
Random Write 4KB (QD=32) :   282.259 MB/s [ 68910.9 IOPS]

After installing the native Intel drivers and updating the firmware, CrystalDiskMark looks much better! This is SAN-humbling performance from a single PCIe card that is relatively affordable.

clip_image002[5]

Figure 2: CrystalDiskMark Results with Native Intel Driver

Here are the relevant results in text form:

Sequential Read :  1547.714 MB/s
Sequential Write :  2059.734 MB/s
        
Random Read 4KB (QD=32) :   646.816 MB/s [157914.2 IOPS]
Random Write 4KB (QD=32) :   419.740 MB/s [102475.6 IOPS]

This is a pretty dramatic difference in performance and it is another reason why database professionals should be paying attention to the details of their hardware and storage subsystem. Little details like this are easy to miss, and I have seen far too many busy server administrators not notice them.

The post Getting the Best Performance From an Intel DC P3700 Flash Storage Card appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/getting-the-best-performance-from-an-intel-dc-p3700-flash-storage-card/feed/ 7
Windows Server 2012 R2 Update https://www.sqlskills.com/blogs/glenn/windows-server-2012-r2-update/ https://www.sqlskills.com/blogs/glenn/windows-server-2012-r2-update/#comments Mon, 07 Apr 2014 21:23:51 +0000 http://3.209.169.194/blogs/glenn/?p=875 (New: we’ve published a range of SQL Server interview candidate screening assessments with our partner Kandio, so you can avoid hiring an ‘expert’ who ends up causing problems. Check them out here.) Microsoft has released an update for Windows 8.1 and Windows Server 2012 R2 that is somewhat of a cross between a Cumulative Update […]

The post Windows Server 2012 R2 Update appeared first on Glenn Berry.

]]>
(New: we’ve published a range of SQL Server interview candidate screening assessments with our partner Kandio, so you can avoid hiring an ‘expert’ who ends up causing problems. Check them out here.)

Microsoft has released an update for Windows 8.1 and Windows Server 2012 R2 that is somewhat of a cross between a Cumulative Update and a Service Pack. Microsoft is calling this update “Windows Server 2012 R2 Update” which is sort of a silly name. I would have preferred something like “Windows Server 2012 R2 Update 1”, since there are rumors of another update like this coming out later this year (at least according to Mary Jo Foley).

This update is primarily designed to make both of these operating systems easier to use for mouse and keyboard users (even though Windows Server 2012 R2 is already easier than Windows 8.1). The update does make it even easier to use Windows Server 2012 R2 if you are more used to working with Windows Server 2008 R2. It also includes a rollup of previous updates for Windows Server 2012 R2, so it will save you quite a bit of time compared to pulling those updates down from Microsoft Update. You can also use a slipstream version that Microsoft has made available if you are doing a new operating system installation.

You can read more about the Windows Server 2012 R2 Update here. Adin Ermie has a nice blog post with lots of before and after screenshots here.

The update is already available for MSDN Subscribers Downloads, and Microsoft is going to make it available on Windows Update on April 8. I have installed it on a few VMs already without any problems. One initial question I had was how to quickly and easily determine whether the update was installed or not, since it does not show up in System Properties like a Service Pack would. It turns out that there is a somewhat easy method to find out, by running Msinfo32.exe.

To confirm the exact version of Windows Server 2012 R2 that is installed on a computer, run Msinfo32.exe. If Windows Server 2012 R2 Update is installed, the value reported for Hardware Abstraction Layer will be 6.3.9600.17031. You can also look for KB2919355 under installed updates.

If you are or will be running SQL Server 2012 or SQL Server 2014 in the near future, you really should be running Windows Server 2012 R2 as your operating system. If you are already running Windows Server 2012 R2, you should make plans to install this update as soon as possible, since it will be required in the near future. According to Microsoft, “Future updates as of the patch Tuesday in May, including security fixes, will be based on Windows Server 2012 R2 Update as the baseline.”

The post Windows Server 2012 R2 Update appeared first on Glenn Berry.

]]>
https://www.sqlskills.com/blogs/glenn/windows-server-2012-r2-update/feed/ 6