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

Re: [Condor-users] startd priority and preemption

You should be able to achieve what you're looking for by using Startd
RANK and Job priority.

On Sun, Nov 2, 2008 at 10:30 PM, Steve Shaw <steveshaw89@xxxxxxxxxxx> wrote:
> It looks like the two options to set priorities are by user and by jobs on a
> given machine, right?... Since neither of those suit my needs, I was looking
Condor has several different ways of setting priority/preemption between jobs:
-User Priorities for fair-share between Users/AccountingGroups
-Job Priority for determining the order in which an individual
scheduler will run a user|accountingGroup's jobs
-Group Quotas for minimum/maximum resource guarantees
-Machine RANK determines a machines *preemptive* preference for jobs by machines

> Optimally, I'd like to preempt jobs only if the Target is 'Urgent'.  I.e. if
> a Low job is running, I'd prefer that it doesn't get preempted by
> another job unless that job is Urgent.  So, I guess I can't play with
> MaxJobRetirementTime.  Is there a way I can do that such that a High job
> doesn't preempt a Low job but an Urgent job does?
So if you want, for a given user's jobs, to have their URGENT jobs
preempt other non-urgent jobs, and otherwise High jobs run before,
Medium and Low, etc. then do the following:
-On the startds, set:
RANK =  (TARGET.UserSetPriority =?= 'Urgent')
This will cause the startd to preempt non-Urgent jobs in favor of Urgent ones

-Then, within your jobs, set:
+UserSetPriority="Urgent" or "High" or "Medium" or "Low"
"priority = 3" if the job is "Urgent"
"priority = 2" if the job is "High"
"priority = 1" if the job is "Medium"
"priority = 0" or don't specify a priority, for "Low" jobs
You'll want to have individual users submit their jobs to one
scheduler for this to work properly because Job Priority is only valid
for ordering a user's jobs within one schedd. For exmple, if you have
UserA's Low jobs on one ScheddA and High and Medium jobs on ScheddB,
you will likely get some Low jobs running off the ScheddA and some
High jobs off the ScheddB. If UserA's jobs are all on one scheduler,
you'll get the behavior you're looking for.

Hope this works for you,

Jason A. Stowe
cell: 607.227.9686
main: 888.292.5320

Cycle Computing, LLC
Leader in Condor Grid Solutions
Enterprise Condor Support and Management Tools