红联Linux门户
Linux帮助

voltdb开启时遇到Transparent huge pages (THP) not supported

发布时间:2016-08-06 11:31:34来源:linux网站作者:jiwLiu
问题描述:
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提升性能的一种方式。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/23070.html