You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report capacity and allocation per resource for each worker #1864
area/observabilitykind/designDesign discussion, investigation, or research required before implementationkind/featureAn enhancement / feature request or implementation
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
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.
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.
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.
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.
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
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.
area/observabilitykind/designDesign discussion, investigation, or research required before implementationkind/featureAn enhancement / feature request or implementation
Activity
BenTheElder commentedon Sep 25, 2026
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.
krisztianfekete commentedon Sep 25, 2026
The format I proposed in #1664 already covers this (allocated/capacity per resource, like
k8s.node.allocatable.*). Two more things:unschedulableworkers ((ateapi): report worker occupancy by actor slots in ate.worker.state #1854) out ofcapacity, otherwise a draining or not-yet-reported worker shows up as free.assigned.[-]Count actor slots by state in a new instrument[/-][+]Report capacity and allocation per resource for each pool[/+]JeffLuoo commentedon Sep 25, 2026
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.
krisztianfekete commentedon Sep 25, 2026
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 asate.workerpool.workers.unschedulableworkers count in allocated but not capacity, and a resource a worker doesn't report gets no series instead of 0.krisztianfekete commentedon Sep 25, 2026
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 newate.worker.namelabel on top of the pool labels. The rest of my comment above stays the same.[-]Report capacity and allocation per resource for each pool[/-][+]Report capacity and allocation per resource for each worker[/+]JeffLuoo commentedon Sep 25, 2026
Updated
JeffLuoo commentedon Oct 8, 2026
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.
JeffLuoo commentedon Oct 13, 2026
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 : )
krisztianfekete commentedon Oct 13, 2026
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:
JeffLuoo commentedon Oct 13, 2026
This is mostly for auto scaling IIUC. It is not part of M3. I updated the issue.