星期五, 3月 02, 2012

Configuring TCP KeepAlive Parameters[轉載]

Configuring TCP KeepAlive Parameters

Last Update: 19 June 2008
Product: StarLicense for Windows/UNIX 
Version: 1.07 or later 
Article ID: SQV00SL002

Abstract

The StarLicense server uses the settings for the TCP KeepAlive parameter to clean up connections from clients that have disconnected without releasing a license that has been checked out. You can change the TCP KeepAlive parameter if you need the abandoned license checkouts to be cleaned up more frequently.

Solution

The StarLicense server uses the system TCP/IP KeepAlive parameter settings to clean up connections from clients that have disconnected from the network without releasing the StarQuest product license that was checked out by the computer. The default values for the KeepAlive parameter should be sufficient for most users, but you can change them if necessary, such as to clean up abandoned license connections more frequently. The KeepAlive parameter names vary by operating system but generally specify:
  • the interval to wait before probing the idle connection (on most platforms the default is 2 hours)
  • the interval to wait before retrying the probe after an initial failure to respond
  • the maximum number of times to retry the probe
Modifying the KeepAlive parameter settings may affect the operation of other applications on the computer. You also may want to set additional TCP/IP parameters that affect TCP connections, depending on the overall impact to other TCP/IP parameters after you modify the KeepAlive settings.
The method of changing the KeepAlive parameter settings varies by operating system, so refer to your system documentation for details. This technical document describes the general steps for displaying and modifying the KeepAlive parameter for the platforms on which the StarLicense server supports.
The following table shows the names of the KeepAlive parameters for each supported operating system.
Table 1: Keepalive Parameters by Operating System
Operating System
Parameter wait time before probing the connection
Parameter interval between retry probes
Parameter maximum retry probes
Unit of measure
AIX
tcp_keepidle
tcp_keepintvl
n/a
half-seconds
FreeBSD
TCPTV_KEEP_IDLE
TCPTV_KEEPINTVL
TCPTV_KEEPCNT 
seconds
HP-UX 11i
tcp_time_wait_interval
tcp_keepalive_interval
tcp_keepalives_kill (1)
milliseconds
Linux
tcp_keepalive_time
tcp_keepalive_intvl
tcp_keepalive_probes
seconds
Solaris
tcp_time_wait_interval
tcp_keepalive_interval
n/a
milliseconds
Windows
KeepAliveTime
KeepAlive Interval
TcpMaxDataRetransmission
milliseconds
(1): tcp_keepalives_kill cannot be modified on HP. It is set to 1.

Displaying and Modifying KeepAlive Values

Follow these steps to modify the values.
1.       Log in as root on a UNIX-based computer or as an Administrator on a Windows computer.
2.       Refer to the information for the operating system you are using, as suggested in the following table, to display information about the network tuning parameters.
Platform
Operating System Command
AIX
no -a
HP-UX 11i
ndd -h supported
FreeBSD
Examine /usr/src/sys/netinet/tcp_timer.h and tcp_timer.c
Linux
sysctl -h
Sun Solaris
ndd /dev/tcp \?
Windows
3.       Display the current KeepAlive settings, replacing <tcp_parameter> with the names shown in Table 1 for each platform.
Platform
Operating System Command
AIX
no -o<tcp_parameter>
FreeBSD
Examine /usr/src/sys/netinet/tcp_timer.h and tcp_timer.c
HP-UX 11i
ndd -get /dev/tcp <tcp_parameter>
Linux
sysctl net.ipv4.<tcp_parameter>
Sun Solaris
ndd -get /dev/tcp <tcp_parameter>
Windows
From the Start menu, choose Run and enter regedit to view the parameter located in the Registry file HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
4.       Display the range of available settings.
Platform
Operating System Command
AIX
This option is not available.
FreeBSD
This option is not available.
HP-UX 11i
ndd -h <tcp_parameter>
Linux
This option is not available.
Sun Solaris
This option is not available.
Windows
5.       Modify the KeepAlive values as desired.
Platform
Operating System Command
AIX
no -o <tcp_parameter>= <tcp _value>
FreeBSD
Modify /usr/src/sys/netinet/tcp_timer.h and rebuild the kernel.
HP-UX 11i
ndd -set /dev/tcp <tcp_parameter> <tcp_value>
Linux
To set the value temporarily until the computer is restarted: 
sysctl -w net.ipv4.<tcp_parameter> = <tcp_value> 
To make the change permanently:
Update /etc/sysctl.conf with net.ipv4.<tcp_parameter> = <tcp_value> and issue one of the following commands, depending on which version of Linux you are running:
Red Hat: chkconfig sysctl on
Suse: chkconfig boot.sysctl on
Sun Solaris
ndd -set /dev/tcp <tcp_parameter> <tcp_value>
Windows
Run regedit to edit the Windows Registry key located in the pathHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters.
After you change the Registry value you must restart the computer for the change to take affect.


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...