Skip to content

Instantly share code, notes, and snippets.

@imiroslavov
Created October 29, 2019 08:58
Show Gist options
  • Save imiroslavov/0e45e6c966081ad1e9c5a2ecd1b65387 to your computer and use it in GitHub Desktop.
Save imiroslavov/0e45e6c966081ad1e9c5a2ecd1b65387 to your computer and use it in GitHub Desktop.
Attempt to scale a local machine to handle 60k+ open connections
# /etc/security/limits.conf
* soft nofile 1000000
* hard nofile 1000000
# /etc/sysctl.conf
fs.file-max = 1000000
fs.nr_open = 1000000
net.ipv4.ip_local_port_range = 1000 65535
net.ipv4.tcp_mem = 786432 1697152 1945728
net.ipv4.tcp_rmem = 4096 4096 16777216
net.ipv4.tcp_wmem = 4096 4096 16777216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment