Skip to content

Instantly share code, notes, and snippets.

@Nymphium
Created November 28, 2014 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nymphium/d6bf0e6c8b4655fc8f84 to your computer and use it in GitHub Desktop.
Save Nymphium/d6bf0e6c8b4655fc8f84 to your computer and use it in GitHub Desktop.
put thi at /etc/sysctl.d/ (as the ditectory structure after Arch Linux)
net.ipv4.tcp_tw_recycle=1
fs.file-max = 100000
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_sack=1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.core.somaxconn=40000
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.core.rmem_default = 134217728
net.core.wmem_default = 134217728
net.core.optmem_max = 40960
net.ipv4.tcp_rmem = 40960 277750 134217728
net.ipv4.tcp_wmem = 40960 277750 134217728
net.core.netdev_max_backlog = 50000
net.ipv4.tcp_max_syn_backlog = 40000
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.log_martians = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment