The post Operating System Support for SQL Server Versions appeared first on Glenn Berry.
]]>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.
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.
]]>The post Using Windows Resource Monitor to Find Unusual Performance Bottlenecks appeared first on Glenn Berry.
]]>I had several initial ideas about what the problem might be, including:
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:
Best Practices on FILESTREAM implementations
The post Using Windows Resource Monitor to Find Unusual Performance Bottlenecks appeared first on Glenn Berry.
]]>The post A SQL Server Hardware Tidbit a Day – Day 16 appeared first on Glenn Berry.
]]>The first tool is msinfo32.exe, which is built into all recent versions of Windows. You can simply type msinfo32 in a Run window, and you will see the System Information dialog shown in Figure 1.
Figure1: System Information Dialog
The System Information dialog shows that we have a Dell PowerEdge R720. This dialog also shows that I have two Intel Xeon E5-2670 processors, with 64GB of RAM, running Windows Server 2012 Datacenter Edition.
The second tool is the Computer Properties dialog shown in Figure 2. You can get there by bringing up the Windows Charm with Windows + C, then typing Computer then choosing Computer, right-clicking, and choosing Properties. This shows the version and edition of Windows, the computer name, the processor model, and the amount of installed RAM.
Figure 2: Computer Properties Dialog
The third tool is Windows Task Manager, which is shown in Figure 3. You can get there by right-clicking on the Task Bar, and choosing Start Task Manager. The Performance tab now has different pages for CPU, Memory, and some other items, depending on your hardware.
The CPU page tells you how many logical processors are visible to Windows (the number of sections you see in CPU Usage History) if you right-click and change the display to show logical processors. You can also see overall CPU usage and CPU usage by NUMA node by selecting the appropriate display type. What is even more useful in Windows Server 2012 is the fact that you see the processor model number and base clock speed, along with the total number of sockets, physical cores, and logical processors. You can also see whether hardware virtualization is enabled, and the cumulative size of your L1, L2, and L3 caches across all of your processors.
Figure 3: Windows Server 2012 Task Manager, Performance Tab, CPU Page
Figure 4 gives you some pretty detailed information about your memory, including the amount of RAM that you have installed, the type and speed of the RAM, and the number of memory slots you have used out of the total number of memory slots in the system. This is all very useful information to know about the system.
Figure 4: Windows Server 2012 Task Manager, Performance Tab, Memory Page
The post A SQL Server Hardware Tidbit a Day – Day 16 appeared first on Glenn Berry.
]]>The post A SQL Server Hardware Tidbit a Day – Day 3 appeared first on Glenn Berry.
]]>The Intel Xeon E7 family processors have up to ten physical cores (plus hyper-threading in most models). They have four Quick Path Interconnect (QPI) 1.0 links and two memory controllers, which each have two dual-channel interfaces per memory controller. Their memory controllers support the still very expensive 32GB DIMMs and low-power memory modules. This means that a four socket system can support up to 2TB of RAM, while an eight-socket system can support up to 4TB of RAM (which is the current operating system limit for Windows Server 2012). Of course, you will need pretty deep pockets to do that, because 32GB DDR3 RDIMMs are still very expensive in early 2013 compared to 16GB DDR3 RDIMMs. Using the on-board memory buffer, the E7 processors can run DDR3-1333 memory at data rates of 800, 978 and 1066 MHz. The E7 processor family supports AES instructions, Trusted Execution Technology, and VT-x, VT-d and VT-c virtualization features. They only have PCI-E 2.0 support.
Intel claims up to 40% better database performance for the top of the line E7-4870 model in comparison to the previous generation Xeon X7560 model for four-socket servers. Performance of the E7-4870 CPU in integer and floating-point applications is better than the X7560 by up to 22% and 19% respectively. The E7 processors are socket compatible with the earlier Xeon 7500 processors, which means that existing systems from your favorite server vendor were able to use them as soon as they became available back in Q2 of 2011.
While these processors may sound impressive, they are actually not the best choice for most OLTP workloads, due to their older architecture, slower clock speeds, and lack of PCI-E 3.0 support compared to the newer Intel Xeon E5-2600 and E5-4600 series (Sandy Bridge-EP). They are also quite expensive, with the E7-8870 model going for $4616.00 each. They are very expensive to license for SQL Server 2012 Enterprise Edition, with their ten physical cores for each processor. They are well-suited to data warehouse workloads and non-database virtualization workloads because of their high core counts, large L3 caches, and high memory capacity.
The upcoming E7 v2 (Ivy Bridge-EX) processors, due in Q3 of 2013 will be a significant improvement over the current E7 (Westmere-EX) line, jumping a full Tock release forward. They will have up to 15 physical cores, better memory controllers with higher memory capacity, and PCI-E 3.0 support.
The post A SQL Server Hardware Tidbit a Day – Day 3 appeared first on Glenn Berry.
]]>The post What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores? appeared first on Glenn Berry.
]]>The hierarchy works like this:
Physical socket on a motherboard where a physical processor fits (used for licensing before SQL Server 2012)
Physical core within a physical processor (multi-core, used for licensing with SQL Server 2012 Enterprise Edition)
Logical core within a physical core (hyper-threading)
Back in the prehistoric days of processor technology (around 2001) all Intel and AMD processors had only one core. If you wanted multiple threads of execution, you needed additional physical processors, since one socket = one physical processor = one physical core. Back then, the primary way to increase single-threaded performance was to increase the clock speed of the processor. Both Intel and AMD started running into problems with heat dissipation and power consumption as clock speeds approached 4.0GHz (on air cooling).
In 2002, Intel introduced the first processor with hyper-threading. Hyper-threading creates two “logical processors” within each physical processor core of an actual physical processor, that are visible to the operating system. Depending on the application, hyper-threading can improve total CPU capacity by anywhere from 5-30%. The initial implementation of hyper-threading on the Pentium 4 Netburst architecture did not work as well on many server workloads (such as SQL Server), so the standard advice back then was to disable hyper-threading on database servers. The 2nd generation hyper-threading in the Intel Nehalem, Westmere, and Sandy Bridge processors works much better for SQL Server OLTP workloads, so I always leave it enabled by default.
In 2005, AMD introduced their first dual-core processor, the Athlon 64 X2. This processor had two discrete physical cores, which provided better multi-threaded performance than hyper-threading. A single, dual-core processor would have two processor cores visible to Windows. It is important to remember that Windows Server 2008 R2 Task Manager (and some SQL Server DMVs) cannot easily tell the difference between hyper-threaded logical processors and true dual-core or multi-core processors.
In late 2006, Intel introduced the first Core2 Quad, which was a processor with four physical cores (but no hyper-threading). One of these processors would have four cores visible to Windows. Since then, both AMD and Intel have been rapidly increasing the physical core counts of their processors. AMD has the Opteron 63xx processor family which has 16 physical cores in a single physical processor. Intel has the Xeon E7 Family “Westmere-EX”, which has up to ten physical cores, plus 2nd generation hyper-threading, which means that you have a total of 20 logical cores visible to Windows and SQL Server for each physical processor.
Before SQL Server 2012, SQL Server licensing was only concerned with physical processor sockets, not physical cores, or logical cores. Knowing this, you wanted to always buy processors with as many cores as possible in order to maximize your overall processor performance per processor license. You should also be aware that SQL Server 2008 is limited to 64 logical processors. In order to use more than 64 logical processors, you must be running SQL Server 2008 R2 on top of Windows Server 2008 R2, which will raise your limit to 256 logical processors.
SQL Server 2008 R2 Enterprise Edition also had a license limit of eight physical processors (which would let you go up to 160 logical processors with eight Intel Westmere-EX processors). If you need more than eight physical processors, you needed to run SQL Server 2008 R2 Data Center Edition. Microsoft got rid of the Data Center Edition SKU for SQL Server 2012.
With SQL Server 2012, Microsoft completely changed their licensing model compared to previous releases. With SQL Server 2012 Enterprise Edition, in a non-virtualized environment, you must use core-based licensing, which is based on physical cores (not logical cores). Each processor socket must have at least four processor core licenses (even if there are actually only one or two physical cores). This means you need to be much more thoughtful about which exact processor model you select for your database server. Having lots of physical cores can add up to a very large amount of money for your SQL Server 2012 Enterprise Edition license costs. If you are running SQL Server 2012 Enterprise Edition on top of Windows Server 2012 Standard Edition, you can now have up to 640 logical cores, along with 4TB of RAM in your system.
This new licensing system really penalizes AMD processors, which can have up to 16 physical cores in each processor, but unfortunately, have pretty mediocre single-threaded performance. To try and level the playing field a little bit, Microsoft released something called the SQL Server Core Factor Table, which gives a 25% discount for most modern AMD processors that have six or more physical cores. Even with this discount, it is far more expensive to buy your SQL Server 2012 core licenses for an AMD system compared to an equivalent Intel system.
Remember that the sys.dm_os_sys_info DMV cannot tell the difference between physical and logical cores. Running the query below will tell you how many logical cores are visible and how many physical CPUs you have.
1: -- Hardware information from SQL Server 2012
2: -- (Cannot distinguish between HT and multi-core)
3: SELECT cpu_count AS [Logical CPU Count], hyperthread_ratio AS [Hyperthread Ratio],
4: cpu_count/hyperthread_ratio AS [Physical CPU Count],
5: physical_memory_kb/1024 AS [Physical Memory (MB)], committed_target_kb/1024 AS [Committed Target Memory (MB)],
6: max_workers_count AS [Max Workers Count], affinity_type_desc AS [Affinity Type],
7: sqlserver_start_time AS [SQL Server Start Time], virtual_machine_type_desc AS [Virtual Machine Type]
8: FROM sys.dm_os_sys_info WITH (NOLOCK) OPTION (RECOMPILE);
9:
10: -- Gives you some good basic hardware information about your database server
The post What is the Difference Between Physical Sockets, Physical Cores, and Logical Cores? appeared first on Glenn Berry.
]]>The post Microsoft DreamSpark Program appeared first on Glenn Berry.
]]>Some of the most valuable software-related items are Visual Studio 2012 Professional, Windows Server 2012 Standard, and SQL Server 2012 Developer Edition. You can also get a free 90-day subscription to Pluralsight On-Demand, and a number of free eBooks from Microsoft Press.
The Microsoft DreamSpark site has more details about the program.
The post Microsoft DreamSpark Program appeared first on Glenn Berry.
]]>The post Two New TPC-E Submissions for SQL Server 2012 appeared first on Glenn Berry.
]]>What is notable about this is that the 3218.46 score for a four-socket Xeon E7-4870 system is significantly higher than we have seen for similar four-socket Xeon E7-4870 systems in the past. An especially good comparison is between an IBM System x3850 X5 that was submitted on June 27, 2011 and this latest result for an IBM System x3850 X5 system that was submitted on November 28, 2012. As you can see in Table 1, the newer submission for the same model server has a 12.4% higher score than the older submission. This is for the exact same model server, with the exact same number and model of processors. The first big difference that jumps out is that the newer submission is running SQL Server 2012 Enterprise Edition on top of Windows Server 2012 Standard Edition, while the older submission is running SQL Server 2008 R2 Enterprise Edition on top of Windows Server 2008 R2 Enterprise Edition.
| Date | Model | Processor | Operating System | SQL Server Version/Edition | TPC-E Score |
| 6/27/2011 | System x3850 X5 | Xeon E7-4870 | Windows Server 2008 R2 Enterprise | SQL Server 2008 R2 Enterprise | 2862.61 |
| 11/28/2012 | System x3850 X5 | Xeon E7-4870 | Windows Server 2012 Standard | SQL Server 2012 Enterprise | 3218.46 |
Table 1: Comparing Two IBM System x3850 X5 TPC-E Submissions
Could this 12.4% performance jump be simply due to the newer operating system and the newer version of SQL Server? It is very possible that there were some low level improvements in Windows Server 2012 that work in conjunction with SQL Server 2012 to improve performance (similar to what we saw with Windows Server 2008 R2 combined with SQL Server 2008 R2). With Windows Server 2008 R2, Microsoft did some low-level optimizations so that they could scale from 64 logical processors to 256 logical processors. This work also benefitted smaller systems with fewer logical processors. I think it is likely that some similar work was done with Windows Server 2012, so that it could scale from 256 logical processors to 640 logical processors, so that might explain some of the performance increase. I have some questions in to some of my friends at Microsoft, trying to get some more detailed information about this possibility.
It is also possible that there were improvements in SQL Server 2012 all by itself that contributed to the performance increase. Another possibility is that the TPC-E team at IBM just did a much better job on this newer system. If you dive deeper into the two submissions, you will notice some other differences in the hardware and the environment for the test. The newer submission is a system with 2048GB of RAM and (126) 200GB SAS SSDs for database storage, with a 13.3TB initial database size, while the older submission is a system with 1024GB of RAM and (90) 200GB SAS SSDs for database storage, with a 11.6TB initial database size. As long as you have sufficient I/O capacity to drive the TPC-E workload, the TPC-E score is usually limited by processor performance, so I don’t really think that the RAM and I/O differences are that significant here.
What do you think about this? I would love to hear your opinions and comments!
The post Two New TPC-E Submissions for SQL Server 2012 appeared first on Glenn Berry.
]]>The post Task Manager Enhancements in Windows Server 2012 appeared first on Glenn Berry.
]]>You will want to make sure that you get the Windows 8 Client and Windows Server 2012 General Availability Cumulative Update installed (which you can pull down from Windows Update). I would also recommend that you check with your server vendor to see if there are any BIOS, firmware, or driver updates available for your model server to give better Windows Server 2012 support.
Even though the new user interface (that used to be called the Metro UI) is a little annoying at first, it is not really that hard to figure out after you spend some time with it. One nice improvement in Windows Server 2012 is the better functionality in Windows Task Manager. There is a lot more useful basic information about your server hardware and configuration on the Performance tab compared to previous versions of Windows Server.
Looking at Figure 1, you can see that Task Manager shows the processor make and model and its rated base clock speed. It also shows the current clock speed (although it is not clear whether this is for one core or an average of all of the cores). It also tells you how many total sockets, how many total cores (meaning physical cores), and how many logical processors are present in the system. It shows whether virtualization is enabled, and it gives you the cumulative sizes of the L1, L2, and L3 caches across all of the processors in the system (which may confuse people who might think that it is for only one processor). This is all very useful information that you previously had to get from tools like msinfo32 and CPU-Z.
Figure 1: CPU Information in Windows Server 2012 Task Manager
Figure 2 shows memory information for the server. This shows the amount and type of memory that is installed, including its speed. It also shows how many memory slots you have in total, and how many have been used. This is also information that previously was available from tools like CPU-Z or system management tools like Dell OMSA. Having this additional information available in Windows Task Manager will be a real time saver.
Figure 2: Memory Information in Windows Server 2012 Task Manager
The post Task Manager Enhancements in Windows Server 2012 appeared first on Glenn Berry.
]]>The post Memory Error Recovery in SQL Server 2012 appeared first on Glenn Berry.
]]>There was a presentation at TechEd 2012, called “The Path to Continuous Availability with Windows Server 2012” that talked about this being a new feature in Windows Server 2012, which implies that you will need to be running SQL Server 2012 on top of Windows Server 2012 to get this functionality.
In Windows Server 2012, the feature is called Application Assisted Memory Error Recovery, and it requires the application (such as SQL Server 2012) to register for notifications of bad memory page events using CreateMemoryResourceNotification(). It also requires SQL Server 2012 to use the API QueryWorkingSetEx() to scan the memory for bad pages.
It is likely an Enterprise Edition-only feature, but I have not confirmed this assumption yet.
You will also need ECC RAM, and a processor with a memory controller that supports this. I don’t have a list of processors that support this feature yet, but I am working on it. If I had to guess, I would assume that Intel Nehalem and newer, and AMD Magny-Cours and newer will probably be required.
If you have the hardware support, along with both Windows Server 2012 and SQL Server 2012, you will see a message like this in your SQL Server error log:
Machine supports memory error recovery. SQL memory protection is enabled to recover from memory corruption.
There are a few prerequisites that you must satisfy, but this is still an interesting feature. It is one more argument that you can use when you are trying to make the case to upgrade to SQL Server 2012, on a new server with the latest version of Windows Server.
The post Memory Error Recovery in SQL Server 2012 appeared first on Glenn Berry.
]]>