Why is there a lot of Ray:: IDLE in my ray process

As shown in the above figure, why are there many Ray:: IDLE in my ray process?

Is there any elegant way to terminate these IDLE without affecting the existing ray serve.


It is expected to start IDLE workers to reduce worker startup time. They will be used as soon as you create serve replicas. Ray creates idle workers as many as number of cpus on the node by default when you start a new script.

If you really want to disable having IDLE workers, you can set env var RAY_prestart_worker_first_driver=0 when you create a cluster. E.g.,

prestart_worker_first_driver=0 ray start --head

This is a good question. Maybe we could document it in an Q&A session of the ray OSS website.

@XIE yeah for sure. I think we need to update the behavior of workers in the core documentation. We’ve been talking about this for a while, but it hasn’t happened yet