Job_sort_formula examples

Hi all,

I am looking to use the job sort formula to set the job execution priority based on the following:

queue priority
fairshare_factor
give multi core jobs higher priority over single core jobs.

The issue I am facing is how to create the formula. I have taken a look at the documentation and I am a bit confused on how to go about creating it. So far it looks like this

job_sort_formula=‘queue_priority + fairshare_factor + ncpus’

I’m not sure if that will cover all my bases. Are there any folks that use the job sort formula and wouldn’t mind sharing an example?

Thanks for the help

set server job_sort_formula = "base_score + score_boost + (enable_wfp * wfp_factor * (eligible_time ** 2 / min(max(walltime,21600.0),43200.0) ** 3  * project_priority * nodect / total_cpus)) + (enable_backfill * min(backfill_max, eligible_time / backfill_factor)) + (enable_fifo * eligible_time / fifo_factor)"

The above is what we use. It unfortunately has to be all one line. The things with enable_ in them can be set to 0 to remove that term from the formula when appropriate.

I hope that helps.

Bill

1 Like

You may also want to think about the magnitude of the various terms. For instance if queue priority is 150, we don’t use fairshare, but I believe that is a number between 0 and 1 and ncpus could be 4-256?. Perhaps multiply by the fairshare factor? You could also normalize all your terms by dividing by the max value so they are all between 0 and 1. It also depends on if you want one to have more weight than another. Just things to think about.

1 Like