165 Crusoe Rd
Kangaroo Flat, Victoria 3555
ph: 0418 575 021
matthew
Below are some resources that may help your business. Please only use at the direction of Edward Systems. No responsibility will be taken for incorrect use of the following resources.
Terminal services tweak
Keep Alives:
In the registry at HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server, create or edit the DWORD value of KeepAliveEnable
and set it to 1. This will turn Keep Alives on. This will serve to stabilize the connection by sending 'heartbeat' packets to
the client every so often. This will cause an idle connection to be probed every so often just to be sure that the connection
is still alive and that the client is still listening on the other side. This will also help prevent disconnects by
preventing network devices from killing off sockets that it assumes to be idle. Because terminal services is such a low
bandwidth protocol, when a user is idle, no network activity will occur. Some network devices will interpret a connection
that is in the idle state for an extended period of time to be a dead connection, and thus will terminate the socket.
However, when the user comes out of the idle state, the terminal services client can no longer contact the terminal server
because the socket is dead. By turning on Keep Alives, the connection will not appear idle, and therefore the network device
will not attempt to terminate the socket.
For more information about Keep Alives, check out this link.
Two other registry entries to look at are at HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveInterval and
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime. Both are DWORD entries. These two registry entries
typically do not need to be changed, but I've included them here for completeness.
KeepAliveInterval determines the interval separating keep alive retransmissions until a response is received. If a response
is received, the delay until the next keep alive transmission is again controlled by the value of KeepAliveTime. The
connection will be aborted after the number of retransmissions specified by TcpMaxDataRetransmissions (which will be
discussed in the next section) have gone unanswered. KeepAliveInterval is set by default to be 1000, which is one second.
KeepAliveTime controls how often TCP attempts to verify that an idle connection is still intact by sending a keep alive
packet. If the remote system is still reachable and functioning, it will acknowledge the keep alive transmission.
KeepAliveTime is set by default to be 7,200,000, which is 2 hours.
For more information about KeepAliveInterval and KeepAliveTime, check out this link.
Section 3: TcpMaxDataRetransmissions:
In the registry at HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters, create or edit the DWORD value of
TcpMaxDataRetransmissions. By default it is set to 5, but I would recommend doubling that value, to 10. The value of
TcpMaxDataRetransmissions is the number of times TCP retransmits an unacknowledged data segment on an existing connection.
TCP retransmits data segments until they are acknowledged or until this value expires. Basically, when a client doesn't
respond to a packet from the terminal server, the server will attempt to retransmit the packet up to
TcpMaxDataRetransmissions number of times. By increasing this value, you are giving the client more time to respond to the
server, which will help improve flaky connections or connections with high latency or higher than normal packet loss.
For more information about TcpMaxDataRetransmissions, check out this link.
If you have numerous servers you need to migrate this out to, you can hack this registry entry, export the changes to a .reg
file, then silently import it (regedit.exe /q) onto your all your servers.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters]
"ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
77,00,6b,00,73,00,73,00,76,00,63,00,2e,00,64,00,6c,00,6c,00,00,00
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000
Windows Server Time Clock External Sync
Copyright 2013 Edward Systems. All rights reserved.
165 Crusoe Rd
Kangaroo Flat, Victoria 3555
ph: 0418 575 021
matthew