Skip to content

Instantly share code, notes, and snippets.

@r33int
Created May 28, 2019 10:23
Show Gist options
  • Save r33int/e6adb515c76e4a8cc0bec89ab76e1806 to your computer and use it in GitHub Desktop.
Save r33int/e6adb515c76e4a8cc0bec89ab76e1806 to your computer and use it in GitHub Desktop.
sysctl tweaks used for my deployments
### BEGIN SYSCTL TWEAKS ###
fs.file-max = 2097152
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.ip_local_port_range = 2000 65535
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15
net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 65536 131072 262144
net.ipv4.udp_mem = 65536 131072 262144
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_reuse = 1
### END SYSCTL TWEAKS ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment