summaryrefslogtreecommitdiff
path: root/source/ap/mariadb/rc.mysqld
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/mariadb/rc.mysqld')
-rw-r--r--source/ap/mariadb/rc.mysqld15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/ap/mariadb/rc.mysqld b/source/ap/mariadb/rc.mysqld
index 7c42d03c..e7b7e85e 100644
--- a/source/ap/mariadb/rc.mysqld
+++ b/source/ap/mariadb/rc.mysqld
@@ -34,6 +34,9 @@ SKIP="--skip-networking"
# Uncomment the next line to use Oracle's InnoDB plugin instead of the included XtraDB
#INNODB="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb.so"
+# Uncomment the next line to use TokuDB
+#TOKUDB="--plugin-load=ha_tokudb"
+
# Start mysqld:
mysqld_start() {
if [ -x /usr/bin/mysqld_safe ]; then
@@ -44,7 +47,13 @@ mysqld_start() {
rm -f /var/run/mysql/mysql.pid
fi
fi
- /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB &
+
+ if ! [ -z "$TOKUDB" ]; then
+ echo "never" > /sys/kernel/mm/transparent_hugepage/enabled
+ echo "never" > /sys/kernel/mm/transparent_hugepage/defrag
+ fi
+
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB $TOKUDB &
fi
}
@@ -65,6 +74,10 @@ mysqld_stop() {
echo "WARNING: Gave up waiting for mysqld to exit!"
sleep 15
fi
+ if ! [ -z "$TOKUDB" ]; then
+ echo "always" > /sys/kernel/mm/transparent_hugepage/enabled
+ echo "always" > /sys/kernel/mm/transparent_hugepage/defrag
+ fi
fi
}