Skip to content

Report capacity and allocation per resource for each worker #1864

Description

@JeffLuoo

As discussed in this issue comment #1664 (comment)

Problem

ate.workerpool.workers counts workers. A worker can now hold more than one actor, so a count of workers cannot show how full a pool is. A worker with 1 of 20 slots used and a worker with 19 of 20 are both partial (#1799).

The scheduler picks a random worker from the workers that have room. With more than one slot on each worker, the actors spread across the pool. At low load, most workers are partial, and at_capacity stays near 0. Under more load, at_capacity jumps suddenly. Neither state gives a good signal for an autoscaler.

No instrument reports the number of actors in operation. The count of assigned workers was a substitute for it, and that substitute is gone (#1664).

For discussion of HPA, follow this discussion in slack

Activity

  1. added this to the M3 milestone on Sep 24, 2026
  2. added
    kind/feature
    on Sep 24, 2026
  3. added
    kind/design
    on Sep 24, 2026
  4. BenTheElder commented on Sep 25, 2026

    @BenTheElder
    Collaborator

    Slots isn't a very accurate way to put it I think. Think of workers more like Kubernetes nodes now. They have capacity both allocated and allocatable, while also have a limit on the maximum number of workloads to account for other resources not account for by the scheduler such as PIDs, FDs, etc.

    The cap on number of actors is an upper bound, not a target. CPU / Memory / ... are more realistic.

    See also the discussion about autoscaling in slack.

  5. krisztianfekete commented on Sep 25, 2026

    @krisztianfekete
    Collaborator

    The format I proposed in #1664 already covers this (allocated/capacity per resource, like k8s.node.allocatable.*). Two more things:

  6. changed the title [-]Count actor slots by state in a new instrument[/-] [+]Report capacity and allocation per resource for each pool[/+] on Sep 25, 2026
  7. JeffLuoo commented on Sep 25, 2026

    @JeffLuoo
    CollaboratorAuthor

    Krisztian F (@krisztianfekete) are you proposing to add instrumentation for cpu, memory, and actor count grouped by "Allocated" and "Capacity" for each pool in this issue? Just want to make sure I understand it correctly.

  8. krisztianfekete commented on Sep 25, 2026

    @krisztianfekete
    Collaborator

    Yes, but as separate instruments, e.g. ate.workerpool.cpu.capacity, ate.workerpool.cpu.allocated, etc., same for memory and actors. Allocated can exceed capacity, so they shouldn't be two values of one attribute. Same labels as ate.workerpool.workers. unschedulable workers count in allocated but not capacity, and a resource a worker doesn't report gets no series instead of 0.

  9. krisztianfekete commented on Sep 25, 2026

    @krisztianfekete
    Collaborator

    Update after the Slack discussion here: https://cloud-native.slack.com/archives/C0B6M3E2J3D/p1790200752576789

    Per worker, not per pool, like node metrics in k8s. Pool totals hide fragmentation (10 workers with 0.5 CPU free each can't fit a 1 CPU actor), and a pool total is just a sum over workers anyway.

    So ate.worker.cpu.capacity / ate.worker.cpu.allocated, same for memory and actors, with a new ate.worker.name label on top of the pool labels. The rest of my comment above stays the same.

  10. changed the title [-]Report capacity and allocation per resource for each pool[/-] [+]Report capacity and allocation per resource for each worker[/+] on Sep 25, 2026
  11. JeffLuoo commented on Sep 25, 2026

    @JeffLuoo
    CollaboratorAuthor

    Updated

  12. JeffLuoo commented on Oct 8, 2026

    @JeffLuoo
    CollaboratorAuthor

    I think this ticket can be tracked as a standalone issue for the current parent issue to improve existing system metrics for multi-actor support, as this ticket is adding new metric.

  13. JeffLuoo commented on Oct 13, 2026

    @JeffLuoo
    CollaboratorAuthor

    Krisztian F (@krisztianfekete) just check in to see if this is still under your radar to implement it. I am happy to help work on it : )

  14. krisztianfekete commented on Oct 13, 2026

    @krisztianfekete
    Collaborator

    It is, but unfortunately I likely won't be able to get to it in time before M3, so feel free to take it.
    The main things from my side:

    • One series per worker, with pod and node names so it can be matched to real usage and metrics.
    • No capacity series for a worker that hasn't reported yet or is draining, so it never looks like free room.
    • Allocated means the sum of limits, not usage. We should document this.
    • Keep the existing worker states as they are for now.
  15. removed this from the M3 milestone on Oct 13, 2026
  16. JeffLuoo commented on Oct 13, 2026

    @JeffLuoo
    CollaboratorAuthor

    This is mostly for auto scaling IIUC. It is not part of M3. I updated the issue.

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

Metadata

Metadata

Labels

area/observabilitykind/designkind/feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions