# Finding max number of workers for training config

**URL:** <https://discuss.ray.io/t/finding-max-number-of-workers-for-training-config/3591>\
**Category:** RLlib\
**Created:** [September 22, 2021, 10:47am UTC](https://discuss.ray.io/t/finding-max-number-of-workers-for-training-config/3591 "2021-09-22T10:47:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh\_Arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/saurabh_arora/32/1012_2.png) [@Saurabh\_Arora](https://discuss.ray.io/u/Saurabh_Arora)\
**Post date:** [September 22, 2021, 10:47am UTC](https://discuss.ray.io/t/finding-max-number-of-workers-for-training-config/3591/1 "2021-09-22T10:47:27Z")

</div>

Hi  
I have a machine with following cpu information and I want to use its maximum parallelization capacity.

(base) bash-4.2$ lscpu  
Architecture: x86\_64  
CPU op-mode(s): 32-bit, 64-bit  
Byte Order: Little Endian  
CPU(s): 104  
On-line CPU(s) list: 0-103  
Thread(s) per core: 2  
Core(s) per socket: 26  
Socket(s): 2

config = ppo.DEFAULT\_CONFIG.copy()  
config[‘num\_workers’] = …

I have 52 cores and 104 threads and 104 CPUs. How many maximum num\_workers can I assign: 52 or 104?

---

<div class="post-metadata">

**Author:** ![rusu24edward](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rusu24edward/32/333_2.png) [@rusu24edward](https://discuss.ray.io/u/rusu24edward)\
**Post date:** [September 23, 2021, 3:50pm UTC](https://discuss.ray.io/t/finding-max-number-of-workers-for-training-config/3591/2 "2021-09-23T15:50:13Z")

</div>

You should be able to assign 103 workers. One thread has to be used by the trainer, the others can be made workers. There’s also a parameter for the number of environments per worker that you should take a look at.

If you set your output verbosity high, you should be able to actually see how many resources are available to use. Something like: `CPU: 10/104, GPU: 0/0, ...`. This may only be a `tune` output though.

For more information, check out the [scaling guide](https://docs.ray.io/en/latest/rllib-training.html#scaling-guide)
