-
-
Save eldorplus/549a54b3f78ca02004553f3727718cd4 to your computer and use it in GitHub Desktop.
MongoDB recommendations for CentOS 7 on AWS
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
vim /etc/udev/rules.d/85-ebs.rules | |
ACTION=="add|change", KERNEL=="xvdh", ATTR{queue/scheduler}="deadline" | |
ACTION=="add|change", KERNEL=="xvdi", ATTR{queue/scheduler}="deadline" | |
ACTION=="add|change", KERNEL=="xvdj", ATTR{queue/scheduler}="deadline" | |
vim /usr/lib/tuned/throughput-performance/tuned.conf | |
Change value "readahead" to 128 | |
yum install -y numactl | |
chmod u+x /etc/rc.d/rc.local | |
systemctl start rc-local | |
systemctl enable rc-local | |
systemctl disable chronyd | |
systemctl start ntpd | |
systemctl enable ntpd | |
vim /etc/rc.local | |
# Mongo Recommendations | |
echo never > /sys/kernel/mm/transparent_hugepage/enabled | |
echo never > /sys/kernel/mm/transparent_hugepage/defrag | |
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag | |
vim /etc/sysctl.conf | |
# Mongo Recommendations | |
net.core.somaxconn=4096 | |
net.ipv4.tcp_fin_timeout=30 | |
net.ipv4.tcp_keepalive_intvl=30 | |
net.ipv4.tcp_keepalive_time=120 | |
net.ipv4.tcp_max_syn_backlog=4096 | |
vm.zone_reclaim_mode=0 | |
net.ipv4.tcp_tw_reuse=1 | |
net.ipv4.ip_local_port_range=10000 61000 | |
vim /etc/security/limits.d/mongod.conf | |
mongod soft nproc 64000 | |
mongod hard nproc 64000 | |
mongod soft nofile 64000 | |
mongod hard nofile 64000 | |
..Restart |
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
/log/*.log { | |
daily | |
rotate 7 | |
compress | |
dateext | |
missingok | |
notifempty | |
sharedscripts | |
copytruncate | |
create 640 mongod mongod | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment