Skip to content

Global Controller spawning agents taking too much time #10

Description

@Saaketh0

Global Controller spawning agents is currently sequential, and can be optimized with parallelism.

This happens in the ensure_instances function in ventis/controller/instance_manager.py, on line 33, "for agent_spec in self._agent_specs:"

Since the instance generations are independent of each other, a fix would be to add threading this function, which would speed up the "ventis deploy" command by a factor of the threads able to run on this function.

Main concerns:

  • With threads being created simultaneously, host-port assignments will need to be put under a lock to prevent instances from taking the same host-port.
  • Too many threads could cause the global controller instance to crash, limit the threads to machine resources.
  • Need to make sure failed instances get re-instantiated rather than disappearing.

Link to the function:

def ensure_instances(self, agent_specs):

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions