To enable TokuDB engine in MariaDB one has to be sure that transparent hugepages are disabled.
I assume you’ve already installed MariaDB and edited config files so that TokuDB should be enabled.
Test if transparent hugepages are enabled or disabled:
root@sheershoff-kbnt:/etc# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
root@sheershoff-kbnt:/etc# cat /sys/kernel/mm/transparent_hugepage/defrag
always madvise [never]
If you see [never]
– then you’re all set. If TokuDB doesn’t get enabled after mysql restart – it’s probably not hugepages.
There are how-tos that tell how to turn off hugepages at boot, but they never made it work on Ubuntu. Add the following lines to /etc/rc.local
before exit 0
:
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
service mysql restart
Reboot and check if TokuDB engine is enabled in mysql after reboot.