Skip to content

Instantly share code, notes, and snippets.

@komputronika
Forked from n4ss1m/tcp_tweaks.txt
Created April 15, 2024 07:35
Show Gist options
  • Save komputronika/9d45902ac33e7ab4f4fc000d6ef0aef2 to your computer and use it in GitHub Desktop.
Save komputronika/9d45902ac33e7ab4f4fc000d6ef0aef2 to your computer and use it in GitHub Desktop.
High performance tuning of Nginx
## From a post on the ML, apropos this:
## http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast.
## For sysctl.conf
net.ipv4.tcp_slow_start_after_idle = 0
echo "1768 64512" > /proc/sys/net/ipv4/ip_local_port_range
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 1 > /proc/sys/net/ipv4/tcp_timestamps
echo 10 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 65536 > /proc/sys/net/core/somaxconn
echo 65536 > /proc/sys/net/ipv4/tcp_max_syn_backlog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment