Skip to content

Support multiple workers per process #2215

@raulchen

Description

@raulchen

Currently, Ray only supports one worker per process. This is okay with Python workers, because:

  1. Workers don't share much resources with each other;
  2. Multi-threading is inefficient in Python (CPython, to be more specific), because of GIL.

However, as Java worker has been introduced, this becomes an issue.
Because in a Java process, JVM itself costs significant amount of memory overhead. Using multi-processes means duplicating the overhead.

For the short term, I'll work on supporting one worker per thread.
For the long term, we can even use coroutines to make each worker very light-weight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions