Last active
April 20, 2024 13:34
-
-
Save Gazler/c539b7ef443a6ea5a182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysctl -w fs.file-max=12000500 | |
sysctl -w fs.nr_open=20000500 | |
ulimit -n 4000000 | |
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 | |
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb | |
yes | sudo apt-get update | |
yes | sudo apt-get install elixir esl-erlang build-essential git gnuplot libtemplate-perl | |
wget http://tsung.erlang-projects.org/dist/tsung-1.6.0.tar.gz | |
tar -xvf tsung-1.6.0.tar.gz | |
cd tsung-1.6.0/ | |
./configure | |
make | |
sudo make install | |
cd .. | |
wget https://gist.githubusercontent.com/Gazler/53b842764f778fe57757/raw/9509c3d980f13bbb739f4ae117dc84ef1d721076/phoenix.xml | |
git clone -b bench https://github.com/Gazler/phoenix_chat_example.git | |
echo "root soft nofile 4000000" >> /etc/security/limits.conf | |
echo "root hard nofile 4000000" >> /etc/security/limits.conf |
Find out the number of connected sockets:
lsof -n -p <pid> | wc -l
Find out the ulimit of a process:
cat /proc/<pid>/limits
Using number 4000000
in /etc/security/limits.conf
on Debian 9 is not working. I had to use some smaller number. Otherwise it will be using default value 1024.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo sysctl -w net.ipv4.ip_local_port_range="1024 64000"
http://www.cyberciti.biz/tips/linux-increase-outgoing-network-sockets-range.html