Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MatthewSteeples opened this issue Sep 10, 2022 · 2 comments
Open
Labels
feature request Feature request

Comments

@MatthewSteeples
Copy link

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
@staer
Copy link
Contributor

staer commented Nov 15, 2022

I believe that ask execution does not have any guaranteed order unless you specifically set dependencies, @bwatrous can perhaps confirm.

@xinlaoda
Copy link
Member

This should be a new feature requirement: FIFO scheduling.

@alfpark alfpark added the feature request Feature request label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

4 participants