Last active
July 30, 2016 15:16
-
-
Save iammehrabalam/c2bbdf2dc3aee11bfefc89c9e644bcc9 to your computer and use it in GitHub Desktop.
Linux system tuning
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
#!/bin/bash | |
# file descriptor | |
# Change 400000 to increase or decrease number of file descriptor | |
echo "* soft nofile 400000" >> /etc/security/limits.conf | |
echo "* hard nofile 400000" >> /etc/security/limits.conf | |
# Changing kernal parameters (modify value if required) | |
echo "net.core.somaxconn = 262144" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_max_syn_backlog = 16384" >> /etc/sysctl.conf | |
echo "net.core.netdev_max_backlog = 655360" >> /etc/sysctl.conf | |
echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf | |
echo "net.core.wmem_max = 16777216" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_tw_recycle = 1" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_tw_reuse = 1" >> /etc/sysctl.conf | |
echo "net.ipv4.ip_local_port_range = 1024 65535" >> /etc/sysctl.conf | |
sysctl -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment