Can’t Find Windows 2012 TCP Limits

tcpwindows-server-2012-r2

I have a VPS server running Windows 2012 R2 that is used with a piece of software that makes roughly 15,000 connections in a minute. I noticed some lag and other issues with the VPS, and decided to upgrade to a Dedicated server.

VPS Specs: "4 vCores 3.1 GHz, 8GB Ram, SSD, 100mbit connection"
Dedicated Specs: "Xeon E5-1620 v2 3.7GHz, 64GB RAM, 1gbit connection"

I installed Windows 2012 R2 on it, and noticed a dramatic speed decrease in the software. It was hitting only about 5,000 connections per minute. I thought it might be because this was on a HDD instead of an SSD, so I setup a RAMDisk. There was zero improvement in the performance. I started to look into TCP limitations, thinking the VPS container that was automatically setup for me might be different than my settings. I couldn't find much. I added a ton of options to the TCP Parameters in the registry, and still see no difference.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"TcpTimedWaitDelay"=dword:0000001e
"MaxUserPort"=dword:0000fffe
"TcpNumConnections"=dword:00fffffe
"TcpMaxDataRetransmissions"=dword:00000005

The software connects to a single IP address, across multiple ports (~100 ports).

I'm unsure of where to look now. All speed-tests show the dedicated server is significantly faster than the VPS, but the VPS, with a slower connection and less powerful hardware, can reach faster connections per minute.

Any direction to where I can look further would be appreciated.

Best Answer

Try next changes (more details).

  1. Open an administrator command prompt at %windir%\System32\inetsrv\
  2. Run the command below to update the appConcurrentRequestLimit attribute to a suitable number (5000 is the default in IIS7+)

appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:100000

  1. Open %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet.config (Framework64 for 64 bit processes)
  2. Configure it Example

    <?xml version="1.0" encoding="UTF-8" ?> <configuration> <runtime> <legacyUnhandledExceptionPolicy enabled="false" /> <legacyImpersonationPolicy enabled="true"/> <alwaysFlowImpersonationPolicy enabled="false"/> <SymbolReadingPolicy enabled="1" /> <shadowCopyVerifyByTimestamp enabled="true"/> </runtime> <startup useLegacyV2RuntimeActivationPolicy="true" /> <system.web> <applicationPool maxConcurrentRequestsPerCPU="20000" /> </system.web> </configuration>

Related Topic