I have a Windows Server 2012 R2 running on an Amazon EC2 instance with IIS 8.5. It hosts a web application, and a custom WebDAV server that interacts with the same database as the web application.
I did some speed tests uploading files via the web application and the custom WebDAV server. I noticed that file uploads via WebDAV, using Microsoft’s built-in mini-redirector, were very slow - around 300 kB/s. Uploads via the website using Chrome were 10+ MB/s as expected.
I have the exact same code for the web application and WebDAV server running on a different server, running Windows Server 2008, and IIS 7.5 and the upload speed is 10+ MB/s on both the web application and the WebDAV server. So I am pretty sure there is nothing in my code that is causing the slow upload. I have spent several days researching this issue and have not been able to get my upload speeds where they should be to the WebDAV server.
Another interesting note: I tried uploading to the web application using Internet Explorer, and the upload speed was slow - about 300 kb/s just like when using mini-redirector to connect to the WebDAV server. I tested Firefox as well, and it was like Chrome, at 10+ MB/s.
I opened up Fiddler to examine the Request/Responses, and while Fiddler is open, the problem does not occur, the upload speed is 10+ MB/s, so I can’t gain any useful information from Fiddler.
I’ve used Wireshark to examine the TCP packets and compare the differences between my Windows Server 2008, which works fast, and Windows Server 2012 which is slow.
The order and size of the TCP is packets is the same, Two packets and an ACK, two packets and an ACK, etc. The Packet sizes are both about 4k. The only difference is the rate at which the packets are sent, which is several orders of magnitude faster on Windows Server 2008.
I’ve tested the upload speed on several different client machines - Linux, Windows 7, and Windows 8. I’ve only seen the issue occur on Windows 7, although that might be coincidence. It occurs on about 75% of Windows 7 machines, but not all Windows 7 machines.
This all leads me to believe that this issue must a combination of client/server side configuration, since I can’t pin the issue down to occurring on a specific server, or specific client only. In fact, I have set up another Windows Server 2008, identical to the current one where the upload works fast, but on the new server, the upload is still slow. So maybe the difference is the NIC, or maybe a specific hotfixes and patches, drivers, etc.
Here are some things I have tried in order to get my upload speed to increase on Windows Server 2012 R2:
• Increased Winsock
SocketSendBuffer length in registry on client machines
• Disabled Nagle Algorithm on Server
• Disabled TCP Chimney Offload on server
• Enabled/Disabled about 50 other TCP related options that I have read about on various articles online.
• Tried connecting client from multiple network locations (if a client is slow to upload, it is slow regardless of where it is connecting).
• Tried HTTP instead of HTTPS, and the problem still occurs, so doesn’t appear to be related to SSL or TLS.
• Ensured, Auto-Detect proxy and auto-config script where unchecked in IE
• Ensured that
keep-alive is enabled in client request headers
Does anybody have any ideas on what could be causing my slow upload issue?
Just to reiterate, the problem does NOT occur using Chrome or Firefox to upload via the web application, but does occur using IE. And the issue always occurs using mini-redirector on some client machines, but never occurs on others.