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

Re: [HTCondor-users] Preferring execute nodes that are seldomly used by the owner

From: Ben Cotton <ben.cotton@xxxxxxxxxxxxxxxxxx>
Date: 08/23/2016 11:33 AM
> So you could set a rank expression to prefer (1/TotalTimeOwnerIdle).
> If you want to make it percentage-based instead of a count of seconds,
> I'd define an attribute on your execute machines like:
>     OwnerFactor = (CurrentTime - DaemonStartTime) / TotalTimeOwnerIdle
> and then just rank based on OwnerFactor. With either of the above
> suggestions, you might want to use an ifThenElse to prevent ending up
> with an undefined value.

It seems that it would be better to have the OwnerFactor go to 1.0 if
the Owner is constantly using the machine, and 0.0 if they're not using
it at all in order to have good semantics for the name of the attribute,
like so:

OwnerFactor = ifThenElse( \
        ! isUndefined(TotalTimeOwnerIdle) && CurrentTime > 
DaemonStartTime, \
        TotalTimeOwnerIdle / (CurrentTime - DaemonStartTime), 0 )

(The CurrentTime check is probably overly paranoid, I'll admit.)

And then the machine would subtract the factor from the rank in order to
prefer less-owned machines.

        -Michael Pelletier.