给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
上一篇:Android adjustresize全屏无效问题


下一篇:log4j2打印Mybatis执行的SQL语句及SQL语句的执行时间