Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Yarn to use all vcores?

We are running a spark streaming job using yarn as cluster manager, i have dedicated 7 cores per node to each node ...via yarn-site.xml as shown in the pic below

enter image description here

when the job is running ..it's only using 2 vcores and 5 vcores are left alone and the job is slow with lot of batches queued up ..

how can we make it use all the 7 vcores ..that's available to it this is usage when running so that it speed's up our job

enter image description here

Would greatly appreciate if any of the experts in the community will help out as we are new to Yarn & Spark

like image 774
user2359997 Avatar asked Oct 17 '25 13:10

user2359997


1 Answers

I searched many answers for this question. Finally, it worked after changing a yarn config file: capacity-scheduler.xml

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

Don't forget to restart your yarn

like image 101
DennisLi Avatar answered Oct 20 '25 16:10

DennisLi