Mongodb vs MySQL
(°0°)
Mongodb Key Parameters
- system:
ulimit:
mongod soft nproc 64000
mongod hard nproc 64000
mongod soft nofile 64000
mongod hard nofile 64000
Dirty Ratio and Swappiness:
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
vm.swappiness = 1
Transparent HugePages:
transparent_hugepage=never
NUMA:
numactl –interleave=all mongod
IO Scheduler:
deadline or noop
Filesystem and Options:
ext4 rw,seclabel,noatime,data=ordered 0 0
Network:
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
Security:
disable SELinux
*Mongodb Monitor Metrics**
-
mongostat
-
command
db.serverStatus()
db.stats()
db.collection.stats()
db.printReplicationInfo()
rs.status()
db.getProfilingStatus()