Skip to content

Instantly share code, notes, and snippets.

@nk952777
Last active September 28, 2017 06:18
Show Gist options
  • Save nk952777/79ba27998f2b417bb76f7e3b5cd2bb88 to your computer and use it in GitHub Desktop.
Save nk952777/79ba27998f2b417bb76f7e3b5cd2bb88 to your computer and use it in GitHub Desktop.
Linux Tuning
# /etc/sysctl.conf
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_window_scaling = 0
net.ipv4.tcp_sack = 0
net.core.netdev_max_backlog = 30000
net.ipv4.tcp_no_metrics_save = 1
net.core.somaxconn = 65535
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
# For Netta(Docker)
net.ipv4.ip_forward = 1
#/etc/security/limits.conf
* soft nofile 570000
* hard nofile 570000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment