Skip to content

Build scheduler allocates too many slaves to builds with few atoms #273

@josephharrington

Description

@josephharrington

If a build has a single atom, it is very likely to get more than one slave assigned.

There is this method in BuildScheduler:

def needs_more_slaves(self):
        """Determine whether or not this build should have more slaves allocated to it."""
        return self._num_executors_allocated < self._max_executors and not self._build._unstarted_subjobs.empty()

This will correctly stop allocating slaves once all subjobs have been started. But because build setup takes at least a few seconds, it's very likely that many slaves will be allocated before any subjobs start. So builds with very few atoms are likely to have more slaves allocated than necessary.

This is not a huge problem, but is inefficient and could be a huge problem for builds with a long setup time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions