Skip to content

Instantly share code, notes, and snippets.

@mariano-aguero
Last active February 26, 2018 17:02
Show Gist options
  • Save mariano-aguero/b14acf93a8f572e08098 to your computer and use it in GitHub Desktop.
Save mariano-aguero/b14acf93a8f572e08098 to your computer and use it in GitHub Desktop.
TCP Configuration
net.core.rmem_max = 16777216 // sudo sysctl -w net.core.rmem_max=16777216
net.ipv4.tcp_rmem = 4096 87380 16777216 // sudo sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216'
net.core.wmem_max = 16777216 // sudo sysctl -w net.core.wmem_max=16777216
net.ipv4.tcp_wmem = 4096 16384 16777216 // sudo sysctl -w net.ipv4.tcp_wmem='4096 16384 16777216'
net.ipv4.tcp_fin_timeout = 20 // sudo sysctl -w net.ipv4.tcp_fin_timeout=20
net.ipv4.tcp_tw_reuse = 1 // sudo sysctl -w net.ipv4.tcp_tw_reuse=1
net.core.netdev_max_backlog = 10000 // sudo sysctl -w net.core.netdev_max_backlog=10000
net.ipv4.ip_local_port_range = 15000 65000 // sudo sysctl -w net.ipv4.ip_local_port_range='15000 65000'
net.core.somaxconn = 2048 // sudo sysctl -w net.core.somaxconn=2048
net.core.rmem_max = 16777216 // sudo sysctl -w net.core.rmem_max=16777216 | echo 'net.core.rmem_max=16777216' >> /etc/sysctl.conf
net.ipv4.tcp_rmem = 4096 87380 16777216 // sudo sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216' | echo 'net.ipv4.tcp_rmem=4096 87380 16777216 >> /etc/sysctl.conf
net.core.wmem_max = 16777216 // sudo sysctl -w net.core.wmem_max=16777216 | echo 'net.core.wmem_max=16777216' >> /etc/sysctl.conf
net.ipv4.tcp_wmem = 4096 16384 16777216 // sudo sysctl -w net.ipv4.tcp_wmem='4096 16384 16777216' | echo 'net.ipv4.tcp_wmem=4096 16384 16777216' >> /etc/sysctl.conf
net.ipv4.tcp_fin_timeout = 20 // sudo sysctl -w net.ipv4.tcp_fin_timeout=20 | echo 'net.ipv4.tcp_fin_timeout=20' >> /etc/sysctl.conf
net.ipv4.tcp_tw_reuse = 1 // sudo sysctl -w net.ipv4.tcp_tw_reuse=1 | echo 'net.ipv4.tcp_tw_reuse=1' >> /etc/sysctl.conf
net.core.netdev_max_backlog = 10000 // sudo sysctl -w net.core.netdev_max_backlog=10000 | echo 'net.core.netdev_max_backlog=10000' >> /etc/sysctl.conf
net.ipv4.ip_local_port_range = 15000 65000 // sudo sysctl -w net.ipv4.ip_local_port_range='15000 65000' | echo 'net.ipv4.ip_local_port_range=15000 65000' >> /etc/sysctl.conf
net.core.somaxconn = 2048 // sudo sysctl -w net.core.somaxconn=2048 | echo 'net.core.somaxconn=2048' >> /etc/sysctl.conf
@mariano-aguero
Copy link
Author

sysctl net.core.somaxconn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment