Determine number of workers used

Ray will schedule tasks and start workers based on how many CPUs are requested by each task. If you use the default @ray.remote decorator, this will work out to 20 workers and 20 CPUs being used concurrently since num_cpus defaults to 1.

Generally you should not need to worry about managing the number of workers yourself, but if you need to check it programmatically for debugging purposes, you can pgrep for ray::. Ray workers will have the process title format ray::<currently executing task name or IDLE>.

1 Like