Apache spark 为什么spark.executor.instances不起作用?

Apache spark 为什么spark.executor.instances不起作用?,apache-spark,Apache Spark,我正在使用40个r4.2x大型从机和一个具有相同类型主机的主机。 r4.2xlarge有8个内核,带有61GB内存 给定的设置包括: spark.executor.280实例 spark.executor.cores 1 spark.executor.memory 8G spark.driver.memory 40G spark.Thread.executor.memoryOverhead 10240 spark.DynamicLocation.enabled错误 当观察一个作业在集群的神经

我正在使用40个r4.2x大型从机和一个具有相同类型主机的主机。 r4.2xlarge有8个内核,带有61GB内存

给定的设置包括:

  • spark.executor.280实例
  • spark.executor.cores 1
  • spark.executor.memory 8G
  • spark.driver.memory 40G
  • spark.Thread.executor.memoryOverhead 10240
  • spark.DynamicLocation.enabled错误
当观察一个作业在集群的神经节中运行时,总体cpu使用率仅为30%左右。它的资源管理器“按执行器聚合的度量”表只显示每个从节点的两个执行器

为什么这个集群即使有280个spark.executor.instances,每个从属节点也只运行两个executor

----更新----

我在/etc/hadoop/conf.empty下找到了warn-site.xml

  • warn.scheduler.maximum-allocation-mb 54272
  • warn.scheduler.maximum-allocation-vcores 128
  • 纱线.nodemanager.resource.cpu-vcores 8
  • warn.nodemanager.resource.memory-mb 54272

如果您在纱线上运行作业,则执行器的数量不仅由该参数分配,还取决于纱线中的某些配置参数。可能的参数包括:

yarn.scheduler.maximum-allocation-mb
yarn.scheduler.maximum-allocation-vcores
yarn.nodemanager.resource.cpu-vcores
yarn.nodemanager.resource.memory-mb

请检查warn site.xml中的参数

由于warn.scheduler.maximum-allocation-vcores 128,它似乎无法为每个节点分配最多7个执行器。但我仍然认为它可以分配3个执行器/节点,即40*3=120<128。知道吗?你必须增加记忆值。你能试着用更高的值吗?我想知道这种情况是怎么发生的。根据配置,我认为一个从节点最多可以使用54G内存。奇怪的是,执行人,记忆头是10G。但executor.memory是8G。所以,根据执行人18G。因此,三个执行器实际上需要的不仅仅是warn.nodemanager.resource.memory-mb 54272。这就是为什么只有两名遗嘱执行人在场。这是对的吗?是的,你是对的。而且开销值看起来太大了。可以减小此值。