Need to optimize your network – Silly Window Syndrome could be happening

Need to speed your internet up or tweak your network out?  Here’s some things to take into consideration.  Something called Silly Window Syndrome can occur if a server or workstation that has a shared files has high latency.

You see, when there is no synchronization between the workstation and a server (or ws to ws) regarding the capacity of the flow of data being sent or the packet size, Silly Window Syndrome can occur.

Here’s where Nagle’s algorithm is used if the Silly Window Syndrome occurs from the sender.  You can make sure it is enabled by running the script below from a command line (as administrator). Nagle  will send the first segment even if it is tiny.  Then it’ll wait for the acknowledgement (known as an ACK) is received or a MSS is accumulated. (MSS – maximum sized segment)

You see, Nagle’s algorithm works by improving TCP efficiency.  This algorithm reduces the number of small packets  being sent over a network.

So what if the delays are caused by the receiver?  David D Clark’s solution can be and is used.  Clark’s solution closes the window until another segment of MSS can be received or if the buffer becomes half empty.

Now there something else – Delayed ACK tries to send more data over a segment if it can.   Here’s the problem.  the interaction of Delayed ACK with Nagle’s algorithm can create 200+ ms delays.

How do I?

Run this from a command line as an administrator to turn off Nagle’s algorithm  

REG ADD HKey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ /v TcpAckFrequency /t REG_DWORD /d 0 /f

REG ADD HKey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ /v TCPNoDelay /t REG_DWORD /d 0 /f

taskkill /f /im explorer.exe

start explorer.exe

pause

______________________________________________________

Run this from a command line as an administrator to turn on Nagle’s algorithm  

REG ADD HKey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ /v TcpAckFrequency /t REG_DWORD /d 1 /f

REG ADD HKey_Local_Machine\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ /v TCPNoDelay /t REG_DWORD /d 1 /f

taskkill /f /im explorer.exe

start explorer.exe

__________________________________________________________________________________________

There’s several other things you can do for latency –

  1. Check things like LLMNR.  You can get delays with SQL and you may need to disable it on work stations and the server.
  2.  Look at Nagle’s Algorithm and Delayed ACK.
    1. You can turn Nagle’s algorithm on or off as needed.   It’s not always the best choice in highly interactive networks but can help to speed up downloads and remote connectivity.   We’ve had several students in a jam that needed a file moved and high latency stopped them or the download failed.  So what did they do?  Adjusted Nagle’s Algorithm.
  3. Disable everything in the network card settings with the exception of flow control
  4. Manually adjust the connection speed – we’ve seen even with the correct network card drivers slow throughput on networks.  After adjusting to 1Gbps manually instead of auto, the computer speed up.
  5. Is everything a gigabit?  Switches, servers, workstation and other.  If so, enable jumbo frames.

Remember always optimize your network before you throw hardware at the problem.

Also, don’t worry, Karn’s algorithm will be working when computers are talking.  It basically measures time from point A and B and if there is a delay, it’ll say ‘hello’ again to try and get a response.

If you have an application you need to access that uses TCP across the network, you may be able to speed it up by enabling TcpAckFrequency and/or TcpNoDelay in the registry.  –

Open regedit and then find-

Registry Key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces

Make sure you find the correct interface for your active network connection.One way is to look at the IP Addresses listed until you find the correct interface.

On the right window, create a DWORD32 for-
TcpAckFrequency=1
TCPNoDelay=1

Reboot

Always make sure you measure your network speed before you make changes to set a baseline.  Measure the speed after you make changes.   How do you measure it?  Put the following software on the workstation and server.  Totusoft’s Lanspeed

http://www.totusoft.com/lanspeed

 

 

Advertisements

About TCAT Shelbyville IT Department

The Tennessee College of Applied Technology - is one of 46 institutions in the Tennessee Board of Regents System, the seventh largest system of higher education in the nation. This system comprises six universities, fourteen community colleges, and twenty-six Applied Technology Colleges.
This entry was posted in Technology. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s