-
Notifications
You must be signed in to change notification settings - Fork 10
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
multi-factor priority plugin: add new "age" factor #291
Comments
After playing around with this some yesterday and this morning, I think I am getting closer to a working solution. Since jobtap plugins allow
|
As I think about how to test this, I am wondering how it might be possible to test for consistent priority values, which is what I have been doing currently. I guess I could change the sharness tests to just check that the job receives a priority value (and not compare to a specific value), and that's it. The age factor is sure to change the integer priorities that I currently test for, and I'm not sure I can guarantee it stay the same in between runs. |
Maybe you'll want to add some configuration that controls whether to include or exclude the As a stopgap, you could add a test-only RPC to the Otherwise, instead of comparing priorities to a specific value, you could ensure they are in an expected range, or are greater than or less than the priority of another job. Sorry, I don't have any other great ideas at the moment. |
It might be separately useful to have TOML configuration support for flux-accounting. It's easier now that you can get the config through the |
Good point. If you allow the factor weights to be configurable in TOML config, then you can set the |
Ah, these are great suggestions, thank you both! I agree that it would be useful to have TOML configuration for the plugin and for flux-accounting. I think I had a couple of vaguely related issues (#128 and #216) currently open that I think I should circle back to once I complete this. For now, would it be okay if I went with @grondo's suggestion of just checking the integer priorities returned are in an expected range? I think for the most part, most of the tests that do check for an integer priority are just making sure that a priority is returned and are less concerned with the order of jobs. If so, is there a recommended way you had thought of doing this? Were you thinking of using EDIT: actually, I think I can accomplish by using |
sure! If the priority is a number you can also just check that it is within a range. It all depends on what you are trying to test. |
Beginning to circle back to adding the One suggestion from @grondo was perhaps getting the timestamp of the priority event that resulted in a nonzero priority and calculating age that way. It should also probably handle the case where a job's @garlick / @ryanday36 - do you have any thoughts here on a possible implementation method? Should we consider a job's age as the time when it was released (i.e actually eligible for scheduling)? Or instead just when it is submitted and look to handle the case where an urgency is changed from zero to nonzero? |
Age should generally be the time that the job was eligible, though I could see a configuration option to count it from job submission being a future request if other sites start running Flux system instances as that is something that Slurm offers. |
Another factor that could be added to the multi-factor priority plugin is an "age" factor, or a factor that represents the amount of time that a job has been sitting in a queue waiting to run. The priority for a job, in general, should increase the longer it sits in a queue eligible to run.
A first thought: Perhaps the
t_submit
field can be extracted when the job entersjob.validate
and be set along with the other necessary job information. Then, it can be subtracted from the current time when the priority is being calculated to determine an age, resulting in an age factor that could increase the priority of a job. The age factor should also probably be less than the fair-share factor.I think this would also work during a
reprioritize
, which callsjob.priority.get
for all jobs (by "all" jobs, I'm assuming all jobs that are not currently inRUN
state). The priorities for these jobs would be updated to reflect how long they've been scheduled to run.The text was updated successfully, but these errors were encountered: