-
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
plugin: enforce max resource limits across an association's running jobs #559
Comments
Had a helpful offline discussion with @ryanday36 about a possible implementation plan for how this might work in the priority plugin: The priority plugin will have When a job proceeds to As jobs get submitted and are running, subsequently submitted jobs will have their resource counts checked in Jobs will be held until a currently running job transitions to INACTIVE. When the running job transitions to INACTIVE, its resources will again be extracted from jobspec and decremented from the association's |
I am getting closer to being able to actually enforce dependencies on jobs where an association is already at their max resource limits, but while coming up with some test cases I ran into a bit of a hiccup with one particular scenario. To summarize, here is the current workflow I've written when a job enters job.state.depend
In this callback, I have it written so that at most one of these dependencies are added to a job. job.state.inactive
The scenario where I am a bit stuck is in the case where a held job (due to a max running jobs limit) would still not satisfy the resource limit for the user (so the job continues to be held); if I have just one dependency added to the job (e.g I have two immediate thoughts on how to maybe restructure the dependencies in the plugin to get around this, but would be open to any feedback or advice:
|
Creating a tracking issue here to outline the idea for enforcing a max number of resources used across an association's set of running jobs. I already have a couple of open issues similar to this but it would probably be useful to re-organize some thoughts after some helpful offline discussion.
The need here is to be able to limit how many resources (e.g nodes, cores) an association can have at any given time across all of their running jobs. As noted in flux-config-policy(5), the limit checks take place before the scheduler sees the request because [the plugin] does not have detailed resource information.
So, it seems a realistic solution here would be to configure a max resources limit that is both a max nodes and a max cores limit. The priority plugin should be able to keep track of both when a job enters RUN state by looking at the jobspec. It can increment/decrement current node and core counts per-association across all of their running jobs. Then, when a submitted job enters DEPEND state, the job's size can be checked to see if adding its resources to the association's currently allocated resources would put them over the max (i.e either over the nodes or cores limits). If so, the job can be held until a currently running job exits.
There are a couple of prerequisites to get this kind of support into flux-accounting:
Tasks
association_table
: addmax_cores
attribute, send information to plugin #560I've done some playing around today with a rough sketch and it looks like the first four tasks listed are pretty straightforward; copying over the jj code from flux-core, I'm able to extract job size counts and add/subtract them from an association's
cur_nodes
andcur_cores
attributes as jobs enter RUN and INACTIVE states.I'll plan to start opening incremental PRs to add this kind of support into flux-accounting.
The text was updated successfully, but these errors were encountered: