Changes to add support for mongodb for xenial to trove/integration. The schema is the same proposed by Doug Shelley in the initial work, splitting trusty and xenial. - bumped version to 3.2.11 - conversion of upstart files in systemd unit files for mongod and mongos - added oneshot systemd unit file for Transparent Huge Pages - added script to check if numactl is used by the system and oneshot systemd unit file that will generate an environment file for mongod systemd service Change-Id: Ie6492b24f6803b35d929b499cfb7716e28bebfaa Depends-On: I8e1de6ef31f969ccee88c334a0d5ed03aabd1b51
43 lines
1.0 KiB
Bash
Executable File
43 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
cat > /etc/init.d/disable-transparent-hugepages << '_EOF_'
|
|
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: disable-transparent-hugepages
|
|
# Required-Start: $local_fs
|
|
# Required-Stop:
|
|
# X-Start-Before: mongod mongodb-mms-automation-agent
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Disable Linux transparent huge pages
|
|
# Description: Disable Linux transparent huge pages, to improve
|
|
# database performance.
|
|
### END INIT INFO
|
|
|
|
case $1 in
|
|
start)
|
|
if [ -d /sys/kernel/mm/transparent_hugepage ]; then
|
|
thp_path=/sys/kernel/mm/transparent_hugepage
|
|
elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then
|
|
thp_path=/sys/kernel/mm/redhat_transparent_hugepage
|
|
else
|
|
return 0
|
|
fi
|
|
|
|
echo 'never' > ${thp_path}/enabled
|
|
echo 'never' > ${thp_path}/defrag
|
|
|
|
unset thp_path
|
|
;;
|
|
esac
|
|
_EOF_
|
|
|
|
chmod 755 /etc/init.d/disable-transparent-hugepages
|
|
|
|
update-rc.d disable-transparent-hugepages defaults
|