spark出现GC overhead limit exceeded和java heap space
来源:互联网 发布:gfriend整容知乎 编辑:程序博客网 时间:2024/06/07 04:05
spark执行任务时出现java.lang.OutOfMemoryError: GC overhead limit exceeded和java.lang.OutOfMemoryError: java heap space
最直接的解决方式就是在spark-env.sh中将下面两个参数调节的尽量大
export SPARK_EXECUTOR_MEMORY=6000M
export SPARK_DRIVER_MEMORY=7000M
注意,此两个参数设置需要注意大小顺序:
SPARK_EXECUTOR_MEMORY < SPARK_DRIVER_MEMORY< yarn集群中每个nodemanager内存大小
总结一下Spark中各个角色的JVM参数设置:
(1)Driver的JVM参数:
-Xmx,-Xms,如果是yarn- client模式,则默认读取spark-env文件中的SPARK_DRIVER_MEMORY值,-Xmx,-Xms值一样大小;如果是yarn- cluster模式,则读取的是spark-default.conf文件中的spark.driver.extraJavaOptions对应的JVM 参数值。
PermSize,如果是yarn-client模式,则 是默认读取spark-class文件中的JAVA_OPTS="-XX:MaxPermSize=256m $OUR_JAVA_OPTS"值;如果是yarn-cluster模式,读取的是spark-default.conf文件中的 spark.driver.extraJavaOptions对应的JVM参数值。
GC 方式,如果是yarn-client模式,默认读取的是spark-class文件中的JAVA_OPTS;如果是yarn-cluster模式,则读取 的是spark-default.conf文件中的spark.driver.extraJavaOptions对应的参数值。
以上值最后均可被spark-submit工具中的--driver-java-options参数覆盖。
(2)Executor的JVM参数:
-Xmx,-Xms,如果是 yarn-client模式,则默认读取spark-env文件中的SPARK_EXECUTOR_MEMORY值,-Xmx,-Xms值一样大小;如果 是yarn-cluster模式,则读取的是spark-default.conf文件中的 spark.executor.extraJavaOptions对应的JVM参数值。
PermSize,两种模式都是读取的是spark-default.conf文件中的spark.executor.extraJavaOptions对应的JVM参数值。
GC方式,两种模式都是读取的是spark-default.conf文件中的spark.executor.extraJavaOptions对应的JVM参数值。
(3)Executor数目及所占CPU个数
如果是yarn-client模式,Executor数目由spark-env中的SPARK_EXECUTOR_INSTANCES指定,每个实例的数目由SPARK_EXECUTOR_CORES指定;如果是yarn-cluster模式,Executor的数目由spark-submit工具的--num-executors参数指定,默认是2个实例,而每个Executor使用的CPU数目由--executor-cores指定,默认为1核。
参考文件:http://www.cnblogs.com/Scott007/p/3889959.html
- spark出现GC overhead limit exceeded和java heap space
- spark出现GC overhead limit exceeded和java heap space
- Spark java.lang.outofmemoryerror gc overhead limit exceeded 与 spark OOM:java heap space 解决方法
- Spark OOM:java heap space,OOM:GC overhead limit exceeded解决方法
- OutOfMemoryError: Java heap space和GC overhead limit exceeded在Ant的Build.xml中的通用解决方案
- unable to execute dex:GC overhead limit exceeded java heap space
- unable to execute dex:GC overhead limit exceeded unable to execute dex:java heap space 解决方案
- GC overhead limit exceeded : Spark
- 编译或打包程序时eclipse报Unable to execute dex: GC overhead limit exceeded或java heap space
- 编译或打包程序时eclipse报Unable to execute dex: GC overhead limit exceeded或java heap space .
- spark-OutOfMemory:GC overhead limit exceeded 解决
- spark OutOfMemoryError (GC overhead limit exceeded)
- 出现GC overhead limit exceeded 的解决方案
- mvn出现GC overhead limit exceeded
- 出现GC overhead limit exceeded 的解决方案
- 出现GC overhead limit exceeded 的解决方案
- 出现GC overhead limit exceeded 的解决方案
- GC overhead limit exceeded
- CCS5.1/5.5/6下载地址
- 黑马程序员--java基础--网络编程
- [Codeforces Round#312 Div.2] A Simple Task 【线段树+lazy_tag】
- 辛星整理postgresql中常见的一些非sql操作
- 黑马程序员--java概述
- spark出现GC overhead limit exceeded和java heap space
- 3男子在襄阳机场持刀砍人 伤5人后驾车潜逃
- linux下IPTABLES配置详解
- [LeetCode]Same Tree
- 【剑指Offer面试题】 九度OJ1504:把数组排成最小的数
- 奇偶排序
- Javascript定义类(class)的三种方法
- JAVA 反射
- 弧形刻度进度条