[Pkg-mongodb-maintainers] [pkg-mongodb] 306/394: Support NUMA configurations
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Wed Sep 21 13:59:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository pkg-mongodb.
commit c81d9640b8e881fd0a44930e0beacf7edef4ef5c
Author: Laszlo Boszormenyi (GCS) <gcs at debian.org>
Date: Tue Jun 30 15:42:43 2015 +0000
Support NUMA configurations
---
debian/changelog | 1 +
debian/mongodb-server.mongodb.init | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 48a59e9..b32a849 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
mongodb (1:2.4.10-2) unstable; urgency=low
* Enable systemd service (closes: #745674).
+ * Support NUMA configurations (closes: #714955).
-- Laszlo Boszormenyi (GCS) <gcs at debian.org> Sat, 21 Jun 2014 18:34:48 +0000
diff --git a/debian/mongodb-server.mongodb.init b/debian/mongodb-server.mongodb.init
index ba426e6..f9caa22 100644
--- a/debian/mongodb-server.mongodb.init
+++ b/debian/mongodb-server.mongodb.init
@@ -29,7 +29,7 @@
# Default-Stop: 0 1 6
# Short-Description: An object/document-oriented database
# Description: MongoDB is a high-performance, open source, schema-free
-# document-oriented data store that's easy to deploy, manage
+# document-oriented data store that's easy to deploy, manage
# and use. It's network accessible, written in C++ and offers
# the following features:
# .
@@ -64,6 +64,18 @@ if [ -f /etc/default/$NAME ] ; then
. /etc/default/$NAME
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:-"--config $CONF"}
+else
+ NUMACTL=""
+ DAEMON_OPTS="-- "${DAEMON_OPTS:-"--config $CONF"}
+fi
+
if test ! -x $DAEMON; then
echo "Could not find $DAEMON"
exit 0
@@ -86,7 +98,6 @@ DAEMON_OPTS=${DAEMON_OPTS:-"--unixSocketPrefix=$RUNDIR --config $CONF run"}
set -e
-
running_pid() {
# Check if a given process pid's cmdline matches a given name
pid=$1
@@ -115,7 +126,7 @@ start_server() {
# Start the process using the wrapper
start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
--make-pidfile --chuid $DAEMONUSER \
- --exec $DAEMON -- $DAEMON_OPTS
+ --exec $NUMACTL $DAEMON $DAEMON_OPTS
errcode=$?
return $errcode
}
@@ -123,6 +134,7 @@ start_server() {
stop_server() {
# Stop the process using the wrapper
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --retry 300 \
--user $DAEMONUSER \
--exec $DAEMON
errcode=$?
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git
More information about the Pkg-mongodb-maintainers
mailing list