Skip to content

Update the system metrics when a worker holds more than one actor #1664

Closed
7 of 7 issues completed
Closed

Description

@JeffLuoo

Parent issue for the effect of multi-actor worker support (#1266) on the system metrics of Substrate.

State

#1266 phase 1 landed. A worker now reports an actor capacity and an allocated total, and the scheduler reads both. The scheduler is capacity-aware. The metrics are not. The registry still describes a fleet of one actor for each worker.

The problem

ateapi derives the state of a worker from "does this worker hold any actor". With a capacity of 20 actors, a worker with 1 actor and a worker with 20 actors give the same answer. Thus:

  • ate.workerpool.workers no longer measures the saturation of a pool. It measures only how many workers hold at least one actor.
  • The sum of that metric over the assigned state is the only proxy today for the number of actors in operation. The proxy becomes wrong.
  • ate.scheduler.eligible_workers counts workers and not capacity. Ten workers with one free slot and one worker with ten free slots give a different count and the same schedulable capacity.

Sub-issues

Sub-issues

7 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. added
    kind/feature
    on Sep 16, 2026
  2. added this to the M3 milestone on Sep 22, 2026
  3. JeffLuoo commented on Sep 22, 2026

    @JeffLuoo
    CollaboratorAuthor

    Krisztian F (@krisztianfekete) I created several sub-issue for the multi-worker support. #1266 Please review, and feel free to add more sub-issue.

  4. krisztianfekete commented on Sep 24, 2026

    @krisztianfekete
    Collaborator

    This parent changes the existing instruments only. It adds no instrument.

    I think this leaves the main gap open. Pool utilization needs slot counts, not worker counts (similar to db.client.connection.count{state} + db.client.connection.max in semconv). #433 doesn't cover slots, so can we track this in a new child issue?

    Also, the scheduler picks a random worker among the free ones. With more than one slot per worker, partial looks like 100% busy at low load, and at_capacity stays ~0 and then jumps. Neither really works as a good HPA signal, so I'd say the demo should move to slot counts once we have them.

  5. JeffLuoo commented on Sep 24, 2026

    @JeffLuoo
    CollaboratorAuthor

    Created #1864

  6. BenTheElder commented on Sep 25, 2026

    @BenTheElder
    Collaborator
  7. krisztianfekete commented on Sep 25, 2026

    @krisztianfekete
    Collaborator

    #1854 fixed the worker state, but worker counts still can't tell us how full a pool is.

    This parent changes the existing instruments only. It adds no instrument.

    Based on the autoscaling discussion, I think we need new instruments here. Thinking about allocated and capacity per pool, one pair each for actors, CPU and memory (similarly to k8s.node.allocatable.* in semconv, one instrument per resource since the units differ). ateapi already has these in the worker cache, so should be cheap enough.

    These track what the scheduler reserves, which is what decides no_capacity, so I'd say this suffice as HPA input. With one HPA metric per resource, the HPA scales on whichever runs out first, so we don't need to assume actors are all the same size. Once these land, we can move the demo HPA to them and revisit partial/at_capacity as per #1801.

  8. JeffLuoo commented on Sep 25, 2026

    @JeffLuoo
    CollaboratorAuthor

    Open to add new instrumentation, I originally create the parent issue with a small scope just to update existing system metrics for new multi-actor support. I will update the ticket.

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

Metadata

Metadata

Labels

area/observabilitykind/feature

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions