Last active
December 16, 2019 19:16
-
-
Save TotalLag/0e67004ee1c3cb940a0e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| sudo su | |
| ulimit -n 99999 | |
| echo '* hard nofile 500000' >> /etc/security/limits.conf | |
| echo '* soft nofile 500000' >> /etc/security/limits.conf | |
| echo 'root hard nofile 500000' >> /etc/security/limits.conf | |
| echo 'root soft nofile 500000' >> /etc/security/limits.conf | |
| echo 0 > /sys/block/vda/queue/rotational | |
| echo 0 > /sys/block/vda/queue/rq_affinity | |
| echo noop > /sys/block/vda/queue/scheduler | |
| echo "echo 0 > /sys/block/vda/queue/rotational" >> /etc/rc.local | |
| echo "echo 0 > /sys/block/vda/queue/rq_affinity" >> /etc/rc.local | |
| echo "echo noop > /sys/block/vda/queue/scheduler" >> /etc/rc.local | |
| echo 'vm.swappiness=5' >> /etc/sysctl.conf | |
| echo 'vm.vfs_cache_pressure=50' >> /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_rmem=4096 87380 16777216' >> /etc/sysctl.conf | |
| echo 'net.ipv4.tcp_wmem=4096 65536 16777216' >> /etc/sysctl.conf | |
| echo 'fs.file-max=100000' >> /etc/sysctl.conf | |
| sysctl -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment