Azure / Azure/Batch

Setting a slot size for Jobs causes them to be run out of order

Open
#135 2 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
No language data
Stars
27
Forks
29
PR merge metrics
No merged PRs in 30d

Description

#### Problem Description

I'm assuming the ordering of tasks is not officially guaranteed, so this is more of a general annoyance rather than a bug. We've been using Azure Batch for a few years now, and in the majority of cases it executes tasks in the order that they were created. Recently we've started setting the number of required slots on some of our jobs, and this has had some strange behaviour.

#### Steps to Reproduce

We have a Pool configured to have 10 slots per VM. Some of our tasks don't have the value specified (so take the 1 slot) and some have a value of 4

#### Expected Results

Tasks are run in order as long as there is space available. We understand that if there is a slot available a 1-slot task will take it, even if a 4-slot one has been waiting longer. Our system is built around this understanding (1-slot tasks are generally higher priority).

#### Actual Results

Given a large number of 4-slot tasks and no 1-slot tasks, the order that they get executed in is seemingly random. From an outsiders perspective it's like there is something iterating the list of tasks available and wherever its got to in the list when 4 slots become available is the task that will get executed.

#### Additional Logs
```
Not sure where I can get logs from, but happy to provide them if someone lets me know
```

#### Additonal Comments

```
5 tasks added requiring 4 slots
Task 1 - needs 4 slots - are 4 slots available? Yes - Run Task
Task 2 - needs 4 slots - are 4 slots available? Yes - Run Task
Task 3 - needs 4 slots - are 4 slots available? No
Task 4 - needs 4 slots - are 4 slots available? No
Task 1 - finished processing
Task 5 - needs 4 slots - are 4 slots available? Yes - Run Task
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.