Skip to content

Instantly share code, notes, and snippets.

@sambernard
sambernard / network-tweak.md
Created December 29, 2020 17:17 — 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 sambernard on github.
  • I am sambernard (https://keybase.io/sambernard) on keybase.
  • I have a public key whose fingerprint is AA92 1A6B 99CB 1ADE A0C2 3797 AF77 512C A697 AA29

To claim this, I am signing this object:

Verifying that +sambernard is my blockchain ID. https://onename.com/sambernard
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin