Skip to content

Instantly share code, notes, and snippets.

@integrii
Created July 17, 2016 09:00
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 integrii/0d2959e67c531046431d210e3d993838 to your computer and use it in GitHub Desktop.
Save integrii/0d2959e67c531046431d210e3d993838 to your computer and use it in GitHub Desktop.
This systemctl chain can take the TCP stack up to 2M connections.
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 20000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment