How Does Job Priority Work?

General discussions and questions.
Post Reply
Anti-Distinctlyminty
Posts: 23
Joined: Sat Jan 08, 2022 4:15 pm

How Does Job Priority Work?

Post by Anti-Distinctlyminty »

I have been trying to figure out how priority works and cannot understand it.
We submit our jobs with a priority, and the docs say that renders with higher priority get tasks first, which makes sense. But the behaviour is very different.

In the following image I have two jobs in different branches. The branch priority is the same, and one has a job priority of 120, and the other 50.
priority.jpg
priority.jpg (160.7 KiB) Viewed 11776 times
The job with priority 120 may get rendered first. It may not. I cannot find any consistency here. But also, if I were to swap the priorities, then eject all tasks from the hosts, the order should be reversed, but it isn't. It just carries on as before.
I tried again with only two jobs rendering. One at priority 200 and the other at priority 1. I then reversed the priorities and ejected all tasks, and again this has no effect on the execution order.
I have come to the conclusion that I do not understand how job priority works. I've tried many experiments and I've never been able to have any control over the order in which tasks are executed.
User avatar
timurhai
Site Admin
Posts: 913
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: How Does Job Priority Work?

Post by timurhai »

Hi! Sorry for a delay. I was away.
At first branches priority is solved. Then user priority is solved. At last jobs of same user in the same branch is solved and it plays just order role. So, job with a higher priority will be solved, and lower priority will just wait. So job priority plays just order role in the user jobs list. But you can change user "solve" from "order" to "priority", and priority will play a real priority role (not just order) but just for user jobs list.
So, if jobs are in different branches, job priority will not play any role.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Anti-Distinctlyminty
Posts: 23
Joined: Sat Jan 08, 2022 4:15 pm

Re: How Does Job Priority Work?

Post by Anti-Distinctlyminty »

Hi Timur,
Thank you for the reply, and no worries about the delay. We currently have branches based on the project name, and it's a nice way to organize things, but it seems I will have to put all work into the same branch for the job priority to have any effect (Solving was set to Job:Priority as you can see in the screenshot).

I would like to request a feature enhancement: If branch priority is equal, can job priority be taken into account?

We often have multiple projects running at the same time, and need a single shot to take priority.
Also, from a user perspective, I found it super confusing that we can have the following jobs (solving by Job:Priority, and all priorities branches and users being equal)

ROOT/
├───Branch_1/
│ ├───Job_1 Priority:1
│ └───Job_2 Priority:1
├───Branch_2/
│ ├───Job_3 Priority:1
│ └───Job_4 Priority:200

And Job_1 will be rendered first.
User avatar
timurhai
Site Admin
Posts: 913
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: How Does Job Priority Work?

Post by timurhai »

Ok, I see.
There should be some parameter for job priority behavior.
I should think this up and implement.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Anti-Distinctlyminty
Posts: 23
Joined: Sat Jan 08, 2022 4:15 pm

Re: How Does Job Priority Work?

Post by Anti-Distinctlyminty »

I would be very grateful, thank you.
User avatar
timurhai
Site Admin
Posts: 913
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: How Does Job Priority Work?

Post by timurhai »

Hello!
Currently, to boost some job, you can put it into a special high priority branch.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply