Created
November 20, 2017 20:58
-
-
Save tejaskokje/891a04eb74babe8cae259cc56131dad4 to your computer and use it in GitHub Desktop.
99-xperf.conf
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
# file descriptors | |
fs.file-max = 100000 | |
# virtual memory | |
# we don't have swap, make it explicit | |
vm.swappiness = 0 | |
# networking | |
# general backlogs | |
# The maximum number of "backlogged sockets". Default is 128. | |
net.core.somaxconn = 10000 | |
# max number of packets allowed to queue when an interface receives pkts faster than kernel can process them. Default is 300. | |
net.core.netdev_max_backlog = 5000 | |
net.ipv4.tcp_max_syn_backlog = 10240 | |
# increase socket buffers | |
net.core.rmem_max = 16777216 | |
net.core.wmem_max = 16777216 | |
net.ipv4.tcp_wmem = 4096 12582912 16777216 | |
net.ipv4.tcp_rmem = 4096 12582912 16777216 | |
# The congestion window size in the maximum segment size (MSS) of a TCP connection after it has been idled (no segment received) for a period of one retransmission timeout (RTO). | |
net.ipv4.tcp_slow_start_after_idle = 1 | |
# Allow to reuse TIME-WAIT sockets for new connections when it is safe from protocol viewpoint. | |
net.ipv4.tcp_tw_reuse = 1 | |
# we reserve ports 1024 - 10240 for internal use | |
net.ipv4.ip_local_port_range = 10240 65535 | |
# default. just make it explicit. | |
net.ipv4.tcp_syncookies = 1 | |
# Strict mode as defined in RFC3704 Strict Reverse Path. Prevents IP Spoofing | |
net.ipv4.conf.all.rp_filter = 1 | |
# The maximum number of sockets in TIME-WAIT to be held simultaneously. Default is 180000. | |
net.ipv4.tcp_max_tw_buckets = 400000 | |
# The maximum number of TCP sockets that are not attached to any user file handle to maintain. Default is 8192. | |
net.ipv4.tcp_max_orphans = 60000 | |
# The number of attempts to establish a passive TCP connection that was started by another host. Default is 5. | |
net.ipv4.tcp_synack_retries = 3 | |
# Time to hold socket in state FIN-WAIT-2, if it was closed by our side. Peer can be broken and never close its side, or even died unexpectedly. Default value is 60sec. | |
net.ipv4.tcp_fin_timeout = 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment