Skip to content

Instantly share code, notes, and snippets.

@simple
Forked from kwilczynski/gist:1170467
Created November 14, 2011 18:43
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simple/1364716 to your computer and use it in GitHub Desktop.
Save simple/1364716 to your computer and use it in GitHub Desktop.
Upstart configutation file for MongoDB with NUMA support
# Ubuntu upstart file at /etc/init/mongodb.conf
limit nofile 32768 32768
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
pre-start script
mkdir -p /data/mongodb &> /dev/null
mkdir -p /data/logs/mongo &> /dev/null
chown mongodb:nogroup /data/mongodb &> /dev/null
chown mongodb:nogroup /data/logs/mongo &> /dev/null
end script
start on runlevel [2345]
stop on runlevel [06]
script
ENABLE_MONGODB="yes"
if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi
if [ "x$ENABLE_MONGODB" = "xyes" ]; then
exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/numactl -- --interleave=all \
/usr/bin/mongod --config /etc/mongodb.conf
fi
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment