Forked from xuyanke/Ubuntu reduce TIME_WAIT and set socket recycle and reuse
Created
September 10, 2018 16:40
-
-
Save karlmutch/2f1adda969b44d106429058c644f4de9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo vi /etc/sysctl.conf | |
| # Add the following to sysctl.conf: | |
| # Decrease TIME_WAIT seconds | |
| net.ipv4.tcp_fin_timeout = 30 | |
| # Recycle and Reuse TIME_WAIT sockets faster | |
| net.ipv4.tcp_tw_recycle = 1 | |
| net.ipv4.tcp_tw_reuse = 1 | |
| #reference http://www.linuxbrigade.com/reduce-time_wait-socket-connections/ | |
| # Lastly apply changes | |
| sudo /sbin/sysctl -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment