Autoscale formula metrics for number of task slots
- Dominant language
- No language data
- Stars
- 27
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
#### Feature Request Description
My Azure Batch-based application uses a constraint-based scheduling convention wherein task slots represent vCPUs. If I have a pool using a 4-vCPU VM size then I set "Task slots per node" to 4, and when I submit a task that needs access to 2 vCPUs I set the task's "Required slots" to 2.
I have been unable to get this scheme to work reliably with autoscaling, because the autoscale formula language is unaware of tasks' task slot requirements. Information on task slots per node is available in the `$TaskSlotsPerNode` variable, but there does not appear to be any information on the slot requirements of existing tasks. This means that any autoscaling formula implicitly bakes in the assumption that every task requires exactly one slot.
#### Describe Preferred Solution
I think the ideal solution is to introduce a task-slot-wise version of each task metric variable. This might look like:
| _Existing task-wise metric_ | _New task-slot-wise metric_ |
|---|---|
| `$ActiveTasks` | `$ActiveTaskSlots` |
| `$RunningTasks` | `$RunningTaskSlots` |
| `$PendingTasks` | `$PendingTaskSlots` |
| `$SucceededTasks` | `$SucceededTaskSlots` |
| `$FailedTasks` | `$FailedTaskSlots` |
#### Describe Alternatives Considered
The current task-wise metric variables could be changed to reflect task slots instead of whole tasks. This would be a breaking change.
#### Additional Context
The proposed addition of task-slot-wise metrics would be analogous to the [addition](https://docs.microsoft.com/en-us/rest/api/batchservice/batch-service-rest-api-versioning#version-2020-09-01120) of the [`TaskSlotCounts`](https://docs.microsoft.com/en-us/rest/api/batchservice/job/get-task-counts#taskslotcounts) object to the response of the [`Job_GetTaskSlots`](https://docs.microsoft.com/en-us/rest/api/batchservice/job/get-task-counts) operation made in API version 2020-09-01.12.0.
Contributor guide
Assessment
This issue has not been assessed yet.