scheduler doesn't count suspended actors that are still bound to a node

Open
#3,528 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@BenTheElder is already working on this.

Since Oct 31, 2026.

Assessment

This issue has not been assessed yet.

Description

area/scheduling kind/bug

A suspended actor stays bound to the node that holds its local snapshot, and its next resume is required to land there.

But when placing a new actor, the scheduler only compares what workers have allocated right now, which is just the actors currently assigned ...

So for workloads that spend most of their time suspended, e.g. agents waiting on an LLM between steps, every worker looks empty, placement is effectively random, and then it sticks for the life of the actor.

We hit this in the burn-in for #3485: agentsession at 6 users on 4 workers, 6 actors living the whole 45m run. One worker got no actors in 4 of 7 runs, and another got 3. Placing 6 actors on 4 workers at random leaves one empty ~62% of the time, so this is basically random. The node with 3 actors is the one that fell behind on disk.

With the actors kept running instead, 8 actors resumed 1s apart spread 3/2/2/1, so placement works when the actors are running.

We should count actors bound to a node while suspended when picking the less loaded worker, without counting them against capacity, so they don't block placement. Letting a resume move off a busy node once the snapshot is durable is another option, but it gives up the local resume.

I searched for related issues but none are quite this: #589 (the same pin, from the capacity side), #3482 (a resume only moves when the pinned node is full, which a worker without limits never is, see #3479)

Dominant language
Go
Stars
5.9k
Forks
637
Avg merge
2d 1h
Merged PRs (30d)
523

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agent-substrate/substrate

All issues in agent-substrate/substrate

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.