Skip to content

Actor classes are pickled and exported every time an actor is created. #501

Closed

Description

@robertnishihara

Consider the following.

@ray.actor
class Foo(object):
  pass

actors = [Foo() for _ in range(1000)]  

Every time a Foo object is created, the Foo class will be pickled and exported to all of the workers. Since every newly created actor also processes every export, this is an N^2 algorithm.

This is likely responsible for some Redis congestion that we've been seeing.

@pcmoritz is currently working on this.

Activity

  1. added
    bug
    on May 2, 2017
  2. robertnishihara commented on May 2, 2017

    @robertnishihara
    CollaboratorAuthor

    I'm marking this as a bug because in some cases the congestion is so bad that it causes enough local scheduler heartbeats to be missed that the global scheduler marks the local schedulers as dead.

    Note that the problem could still occur even after this problem is fixed if we have a ton of exports and then create a ton of actors in quick succession.

  3. pcmoritz commented on May 2, 2017

    @pcmoritz
    Contributor

    On thing we should do here for sure is having a more reliable heartbeat system. Maybe a separate redis server, maybe even a system like etcd. Also we should investigate if there is ever the possibility that heartbeats are missed because the event loop of the component that gives the heartbeat is overloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions