-
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
[WIP] priority plugin: add configurable plugin factor weights for priority calculation #220
Conversation
4bb18ce
to
d2c9b83
Compare
OK, I think I'm getting closer, so I'll mark this as ready for some early initial review whenever convenient. |
Since queue priority and queue validation is soon to be disabled in flux-accounting (for now), I'll convert this back to [WIP] until we have a clearer idea of how queue support is going to be supported throughout the various flux components. |
Add a new table to the flux-accounting DB, plugin_factor_table, which will hold the various factors and their associated weights to be used in the multi-factor priority plugin. Insert the two factors, fairshare and queue, as rows into the plugin_factor_table.
Add commands to view and edit the weights of each factor in the plugin_factor_table.
Add a new RPC to flux-account-priority-update.py which will fetch all plugin factors and their associated weights from the flux-accounting DB's plugin_factor_table and send it to the multi-factor priority plugin, where it will be unpacked and stored in a map. The key-value pair contains the plugin factor and its associated weight to be used in the priority calculation of a job.
Instead of hard-coding the weights for all of the priority factors in the priority_calculation() function, fetch the weights stored in the plugin_factors map, which contains information about the various priority factors and their associated weights defined in the flux-accounting DB plugin_factor_table. If for some reason the weight of either factor cannot be found, a weight of 0 will be used in the priority calculation of a job.
Codecov Report
@@ Coverage Diff @@
## master #220 +/- ##
==========================================
- Coverage 84.26% 83.99% -0.28%
==========================================
Files 23 23
Lines 1176 1087 -89
==========================================
- Hits 991 913 -78
+ Misses 185 174 -11
|
This is a PR built on top of #207, a PR proposing adding a queue factor to priority calculation in the plugin.Background
As more and more factors get added to the multi-factor priority plugin, there comes a need for configuring the weight of each factor to be more or less important in the overall calculation of a job's priority. For example, a scheduler operator may want to emphasize the importance of a user/bank's fairshare over what queue a job is submitted in, or vice versa.
Currently, the priority plugin defines the weights for each factor in the
priority_calculation()
function, which means the weights of both the fairshare and queue factors cannot be changed by a scheduler operator or sys admin.This
[WIP]PR looks to add configurable weights to both the flux-accounting DB and the priority plugin by adding a new table to the flux-accounting DB calledplugin_factor_table
. It will store all plugin factors and their associated weights, which are created when the database is first created. Commands to both view and edit these commands are also added, calledview-plugin-factor
andedit-plugin-factor
, respectively.These factors and their weights are included in the bulk update script, where it is then unpacked by the plugin into a map, with the name of the factor as the key, and its associated weight as the value. Its weight is then fetched in
priority_calculation()
when calculating the priority of a user/bank combo's job.Both unit tests and sharness tests are added for the new commands and their effects on priority calculation in
t1013-plugin-weights.t
, which adds a user/bank combo who submits jobs under a number of different weight configurations for the various plugin factors.Fixes #128