Skip to content

Instantly share code, notes, and snippets.

@xtrafrancyz
Created December 25, 2018 17:16
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 xtrafrancyz/3fae80b033a60d9d5653d4f27759b466 to your computer and use it in GitHub Desktop.
Save xtrafrancyz/3fae80b033a60d9d5653d4f27759b466 to your computer and use it in GitHub Desktop.
High-performance sysctl config for a very limited server
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_syncookies=0
net.ipv4.tcp_congestion_control = yeah
net.ipv4.tcp_westwood = 0
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.ip_forward = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_tw_reuse = 1
net.core.rmem_max = 524288
net.core.wmem_max = 524288
#net.ipv4.tcp_mem = 5586 7448 11172
net.ipv4.tcp_mem = 9000 11000 15000
#net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_rmem = 4096 32768 262144
#net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_wmem = 4096 32768 262144
fs.file-max = 500000
vm.swappiness = 0
vm.vfs_cache_pressure = 6000
#vm.min_free_kbytes = 2773
vm.min_free_kbytes = 8000
net.netfilter.nf_conntrack_max = 1048576
net.nf_conntrack_max = 1048576
net.core.somaxconn = 1024
net.core.netdev_max_backlog = 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment