Skip to content

Instantly share code, notes, and snippets.

@parhamr
Forked from colby/-
Last active August 29, 2015 14:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save parhamr/fc83983c778d850f3b4b to your computer and use it in GitHub Desktop.
Save parhamr/fc83983c778d850f3b4b to your computer and use it in GitHub Desktop.
Boilerplate Linux Kernel tweaks for a webserver
fs.file-max=131072
kernel.shmall=32768
kernel.shmmax=536870912
net.core.netdev_max_backlog=4096
net.core.optmem_max=25165824
net.core.rmem_default=25165824
net.core.rmem_max=25165824
net.core.somaxconn=4096
net.core.wmem_default=65536
net.core.wmem_max=25165824
net.inet.tcp.msl=7500
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.all.log_martians=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.default.log_martians=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.ip_forward=0
net.ipv4.tcp_keepalive_time=1800
net.ipv4.tcp_max_syn_backlog=4096
net.ipv4.tcp_rmem=4096 25165824 25165824
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_wmem=4096 65536 25165824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment