bin/voltdb create
ERROR: The kernel is configured to use transparent huge pages (THP). This is not supported when running VoltDB. Use the following commands to disable this feature for the current session:
ERROR:
ERROR: sudo bash -c "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
ERROR: sudo bash -c "echo never > /sys/kernel/mm/transparent_hugepage/defrag"
ERROR:
ERROR: To disable THP on reboot, add the preceding commands to the /etc/rc.local file.
解決辦法:
解決辦法1:執行如下兩句命令
sudo bash -c "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
sudo bash -c "echo never > /sys/kernel/mm/transparent_hugepage/defrag"
但是重啓系統後失效
解決辦法2:修改/etc/rc.local配置文件,重啓後依然生效(ubuntu下作如下修改)
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
touch /var/lock/subsys/local
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
exit 0
問題產生原因:
voltDB是內存數據庫,適當的內存管理對有效的運行VoltDB至關重要,而使用透明大爺是voltDB提升性能的一種方式。
可參考:https://forum.voltdb.com/showthread.php?1529-Transparent-huge-pages-(THP)-not-supported