Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to calculate the yarn.nodemanager.resource.cpu-vcores in ambari cluster

avatar

as I read from the doc ,yarn.nodemanager.resource.cpu-vcores are by default ~80% of total vCPUs available on the machine

so just to clear that

in case we have ambari cluster with 3 master machine and 3 workers )( machines , and each worker have 8 core

then the calculate will be 3X8=32 ?

or maybe yarn.nodemanager.resource.cpu-vcores should be calculate per worker machine as: 1X8=8 ?


or else?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Super Guru

@Michael Bronson,

It will be 80% of your vCPUs on the machine. If you have 3 machines with 16 cores , then it will be 80% of 16 ie 12.8. It will take the floor value of 12.8 and set it as 12.

You can get the cpus by running the command

cat /proc/cpuinfo | grep processor | wc -l

If there are multiple node managers with different vCPU count , it will take the max of all the vCPUs

Thanks,

Aditya

View solution in original post

1 REPLY 1

avatar
Super Guru

@Michael Bronson,

It will be 80% of your vCPUs on the machine. If you have 3 machines with 16 cores , then it will be 80% of 16 ie 12.8. It will take the floor value of 12.8 and set it as 12.

You can get the cpus by running the command

cat /proc/cpuinfo | grep processor | wc -l

If there are multiple node managers with different vCPU count , it will take the max of all the vCPUs

Thanks,

Aditya