How to set user priority factors automatically by domain or other username pattern

Known to work with HTCondor version: 7.0

Suppose you have a HTCondor pool that runs jobs from several different groups of users who submit their jobs from different domains: physics.wisc.edu, biology.wisc.edu, and chemistry.wisc.edu. Further suppose that there is an agreement between these departments about what their relative priority should be in the HTCondor pool. How can you implement it?

First, you must answer this question: do you want each department to get an agreed-upon share of the pool? If so, you probably instead want to use Group Accounting. If you really do want to adjust the user priority factors of individual users submitting from the different domains, then read on.

In the simple case where there are just two domains, there is a built-in method in the HTCondor configuration file that lets you boost the priority factor of all domains but one:

In the more general case where you want to set the priority factor in different ways for several domains or user name patters, there is no built-in method in the HTCondor configuration. You can either adjust priority factors manually with condor_userprio or automate this process with a script (to be run periodically by HTCondor or cron). Here is an example script:

Be aware that if you run such a script, then any modifications to user priorities that you make manually with condor_userprio will be overwritten by the script when it runs!

Since a user may show up and claim machines before this script runs and adjusts their priority factor, you might way want to set the default priority factor quite high (i.e. very bad priority). This will prevent them from getting many resources until their factor is adjusted:

DEFAULT_PRIO_FACTOR = 100000
REMOTE_PRIO_FACTOR = 100000

This work supported in part by NSF grants MCS-8105904, OCI-0437810, OCI-0850745, and/or ACI-1321762. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. Site built using CVSTrac.