-
Notifications
You must be signed in to change notification settings - Fork 94
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
Internal queues: member prioritisation #1196
Comments
To avoid additional configuration items to handle prioritization, maybe we could prioritize according to the order in which tasks are assigned to a queue? Then for queued tasks, release them up to the queue limit by iterating through the ordered list of members. |
By "prioritize according to the order in which tasks are assigned to a queue" do you mean the order of their entries in the config entry for queue members e.g would this:
result in LONG family members having priority over those in SHORT with all members of LONG having equal priority to each other (i.e. pri(long1) == pri(long2) == pri(long3) etc.)? |
Well, yes and no. Here LONG is just shorthand for all the members of the the LONG family, so long01 would technically have the highest priority, then long02 and so on; but all members of LONG would have higher priority than any members of SHORT (and then FRED). That wouldn't matter if internal prioritization of LONG doesn't matter (it it did matter you'd just have to assign to the queue by member names rather than family name). |
I think we'd need to go off namespace for the task to be queued rather than explicit expansion wouldn't we? If we didn't, I kind of have a worry at the back of my mind for the default queue causing problems by expanding root meaning you could end up unfairly starving tasks from being able to run. e.g. for the following with a default queue limit of 1 (extreme I know):
if a-f were quick cycling then members of LONG would struggle to get to the front of the queue until a-e had finished, even though they'd been sitting around and ready from the start of the suite. For things in families I think we'd just want a first in queue first out type ordering as no member of family has priority over another (all family members are equal ;) ). |
Yep, fair point! |
Another option for prioritization would be to preferentially execute earlier cycle points in order to avoid runahead snags (where one or two tasks still haven't executed in an earlier cycle point and greatly slows down the suite). Order of insertion doesn't help in this case, because if several cycle points are running at once, insertion order would be interleaved. Setting the One possibility:
|
We have a volunteer here who wants to do this! |
Who? |
A member of our post-processing team - I think they need to use quite a lot of queues for their suites. |
How about:
|
Or, for 1), to make the default queue more compatible, order by cycle point then task definition order |
I've put up a PR to get the ball rolling on this one - it implements FIFO behaviour for queues. Not exactly what was suggested in this issue, but perhaps enough to alleviate the main problems. |
Update: near-future plans:
This opens the door for swappable alternative queue implementations to suit all purposes without creating back-compat issues. |
We have now been asked by several areas about the possibility of being able to prioritise within queues. It is not always possible to capture these kind of requirements within cylc dependencies.
An example might be wanting to run longstep ensemble members before shortstep ones.
It may be possible to simply modify cylc to achieve an ordering preference in queues but we need to consider the consequences carefully.
The text was updated successfully, but these errors were encountered: