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.

  • 2
    Can you give us more details about what the software is doing? Are these connections to different IP addresses? How many of them are half-open at a time? – David Schwartz Dec 13 '16 at 1:36
  • 2
    I added a ton of options to the TCP Parameters in the registry, and still see no difference. - Perhaps you could enlighten us on exactly what it is that you "added". – joeqwerty Dec 13 '16 at 2:19
  • @DavidSchartz added information about it to the post, but also here: the software basically connects to another server I have on a single IP address, across 100 ports. I don't think any should be "half open": the software is supposed to connect, send information, then disconnect. – Tedd Johnson Dec 13 '16 at 18:35
  • @joeqwerty I edited the post to include the settings I changed in the registry. It was based on this post: serverfault.com/questions/648424/… – Tedd Johnson Dec 13 '16 at 18:36
  • @TeddJohnson Did you ever solve this? – avi Dec 11 '17 at 7:11

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.