Created
October 30, 2015 06:15
-
-
Save kei2100/56913a04a890282c3287 to your computer and use it in GitHub Desktop.
ulimit sysctl memo
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
cat <<EOF >> /etc/security/limits.conf | |
root soft nofile 65536 | |
root hard nofile 65536 | |
root soft stack 16384 | |
root hard stack 32768 | |
root soft nproc 16384 | |
root hard nproc 32768 | |
* soft nofile 65536 | |
* hard nofile 65536 | |
* soft stack 16384 | |
* hard stack 32768 | |
* soft nproc 16384 | |
* hard nproc 32768 | |
EOF | |
cat <<EOF >>/etc/sysctl.conf | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
net.ipv4.conf.all.log_martians = 0 | |
net.core.wmem_max = 1048576 | |
net.core.rmem_max = 1048576 | |
net.core.rmem_default=1048576 | |
net.core.wmem_default=1048576 | |
net.core.optmem_max = 20480 | |
net.ipv4.ip_local_port_range = 1024 65535 | |
net.ipv4.tcp_rmem=4096 87380 1048576 | |
net.ipv4.tcp_wmem=4096 16384 1048576 | |
net.ipv4.tcp_mem=1048576 1048576 1048576 | |
net.ipv4.tcp_keepalive_time = 900 | |
net.ipv4.tcp_keepalive_probes = 3 | |
net.ipv4.tcp_keepalive_intvl = 15 | |
net.core.somaxconn = 4096 | |
net.core.netdev_max_backlog = 4096 | |
net.ipv4.tcp_max_syn_backlog=4096 | |
kernel.sem = 250 32000 96 128 | |
kernel.panic = 60 | |
kernel.sysrq = 1 | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 | |
vm.swappiness = 0 | |
EOF | |
sysctl -p | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment