Painfully slow network when routed through Windows 2012 R2

networkingwindows-server-2012-r2

I have a Windows 2012 R2 server with two network adapters, on-board 1G one for the LAN and a 100M D-Link 530T connected to the internet. Internet Connection Sharing is set up on the latter. Client machines (Win7, WinXP) on the LAN can access the internet, but speedtest behavior is peculiar. If I choose a close speedtest server with small ping (1-10ms) I get almost full downlink utilization on both clients and server, but if I choose a faraway speedtest server (100ms) the server gets 50-70Mbps of download speed but clients hardly get 1Mbps for TCP traffic (UDP seems unaffected). Upload speed is the same, around 30Mbps on client and server. Every time I reboot the server, clients get the full 50-70Mbps for about 2-3 minutes and then slow down to a crawl. Occasionally this happens without a reboot, too, for no visible reason. I don't see abnormal CPU utilization on the server when speedtest is running. Wireshark captures show a lot of dup acks and retransmissions, but I captured from both server interfaces and the TCP packets that dup acks are re-requesting are there in the log, received on the outward-facing interface and forwarded to the LAN and incoming packets are missing from tight groups of 2-3 packets with very close (<10μsec) timestamps. I've googled and tried everything that seemed remotely related, to no effect.

tcptrace graph

Copying files from server to client over SMB, I get full 1Gbps. If I connect a Win7 client straight to the internet, I don't observe any slowdown. An older server on which I had WinXP and the same outward-facing D-Link network adapter, using the same wires, also didn't show such behavior, so network adapters, wires etc. aren't likely to be the problem. Please help, I don't want to install XP on my server again!

Here's some things I have tried without success:

  1. installing latest drivers;
  2. disabling/enabling interrupt moderation (server and client);
  3. disabling/enabling offloading (server/client);
  4. increasing receive and transmit buffers;
  5. enabling ECN and CTCP on the client;
  6. looking at delayed start services on the server and disabling them;
  7. turning off ICS and switching to RRAS for NAT and routing.

Best Answer

I was able to fix my issue by trying a few different things over the course of using Server 2012 R2.

I was having a similar issues where no matter how many times I would try and access a webpage from a workstation or transfer files, it was painfully slow. Webpages would load hyperlinks indented on the left hand side sometimes with out any pictures or would even take up to a minute to load a page.

When I did a bandwidth test from the same (and different) workstation it was around 70 Mb/s Download and 10Mb/s Upload. Which was about right for the Internet service they were paying for. I went in to the adapter properties and under the 'sharing' tab I unchecked the "Allow other network users to connect though this device" box. And Bam! Webpages loaded as fast as possible and transferred speeds increased. I don't know if the ICS service changed other services that in turn increased the network transfer speeds, but everything finally started humming along properly.

I have also gone into the adapter properties for the domain adapter, then going into "Configure", under the "Advanced" tab increase the "Receive Buffers" amount.

Also, check you group policy editor. I had an issue with 2012 R2 where an update somehow changed the settings to "Not Configured" in every category. I was lucky enough to have a backup that saved the machine state before that happened, but I noticed monumental issues ranging from speed to remote desktop connection issues until I restored a backup.