Friday, June 12, 2009

Network Performance identification and Tuning:

Network Performance identification and Tuning:

Useful Commands to find latency, bandwidth:
Netstat
Ping
Tracert
Pathping
Tools: - Wireshark (ethereal)
Using wireshark, we can find out which protocol the application being using.
Important Perfmon Counters:
Network Interface\Bytes Received/Sec
Network Interface\Bytes Sent/sec
Network Interface\Bytes Total/sec
Network Interface\Current Bandwidth
Network Interface\Output Queue Length

If the Network Interface\Bytes Total/sec is more than 50 percent of the total network utilization, then your server is having some problems under peak load conditions.
Correlate the network counter values with Physical Disk\% Disk Time and Processor\% Processor Time utilization. If the Disk\% disk time and %processor time values are low and the network queues are high then there might be a problem with your network card/ bandwidth.

Few TCP Stack Parameters Tuning:
1) RFC 1323

HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms

Create new Dword Tcp1323Opts and enter the Value = 3
Description: This parameter controls the use of RFC 1323 Timestamp and Window Scale TCP options. Explicit settings for timestamps and window scaling are manipulated with flag bits. Bit 0 controls window scaling, and bit 1 controls timestamps.
2) Maximum Transmission Unit size
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
Parameters\Interfaces\adapter ID MTU & value is

MTU size dictates the maximum packet size (in bytes) that the TCP/IP transport will attempt to transmit over the underlying network.
How to find MTU Value:
You can check the MTU size for your environment by opening a command prompt on your administration workstation and typingPING -f -i where MTUsize is the size you want to experiment with and gateway is the gateway of your network. Start out by using an MTU size of 1,454. Doing so will make the command look something like this:PING -F -I 1454 147.100.100.50When you enter the command, the PING will either be successful or it will fail with a message stating that the data must be fragmented. If you receive the error message, decrease the MTU value and keep trying until you find a value that works. If the PING command works the first time, try incrementing the value by five or 10 until you see the error message. You can then narrow down to the appropriate value.
HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms à EnablePMTUDiscovery and value is 1

his value can be either 0 (False) or 1 (True) to indicate if TCP should perform Maximum Transmission Unit (MTU) discovery. Setting this value to 1 causes TCP to attempt to discover the MTU, or largest packet size, over the path to a remote host.

3) HKEY_LOCAL_MACHINE\Comm\Tcpip\ GlobalMaxTcpWindowSize and the value is
Valid Range: 0–0x3FFFFFFF (1073741823 decimal; however, values greater than 64 KB can only be achieved when connecting to other systems that support RFC 1323 window scaling, which is discussed in the TCP section of this article.)
Default: This parameter does not exist by default.
Description: The TcpWindowSize parameter can be used to set the receive window on a per-interface basis. This parameter can be used to set a global limit for the TCP window size on a system-wide basis.

4) HKEY_LOCAL_MACHINE\Comm\Tcpip\ TcpWindowSize and value is 8760
ValidRange: 0–0x3FFFFFFF (1073741823 decimal). In practice the TCP/IP stack will round the number set to the nearest multiple of maximum segment size (MSS). Values greater than 64 KB can be achieved only when connecting to other systems that support RFC 1323 Window Scaling, which is discussed in the "Transmission Control Protocol (TCP)" section of this article.
Default: The smaller of the following values:
0xFFFF
GlobalMaxTcpWindowSize (another registry parameter)
The larger of four times the MSS
16384 rounded up to an even multiple of the MSS
The default can start at 17520 for Ethernet, but may shrink slightly when the connection is established to another computer that supports extended TCP header options
Description: This parameter determines the maximum TCP receive window size offered. The receive window specifies the number of bytes that a sender can transmit without receiving an acknowledgment. In general, larger receive windows improve performance over high-delay, high-bandwidth networks. For greatest efficiency, the receive window should be an even multiple of the TCP Maximum Segment Size (MSS). This parameter is both a per-interface parameter and a global parameter, depending upon where the registry key is located. If there is a value for a specific interface, that value overrides the system-wide value. See also GobalMaxTcpWindowSize.

5) MaxUserPort
KLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters MaxUserPort and the value is 65,534

6) TcpTimedWaitDelay
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters à TcpTimedWaitDelay and the value is 60
7) Keeping a packet alive
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters à DefaultTTL and the value is 255

No comments:

Post a Comment