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

Re: [Condor-users] Writing a better FetchWorkDelay expression for my system



Ian Chesal wrote:
Even after playing with this for a few weeks it's still not apparent why
the example:

FetchWorkDelay = ifThenElse(State == "Claimed" && Activity == "Idle", 0,
300)

...is good. For me. Or anyone really.

That appears to call to the fetch work script every 5 minutes even if
the machine is the Owner state. And why you need to fetch work when
(Claimed, Idle) is not apparent. I had originally thought the startd set
itself as (Claimed, Idle) before calling the fetch work script, but
that's not what I'm seeing. I'm seeing (Unclaimed, Idle) when my fetch
work script is called. Why does this example expression from the docs do
something different with (Claimed, Idle)?

Until I know otherwise I'll assumed (Claimed, Idle) is special and
should be treated that way in my custom delay expression.

Here's my particular case: my fetch work script looks at State. If the
State is Claimed or Owner it never returns work for the startd to
consider. We never preempt. So there's no point calling the fetch work
script in certain states. Instead of never calling it, I'll just set it
to be called a longer interval.

So: Fetch work immediately if (Claimed, Idle), otherwise if (Unclaimed)
fetch work every 5 seconds, otherwise fetch work every 20 minutes.

FetchWorkDelay = ifThenElse(State == "Claimed" && Activity == "Idle", 0,
ifThenElse(State == "Unclaimed", 5, 1200))

Can someone familiar with the fetch work stuff evaluate the sanity of
this expression?

Thanks.

- Ian

Confidentiality Notice.
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution,  or copying  of this message, or any attachments, is strictly prohibited.  If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments.  Thank you.

A claim is created for fetched jobs. That claim can last past the end of the job. So, you'll get (Claimed,Idle) after a fetched job completes. At that time you may want to immediately try to fetch another job, and re-use the existing claim.

Best,


matt