Skip to content

Instantly share code, notes, and snippets.

@Kazempour
Kazempour / network-tweak.md
Created December 8, 2022 04:07 — forked from mustafaturan/network-tweak.md
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'

Keybase proof

I hereby claim:

  • I am kazempour on github.
  • I am vahidk (https://keybase.io/vahidk) on keybase.
  • I have a public key ASDHUZnDLP7KnW-XOQ-HEwALh2dG3kL1tQdeDc3jF4S9ogo

To claim this, I am signing this object: