[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] priority and rank-based preemption



On 2/15/2016 9:09 AM, Vladimir Brik wrote:
Hello.

How does condor decide which running job to preempt when a higher-rank
job is submitted? More specifically, if all startds in our pool are
configured to rank jobs of a certain user higher than everybody else,
will condor preempt jobs with worst priority first?


Likely answer is yes, HTCondor will preempt jobs from users with the worst priority first due to the default value for the PREEMPTION_RANK knob. But it is hard to say for certain without seeing all the inputs since almost nothing in HTCondor is hard-coded.

For all the slots that match a given job, the slots are sorted and then subsorted four more times (!) according to the below values: 1. NEGOTIATOR_PRE_JOB_RANK (which by default looks at the startd RANK value)
  2. Rank expression from the job (i.e. what the submitter wants)
  3. NEGOTIATOR_POST_JOB_RANK
4. preemption state (2=no preemption, 1=startd-rank-preempt, 0=user-prio-preempt)
  5. PREEMPTION_RANK (if preempting)
So the slots are first sorted by the NEGOTIATOR_PRE_JOB_RANK expression, then sub-sorted by the rank from the job, etc. The slot with the highest sort score is the one selected (i.e. the higher the value, the "better" the match).

You can view the current settings for the above knobs via the following command on your central manager:

condor_config_val -v NEGOTIATOR_PRE_JOB_RANK NEGOTIATOR_POST_JOB_RANK PREEMPTION_RANK

Hope this helps,
regards,
Todd