Spark内存开销相关问题在SO中多次被问到,我经历了其中的大部分。然而,在浏览了多个博客后,我感到困惑。
以下是我的疑问
https://docs.qubole.com/en/latest/user-guide/engines/spark/defaults-executors.html https://spoddutur.github.io/spark-notes/distribution_of_executors_cores_and_memory_for_spark_application.html
下面是我想了解的案例。我有5个节点,每个节点16个vcore和128GB内存(其中120个可用),现在我想提交spark应用程序,下面是conf,我在想
Total Cores 16 * 5 = 80
Total Memory 120 * 5 = 600GB
Run Code Online (Sandbox Code Playgroud)
情况1:执行器内存的内存开销部分
spark.executor.memory=32G
spark.executor.cores=5
spark.executor.instances=14 (1 for AM)
spark.executor.memoryOverhead=8G ( giving more than 18.75% which is default)
spark.driver.memoryOverhead=8G
spark.driver.cores=5
Run Code Online (Sandbox Code Playgroud)
情况 2:内存开销不是执行程序内存的一部分
spark.executor.memory=28G
spark.executor.cores=5
spark.executor.instances=14 (1 for AM)
spark.executor.memoryOverhead=6G ( giving more than 18.75% which is default)
spark.driver.memoryOverhead=6G
spark.driver.cores=5
Run Code Online (Sandbox Code Playgroud)
根据下面的视频,我尝试使用 85% 的节点,即 120GB 中的 100GB 左右,不确定我们是否可以使用更多。
https://www.youtube.com/watch?v=ph_2xwVjCGs&list=PLdqfPU6gm4b9bJEb7crUwdkpprPLseCOB&index=8&t=1281s (4:12)
我读什么-是最内存消耗-的对象-在Java的的和什么-是最内存开销的-的对象-在Java的.
但我仍然感到困惑.
padding吗?JVM压缩指针?是reference吗?32-bit JVM使用,那么开销会减少?当然是.但是因为填充?32-bit JVM使用内存效率或性能更好吗?下图来自此链接(第26页)
在这个图像开始时它们显示为16字节的JVM开销,为什么呢?
java jvm memory-management java-memory-model memory-overhead
我在 IntelliJ Idea Ultimate Edition 2020.2.2 上运行 Grails 2.5.0。它编译和构建代码很好,但它不断抛出“java.lang.OutOfMemoryError:GC开销限制超出”错误(整个错误被复制并粘贴到最后)。以下是我在研究此错误的基础上尝试过的事情:
1.) 增加构建过程堆大小(在 2G、4G 和 6G 下尝试) https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003315120-GC-overhead-limit-exceeded
2.) 增加内存堆大小(尝试了 2G、4G 和 6G) https://www.jetbrains.com/help/idea/increasing-memory-heap.html
3.) 增加启动配置中JVM的最大内存设置(试过2G、4G、6G)
我看到此错误的修复方法之一是“尽可能重用现有对象以节省一些内存”。但是,我坚信这不是代码的问题,而是我的 IDE 上的设置问题。我使用的代码在生产网站上运行良好,没有错误,这个 OutOfMemoryError 只出现在我的本地机器上。任何人都可以提供任何帮助,我将不胜感激,谢谢!!!
2020-09-21 09:19:56.661 ERROR --- [nio-8805-exec-3] o.s.l.agent.SpringLoadedPreProcessor : Unexpected problem transforming call sites
org.springsource.loaded.ReloadException: Unexpected problem locating the bytecode for ch/qos/logback/classic/spi/IThrowableProxy.class
at org.springsource.loaded.TypeRegistry.couldBeReloadable(TypeRegistry.java:775)
at org.springsource.loaded.TypeRegistry.isReloadableTypeName(TypeRegistry.java:942)
at org.springsource.loaded.TypeRegistry.isReloadableTypeName(TypeRegistry.java:780)
at org.springsource.loaded.MethodInvokerRewriter$RewriteClassAdaptor$RewritingMethodAdapter.visitMethodInsn(MethodInvokerRewriter.java:1133)
at sl.org.objectweb.asm.ClassReader.a(Unknown Source)
at sl.org.objectweb.asm.ClassReader.b(Unknown Source)
at sl.org.objectweb.asm.ClassReader.accept(Unknown Source)
at sl.org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:348)
at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:99)
at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:1002)
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:361)
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:107)
at …Run Code Online (Sandbox Code Playgroud)