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

Re: [HTCondor-users] Usage of JobStart or ActivationTimer in startd RANK expression?



JobStart and $(ActivationTimer) are only valid once a job starts running (i.e. the slot is in the Busy activity).
Thus, they are not suitable for use in a RANK expression.
$(ActivityTimer) is always valid, and marks the time since the slot changed its Activity value (Busy, Idle, etc).
Have you looked at the MAXJOBRETIREMENTTIME parameter? This seems like an ideal use for it.

 - Jaime

> On Mar 31, 2020, at 2:22 AM, Carsten Aulbert <carsten.aulbert@xxxxxxxxxx> wrote:
> 
> Hi all,
> 
> we are currently trying to implement quite a number of changes to our
> pool (and since we are pretty much stuck at the moment, I will probably
> a lengthy email with a plea for ideas/help soon).
> 
> Apart from trying to get preemption going based priorities and other
> factors (hence using the negotiator for that), we would like to enable
> interactive jobs to be preferred on our nodes and we think, the best way
> would be to use the startds' RANK expression here.
> 
> We make all resources of a node available as a large partitionable slot
> and set the machine attribute "MinRunTimeHours" to define how long we
> allow a user batch job to run before we may kill it. Just to be sure
> that's readily available, we propagate it via STARTD_ATTRS as well.
> 
> Thus to allow an interactive job to enter, we simply tried something like
> 
> RANK = MY.MinRuntimeHours * 3600 > (time() - JobStart)
> 
> (or using ($(ActivationTimer) directly, but this does not work as
> JobStart evaluates to UNDEFINED and hence $(ActivationTimer) evaluates to 0.
> 
> Interestingly, $(ActivityTimer) does yield a reasonable value.
> 
> Any idea, why this could be the case?
> 
> Cheers and thanks a lot in advance
> 
> Carsten
> 
> PS:
> 
> 03/31/20 07:21:22 Classad debug: [0.00095ms] MY --> CLASSAD
> 03/31/20 07:21:22 Classad debug: 2 --> 2
> 03/31/20 07:21:22 Classad debug: [0.04601ms] MY.MinRuntimeHours --> 2
> 03/31/20 07:21:22 Classad debug: [0.00191ms] JobStart --> UNDEFINED
> 03/31/20 07:21:22 Classad debug: [0.02503ms] ifThenElse(JobStart isnt
> undefined,(time() - JobStart),0) --> 0
> 03/31/20 07:21:22 Classad debug: [0.12302ms] 1.000000000000000E+00 *
> (MY.MinRuntimeHours * 60 > (ifThenElse(JobStart isnt undefined,(time() -
> JobStart),0))) -
> -> 1
> -- 
> Dr. Carsten Aulbert, Max Planck Institute for Gravitational Physics,
> CallinstraÃe 38, 30167 Hannover, Germany
> Phone: +49 511 762 17185
> 
> _______________________________________________
> 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/