Reducing port time waiting

Tune the ports to reduce TIME_WAIT socket connections from 60 to 15:

By default, Linux tcp socket connections will result in a 60 second TIME_WAIT per connection. To find out the current TIME_WAIT settings, issue:

$ cat /proc/sys/net/ipv4/tcp_fin_timeout

Default response: 60

To reduce this setting temporarily, issue the following command as the root user ID:

# echo 15 > /proc/sys/net/ipv4/tcp_fin_timeout

To permanently change the /proc/sys/net/ipv4/tcp_fin_timeout setting to 15, as the root user ID, edit the file /etc/sysctl.conf and append the following:

net.ipv4.tcp_fin_timeout=15

Then, restart the networking service:

# service network restart

Join The Discussion

Your email address will not be published. Required fields are marked *