Windows/VMware: Tweaking a Windows Server (Physical or Virtual) to perform on a 10G network

Hey all,

I ran into a problem recently where even after going to a purely 10G network there was still a bottleneck, Windows, as VMware ESXTOP wasn’t adding up on the performance of the VM’s, so it got me thinking, why are these fresh install Windows 2008/2012/2016 boxes performing so slowly…

I’m always tweaking Windows Server 2008/2012/2016, and Windows Desktop XP, Vista, 7, 8.1, and 10 to see if there is changes that would be good for a production environment with uses like a high IOPS SQL/Application/Exchange servers, large-scale backup process, massive A/V updating, SNMP reporting, etc.

Recently I’ve come across a few registry tweaks that substantially increase the performance of these server platforms. Obviously, I’d suggest doing your own testing on these measures.

I ran a SQL 2012 (MSDN) stress test on a SQL box for 12 hours non-stop and the server’s baseline was better than before the changes. Also performed a 15 server simultaneous backup with Veeam 9.5 to the QNAP TS-531X and Acronis across a pure 1G and then 10G network and the differences after the baseline of these changes was awesome!

Obviously, make sure you backup your registry before doing this and/or server/desktop. But I’ve tested these extensively and system stability is better than before. There is one tweak at the bottom that was changed and it increases DNS cache. Everything performs better with large cache. 😛

1. Enable Large Cache (Desktop and Server)

This helps speed up hard drive performance.

1. Open the Registry Editor.
2. Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\
3. CurrentControlSet\Control\Session Manager\Memory Management key.
4. Right-click the LargeSystemCache item and select Modify.
5. In the Edit DWORD dialog box, change the value to 1.
6. Click OK.

You must reboot your system for this tweak to take effect.

2. Disabling Windows Update popup (Desktop and Server)

On a SQL box, ya um unplanned updates = bad!

Some will say updating all boxes is always a good idea, however, I feel critical boxes like SQL and Application Server patching should be planned with the DBA’s and Programmers. Nothing sucks more than updating SQL as an SA and it breaking Visual Studio for a DBA, they fume!

Disabling this prevents Windows from automatically rebooting.

1. Open the Registry Editor and navigate down to the following key, creating new keys if they don’t exist.
2. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
3. Right-click and create a 32-bit DWORD and call it ‘NoAutoRebootWithLoggedOnUsers’ item and select Modify.
5. In the Edit DWORD dialog box, change the value to 1.
6. Click OK.

You must reboot your system for this tweak to take effect.

3. Remove Hidden Windows Bandwidth Reservation (Desktop and Server)

the QoS Reserve Bandwidths limit is enabled by default to 20% ‘reserve’ of your available bandwidths in order to assist certain applications like Windows Updates. However keeping this reserve online also means that high IOPS servers will have restricted TCP/IP stack right out of the gate. If your disabling Windows Updates on servers that could be impacted by a .NET Framework or SQL Update that could break a query, why do you need to reserve that pipe? – if you’re doing updates it’s controlled and I bet no queries are hitting the box, so no need to reserve that 20% 24/7/365!

1. Open the Registry Editor and navigate down to the following key, creating new keys if they don’t exist.
2. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft
3. Right-Click on Windows and create a new key called “Psched”
4. Right-click and create a 32-bit DWORD and call it ‘NonBestEffortLimit’ item and select Modify.
5. In the Edit DWORD dialog box, change the value to 0, this disabled bandwidth reservation.
6. Click OK.

You must reboot your system for this tweak to take effect.

4. Modify I/O Request Packet Stack Size (Server)

Windows in the past would set this to a low number since up until the past few years most networks weren’t ever about 10Mbit’s speeds. Well, apparently Microsoft hasn’t changed these values at all, like never. Since the Windows TCP/IP stack kernel still uses the Lanmanserver to this date, high IOPS servers like SQL are still chugging away on the premise they are on 10Base-T networks. The Windows Default IRPS’s is 15, you can easily set this to 50, but I’ve set it to 32 and it’s showing a higher threshold on IOPS. Consider this, most networks are now 1G or 10G standard, heck even higher and yet the registry is still operating at speeds for 2000. On a SQL box or application server this could be huge, so far in test’s, it’s proving to increase large query requests.

1. Open the Registry Editor and navigate down to the following key, creating new keys if they don’t exist.
2. Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
3. Right-click and create a 32-bit DWORD and call it ‘IRPStackSize’ item and select Modify.
4. In the Edit DWORD dialog box, change the value to 32.
5. Click OK.

You must reboot your system for this tweak to take effect.

5. Change how TCP/IP Windows Sizing to increase throughput with Compound TCP (CTCP) (Desktop)

Again, in the past, Microsoft released this feature on networks running at 10Base-T and they needed a way to keep network congestion down to a minimum as most networks were either on hubs or token rings. Now in the modern era, most networks are on 1G and 10G networks will multiple paths and vLAN’s to minimize congestion on the network. Increasing the TCP/IP send windows sizing increases the packets sent across the wire and more frequently. CTCP to the rescue,  it aggressively increases the TCP send window to adjust to higher bandwidths. Microsoft felt only servers should have these speeds, so desktops don’t have them enabled, which can make overall network performance slow and increase packet loss…

The best visual example of this slowness, when you transfer a file from point a to point b, you know how the file starts out fast and then slows down. That’s because the default TCP window doesn’t adjust to the bandwidth, it gets to a point and then Windows backs the speeds down. On a 10Base-T network with a hub this is ideal but on 1G and 10G networks not so much…

On Windows Server 2008 and up this is enabled by default, well it should be. On Windows Vista (desktop) and up it’s disabled. If you are doing a query from a desktop to a SQL server and this isn’t enabled you will have slow query returns.

Note: one thing that will truly benefit from this setting is backups, if this is enabled, backups will happen quicker on both the servers and desktops. 🙂

Enable:

“netsh int tcp set global congestionprovider=ctcp”

Disable:

“netsh int tcp set global congestionprovider=none”
If you’d like to see what is the state of your TCP/IP Stack you can type the following command in command prompt:

netsh interface tcp show global”
You must reboot your system for this tweak to take effect.

6. Increase DNS Cache (Desktop and Server)

The role of DNS cache is to store IP addresses of pages you have recently viewed. If you tend to visit particular sites often (such as facebook or twitter), increasing the size of your DNS cache effectively improves browser loading performance, also it will help internal DNS cache on local resources like a SQL box with lot of requests from a large network (IE: Microsoft Access or Excel Queries).

To enhance the size of your DNS cache you need to do the following:

1. Open the Registry Editor and navigate down to the following key, creating new keys if they don’t exist.
2. Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNScache\Parameters
3. Right-click and create a 32-bit DWORD for the following keys:

CacheHashTableBucketSize
CacheHashTableSize
MaxCacheEntryTtlLimit
MaxSOACacheEntryTtlLimit

4. In the Edit DWORD dialog box, you can edit the setting to your liking, however, these setting have yielded the best results:

CacheHashTableBucketSize = 1
CacheHashTableSize = 250
MaxCacheEntryTtlLimit = 2000
MaxSOACacheEntryTtlLimit = 150

5. Click OK.

You must reboot your system for this tweak to take effect.

7. Disable TCP Recieve Window Auto-Tuning (Desktop and Server)

Starting in Windows Vista, Microsoft made a new feature to the Winsock and it can be normally good but it can be very bad for high IOPS servers and it can be disabled, this doesn’t just apply to a SQL box this can apply to other desktops too. The following things come up if this setting is enabled, such as the following:

a. Slow intermittent network performance
b. slow network loading
c. website keep spinning that circle as it’s trying to load the website or access network files
d. slow email sending and receiving

Run these command in an elevated Command Prompt:

Again run this command to see if it’s on or off: netsh interface tcp show global

To Enable:

netsh interface tcp set global autotuning=normal

To Disable:

netsh interface tcp set global autotuning=disabled

You must reboot your system for this tweak to take effect.

Hope these settings help others. As always make sure you have a backup before making changes to the registry. Have fun! 😀