如何配置纱线使用所有vcores?

问题描述 投票:2回答:2

我们正在运行一个使用yarn作为集群管理器的火花流工作,我为每个节点每个节点专用7个核心...通过yarn-site.xml,如下图所示

enter image description here

当作业正在运行时..仅使用2个vcores和5个vcores是单独的,并且作业很慢,批次排队很多..

我们怎样才能让它使用所有7个核心..这是可用的,这是运行时的使用,以加快你的工作

enter image description here

如果我们是Yarn&Spark的新手,社区的任何专家都会提供帮助,我们将不胜感激

apache-spark spark-streaming yarn hadoop2
2个回答
2
投票

我为这个问题搜索了许多答案。最后,它在更改yarn配置文件后起作用:capacity-scheduler.xml

<property>
 <name>yarn.scheduler.capacity.resource-calculator</name>
 <value>org.apache.hadoop.yarn.util.resource.DominantResourceCalculator</value>
</property>

别忘了重新启动你的纱线


1
投票

在火花级别,您可以使用参数spark.yarn.am.cores控制纱线应用主机的核心。 对于spark执行者,你需要将--executor-cores传递给spark-submit。 然而,从火花,你无法控制纱线选择分配给它产生的正确的容器(vcores / memory),因为你正在运行火花。 为了控制你需要改变纱线vcore参数,如yarn.nodemanager.resource.cpu-vcoresyarn.scheduler.minimum-allocation-vcores。更多你可以在这里找到https://www.cloudera.com/documentation/enterprise/5-3-x/topics/cdh_ig_yarn_tuning.html#configuring_in_cm

© www.soinside.com 2019 - 2024. All rights reserved.