Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ubuntu upstart file at /etc/init/mongod.conf
- # Recommended ulimit values for mongod or mongos
- # See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
- #
- limit fsize unlimited unlimited
- limit cpu unlimited unlimited
- limit as unlimited unlimited
- limit nofile 64000 64000
- limit rss unlimited unlimited
- limit nproc 32000 32000
- kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
- pre-start script
- DAEMONUSER=${DAEMONUSER:-mongodb}
- touch /var/run/mongocs.pid
- chown $DAEMONUSER /var/run/mongocs.pid
- end script
- start on runlevel [2345]
- stop on runlevel [06]
- script
- ENABLE_MONGOD="yes"
- DAEMON=/usr/bin/mongod
- DAEMONUSER=${DAEMONUSER:-mongodb}
- if [ -f /etc/default/mongod ]; then . /etc/default/mongod; fi
- # Handle NUMA access to CPUs (SERVER-3574)
- # This verifies the existence of numactl as well as testing that the command works
- NUMACTL_ARGS="--interleave=all"
- if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
- then
- NUMACTL="$(which numactl) -- $NUMACTL_ARGS"
- DAEMON_OPTS=${DAEMON_OPTS:-"--configsvr --dbpath /mnt/mongo/confsrv --logpath /mnt/mongo/logs/mongocs.log --logappend"}
- else
- NUMACTL=""
- DAEMON_OPTS="-- "${DAEMON_OPTS:-"--configsvr --dbpath /mnt/mongo/confsrv --logpath /mnt/mongo/logs/mongocs.log --logappend"}
- fi
- if [ "x$ENABLE_MONGOD" = "xyes" ]
- then
- exec start-stop-daemon --start \
- --chuid $DAEMONUSER \
- --pidfile /var/run/mongocs.pid \
- --make-pidfile \
- --exec $NUMACTL $DAEMON $DAEMON_OPTS
- fi
- end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement