本文主要是介绍hiveserver2运行异常:GC overhead limit exceeded,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
记一次hiveserver2服务运行异常问题。
报错信息:
java.lang.OutOfMemoryError: GC overhead limit exceeded
解决方法:
修改hive配置文件hive-env.sh。将原来注释的替换成如下配置
# Hive Client memory usage can be an issue if a large number of clients
# are running at the same time. The flags below have been useful in
# reducing memory usage:
#
if [ "$SERVICE" = "cli" ]; thenif [ -z "$DEBUG" ]; thenexport HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -Xmx4096m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit"elseexport HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -Xmx4096m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit"fi
fi# The heap size of the jvm stared by hive shell script can be controlled via:
#
export HADOOP_HEAPSIZE=4096
#
# Larger heap size may be required when running queries over large number of files or partitions.
# By default hive shell scripts use a heap size of 256 (MB). Larger heap size would also be
# appropriate for hive server.
解析:
JVM的三大性能调优参数:-Xms –Xmx –Xss
-Xss:每个线程堆栈最小值,可以根据具体可以进行调整。调大调小需要看情况。对每个线程本身的堆栈大小的性能调优参数
-Xms:heap设置的初始值。
-Xmx:heap设置的最大堆的值。
这篇关于hiveserver2运行异常:GC overhead limit exceeded的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!