Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created June 1, 2015 18:07
Show Gist options
  • Save diegopacheco/dcda54b7561b1e1247f0 to your computer and use it in GitHub Desktop.
Save diegopacheco/dcda54b7561b1e1247f0 to your computer and use it in GitHub Desktop.
linux os wire tuning
#!bin/bash
ulimit -n 65536
sudo sysctl -w net.ipv4.ip_local_port_range="1025 65535"
echo 300000 | sudo tee /proc/sys/fs/nr_open
echo 300000 | sudo tee /proc/sys/fs/file-max
@diegopacheco
Copy link
Author

$ sudo chmod +x tuning-linux.sh
$ sudo su
$ ./tuning-linux.sh

IF is a java process, make sure you also pass this parameters:

-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv6Addresses=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment