본문 바로가기

IT/Server

OS별 Time_Wait 시간 변경 방법


TIME_WAIT 시간을 변경하는 방법이 OS별로 나와있습니다.

HP-UX의 경우 Solaris와 동일한 방법으로 사용하면 됩니다.

Tuning TCP/IP TIME_WAIT For Systems With High Connection Rates
Applies To: VDE / DFE / DSE (all versions, all operating systems)

Description: When using the "netstat" command to look at open TCP/IP connections, a large number of connections in the TIME_WAIT state are observed. The system exhibits poor throughput possibly coupled with high CPU use on the VDE/DFE/DSE server.

TCP uses a special handshake to close completed sessions. The TIME_WAIT state is used to handle possible problems that may occur in the network relating to unreliable or delayed packet delivery. Accordingly, TCP holds connections for a temporary waiting period (TIME_WAIT) to ensure that any delayed packets are caught and not treated as new connection requests. The size of TIME_WAIT is supposed to be twice the maximum segment lifetime or twice the time a packet can remain alive on a particular IP network. For some operating systems, this can be as high as 4 minutes!

On busy systems, this can lead to a depleation of TCP port resources. Low throughput may occur due to many connections sitting in TIME_WAIT state.

Explanation/Workaround: OctetString recommends reducing the operating system setting for TIME_WAIT substantially. If VDE / DFE / DSE is the only server product on the system, this can be reduced to the operating system minimum of 15 or 30 seconds (depending on OS).

For Windows:
Use regedit and create a REG_DWORD named TcpTimedWaitDelay under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters

Set it to a decimal value of 30 which is for 30 seconds - the minimum.

For AIX:
To see the current TCP_TIMEWAIT value, run the following command:
/usr/sbin/no | grep tcp_timewait

To set the TCP_TIMEWAIT values to 15 seconds, run the following command:
/usr/sbin/no tcp_timewait =1

The tcp_timewait option is used to configure how long connections are kept in the timewait state. It is given in 15-second intervals, and the default is 1.

For Linux:
Set the timeout_timewait paramater using the following command:
/sbin/sysctl -w net.ipv4.vs.timeout_timewait=30

This will set TME_WAIT for 30 seconds.

For Solaris:
Set the tcp_time_wait_interval to 30000 milliseconds as follows:
/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 30000 

'IT > Server' 카테고리의 다른 글

CENT-OS Yum install  (0) 2010.11.20
CMD.exe  (0) 2009.03.17
LINUX 데몬  (0) 2008.07.08
Windows 프로세스 모음  (0) 2008.07.08
Windows Findstr 사용하기  (0) 2008.07.08