Tuning linux network stack - with examples - Part 1

Limit            Soft Limit     Hard Limit     Units
Max open files 1048576 1048576 files
Limit            Soft Limit      Hard Limit      Units
Max open files 1024 1048576 files
ulimit -n 1048576
sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768 60999
sudo sysctl -w net.ipv4.ip_local_port_range="1024 65535"
sudo sysctl -p
sudo sysctl -w net.ipv4.ip_local_reserved_ports="8080,10080-10089"
sudo sysctl -p
sudo netstat -tupn | grep ":<port>"
sudo sysctl -w net.ipv4.tcp_timestamps=1
sudo sysctl -w net.ipv4.tcp_tw_reuse=1
sudo sysctl -p

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Parth Mistry

Parth Mistry

30 Followers

Enterprise Application and BigData engineering enthusiast. Interested in highly efficient low-cost app design and development with Java/Scala and Rust 🦀