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

Re: [HTCondor-users] PREEMPTION_RANK Trouble



It works perfectly, thanks!

Maybe a clarification in the documentation is in order? I think that it isn't a 100% clear that the "TARGET" prefix refers to the candidate job.

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of Todd Tannenbaum
Sent: Wednesday, January 15, 2014 8:40 PM
To: HTCondor-Users Mail List
Subject: Re: [HTCondor-users] PREEMPTION_RANK Trouble

Hi Uri,

Welcome to HTCondor!

Re the below, I think I see the issue.

You have

  PREEMPTION_RANK = -TARGET.JobPrio

but in PREEMPTION_RANK, TARGET.xxx refers to an attribute from the candidate queued (idle) job classad that is being considered to preempt the job running on a machine.  So in context of your test setup, -TARGET.JobPrio is referencing the JobPrio of a given User B job.  The PREEMPTION_{REQUIREMENTS|RANK} expressions are evaluated within the context of the candidate machine ClassAd and the candidate idle job ClassAd; the MY scope prefix refers to the machine ClassAd, and the TARGET scope prefix refers to the ClassAd of the idle (candidate) job. 
There is no direct access to attributes from the currently running job, but attributes of the currently running job that need to be accessed in PREEMPTION_REQUIREMENTS can be placed in the machine ClassAd using STARTD_JOB_EXPRS.

So you want to rank by the JobPrio of the job that is running on a given machine, which normally would not appear in either the candidate job ad or in the machine classad.  So to deal with this, you want to use STARD_JOB_EXPRS to tell the condor_startd to copy an attribute out of the job classad of the job running on a slot, and publish it into the machine classad.  So to get what you want, I think you want the append the following in your condor_config.local (or edit the knobs directly in condor_config, whatever):

   # Publish JobPrio of running jobs into machine ad
   STARTD_JOB_EXPRS = $(STARTD_JOB_EXPRS) JobPrio
   # Preempt based on JobPrio of running job found in machine ad
   PREEMPTION_RANK = -MY.JobPrio

Hope the above makes sense.

Give the above a whirl.  Note the STARTD_JOB_EXPRS change needs to be seen by all your execute nodes, and the PREEMPTION_RANK change needs to be seen by your central manager.  Don't forget to issue a "condor_reconfig -all" for the settings to take effect.

regards,
Todd

On 1/15/2014 8:39 AM, Uri Schneider wrote:
> Hello all,
>
> I'm trying to use PREEMPTION_RANK to control which jobs get preempted in my cluster. Specifically, I'd like to use the job priority, so that, all other things being equal, jobs with lower priority are preempted first.
>
> I've put the following the negotiator machine's condor_config file:
>
> PREEMPTION_RANK = -TARGET.JobPrio
>
> ...but it doesn't seem to have any effect.
>
> My test setup:
> *       3 slots, all identical, running on one machine
> *       User A submits 3 jobs, each with a different priority (0, 1, or 2). User A's jobs are have a machine rank of 0.
> *       User B then submits a job with a higher machine rank, so that preemption would occur.
> *       Regardless of the order and priority of user A's jobs, it's always the last submitted job that's being preempted.
> *       I've also tried adding a new ClassAd attribute, and using it in PREEMPTION_RANK in a similar manner, but to no avail.
>
>
> BTW, I've managed to use PREEMPTION_RANK to preempt the shortest running job, using:
>
> PREEMPTION_RANK = -TotalJobRunTime
>
> ...so I know that the mechanism works.
>
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

 
 
************************************************************************************
This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************