HiveServer2运行慢,不定时宕机,问题排查
1. 问题描述
大数据组件 HiveServer2性能问题,有时运行很慢,几天宕机一次,需要不定时重启。
2. 原因分析(分析方法)
分析思路: 运行慢时,jstat 查看 gc回收情况

root@tbds-1:~>ps -ef|grep HiveServer2
hive 137791 1 99 Jan22 ? 7-10:47:32 /usr/jdk64/jdk1.8.0_111/bin/java -Xmx16384m -Dhdp.version=2.2.0.0-2041 -Djava.net.preferIPv4Stack=true -Dhdp.version=2.2.0.0-2041 -Dhadoop.log.dir=/data/var/log/hadoop/hive -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/data/bigdata/tbds/usr/hdp/2.2.0.0-2041/hadoop -Dhadoop.id.str=hive -Dhadoop.root.logger=INFO,console -Djava.library.path=:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64:/data/bigdata/tbds/usr/hdp/2.2.0.0-2041/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Xmx16384m -Djava.security.auth.login.config=/etc/hive/conf.server/kafka_client_for_ranger_jaas.conf -XX:+UseG1GC -XX:InitiatingHeapOccupancyPercent=70 -XX:+PrintGCDateStamps -XX:GCLogFileSize=512M -verbose:gc -XX:+PrintGCDetails -Xloggc:/data/var/log/hive/hive_gc.log -Dlog4j.configurationFile=/etc/hive/conf/hive-log4j2.xml -Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.util.RunJar /usr/hdp/2.2.0.0-2041/hive/lib/hive-service-2.2.0.jar org.apache.hive.service.server.HiveServer2 --hiveconf hive.aux.jars.path=file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core-2.2.0.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-pig-adapter-2.2.0.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-pig-adapter.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-server-extensions-2.2.0.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-server-extensions.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-streaming-2.2.0.jar,file:///usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-streaming.jar -hiveconf hive.metastore.uris=
root 215376 214471 0 16:43 pts/6 00:00:00 grep --color=auto HiveServer2
root@tbds-10-232-2-37:~
HiveServer2性能优化

本文分析了HiveServer2运行缓慢及不定时宕机的问题,通过jstat工具监测垃圾回收状态,发现内存不足为主要原因,并提出了增大内存配置的解决方案。
最低0.47元/天 解锁文章
2万+






