logo
Published on Technical articles on: Windows servers, Apache Web Server, MySQL, PHP, IIS (http://www.sitebuddy.com)

Windows TCPIP Performance tuning & netstat command

By chris
Created 14 Feb 2006 - 10:46am

1) Recommended by many sites. For all type of roles (simple pc to mail server...etc..).
KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters
TcpTimedWaitDelay REG_DWORD
Set the value to decimal 30, which is Hex 0x0000001e. This value sets the wait time to 30 seconds.
Default value: 0xF0, which sets the wait time to 240 seconds (4 minutes).
Recommended value: A minimum value of 0x1E, which sets the wait time to 30 seconds.

If you run the command netstat -an you will see network connections in the TIME_WAIT state. The previous parameter indicates how long these connections can stay in that state before being recouped by the server.

Note: The command netstat can be very handy on Windows server to troubleshoot many different kinds of network issues.

More information on netstat:

netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]

-a : Displays all active TCP connections and the TCP and UDP ports on which the computer is listening.
-e :
Displays Ethernet statistics: the number of bytes and packets sent, received and errors. This parameter can be combined with -s.
-n : Displays active TCP connections, however, addresses and port numbers are expressed numerically (no DNS resolution).
-o : Displays active TCP connections and includes the process ID (PID) for each connection. You can find the application based on the PID on the Processes tab in Windows Task Manager. This parameter can be combined with -a, -n, and -p.
-p Protocol : Shows connections for the protocol specified by Protocol. In this case, the Protocol can be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, Protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.
-s : Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. If the IPv6 protocol for Windows is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols.
-r :
Displays the contents of the IP routing table. This is equivalent to the route print command.
Interval : Refresh the selected information every Interval seconds. Press CTRL+C to stop the redisplay.

Example of useful usage:
netstat -n -p tcp 5
 


Source URL:
http://www.sitebuddy.com/windows/performance/tcpip/tuning