Many processes spawned for a simple ray code
See original GitHub issueFor this small piece of code,
import ray
ray.init(num_cpus=1)
print('Enter something')
t = input()
Totally 7 processes are spawned. Why is this happening ? Is this intentional ?

And when I don’t set the num_cpus
value, since it automatically sets to the number of cores, the processes spawned goes up from 7 to 14

I am using ray version 0.8.7 in MacOS with Python 3.7.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Distributed multiprocessing.Pool — Ray 2.2.0
Ray supports running distributed python programs with the multiprocessing.Pool API using Ray Actors instead of local processes. This makes it easy to scale ......
Read more >Spawning and Destroying an Actor | Unreal Engine 4.27 ...
In this How-To guide, you will create your own Actor to spawn, and aActor Spawner which will spawn your Actor at the click...
Read more >Writing Distributed Applications with PyTorch
For the purpose of this tutorial, we will use a single machine and spawn multiple processes using the following template. """run.py:""" #!/usr/bin/env python ......
Read more >Getting Started with Ray | Domino Data Science Blog
Ray is a general framework that enables quick parallelization of Python code. Our tutorial shows you how to access Ray clusters for distributed...
Read more >Parallelization with ray not working as expected - Stack Overflow
there are two main problems when it comes to multiprocessing (your code). there's an overhead associated with spawning the new processes to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Must be the dashboard if it is a head node
Btw I checked on this and also count many processes but this is to be expected.
The python processes that I see
I’m not sure what the 7th one you’re seeing is, but in general these are to be expected. These are all to be expected, and you shouldn’t need to worry about them (but we can point you to some references if you’re curious).
I will close this issue for now, but feel free to reopen it if this is something problematic.