其他分享
首页 > 其他分享> > 给hive的metastore做JVM优化

给hive的metastore做JVM优化

作者:互联网

 

最近在测试环境下,hive的metastore不稳定,于是做一次JVM优化

在hive-env.sh中

export HADOOP_HOME=/opt/cdh/hadoop-2.6.0-cdh5.14.0

 

if [ "$SERVICE" = "cli" ]; then
if [ -z "$DEBUG" ]; then
export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xmx2048m -Xms2048m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit -verbose:gc -Xloggc:/opt/cdh/hive-1.1.0-cdh5.14.0/hivemeta.gc.log -XX:ErrorFile=/opt/cdh/hive-1.1.0-cdh5.14.0/hs_err_pid.log -XX:+UseParNewGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=85 -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:SurvivorRatio=4 -XX:CMSMaxAbortablePrecleanTime=1000 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC" -XX:-UseGCOverheadLimit"
else
export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xmx2048m -Xms2048m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit -verbose:gc -Xloggc:/opt/cdh/hive-1.1.0-cdh5.14.0/hivemeta.gc.log -XX:ErrorFile=/opt/cdh/hive-1.1.0-cdh5.14.0/hs_err_pid.log -XX:+UseParNewGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=85 -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:SurvivorRatio=4 -XX:CMSMaxAbortablePrecleanTime=1000 -XX:+CMSClassUnloadingEnabled -XX:+DisableExplicitGC" -XX:-UseGCOverheadLimit"
fi
fi

export HADOOP_HEAPSIZE=4096

 

标签:opt,cdh,HADOOP,hive,XX,metastore,JVM,cdh5.14
来源: https://www.cnblogs.com/niutao/p/10791825.html