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

Re: [HTCondor-users] kill job when keyboard is busy Not working



On 4/22/2013 10:52 AM, Biju Ramachandran wrote:
Hi there:

I am trying to take advantage of idle CPU(artist workstations)  - when
they are not using. Here is my setup on a test workstation config file:
Here The KILL is not working ..?

############# Test config #####################
KeyboardBusy = (KeyboardIdle < 3)
MachineBusy = ($(CpuBusy)||(KeyboardBusy)
ActivityTimer = (CurrentTime - EnteredCurrentActivity)

START = (KeyboardIdle > 5) && ($(AfterHours) || $(NBUserSystem)
||(jobtype == "nuke"))
KILL = $(KeyboardBusy)

Please let me know how I can get this working ..?


What is WANT_VACATE set to be? If it is True, then HTCondor will be looking first at PREEMPT, not KILL. Setting this policy is documented here:
http://research.cs.wisc.edu/htcondor/manual/v7.8/3_5Policy_Configuration.html

Off the top of my head, I'd suggest something like the below assuming you are running HTCondor v7.8+. The advantage of the below is it will first ask the job to nicely go away (e.g. on Windows, this is equal to pressing the "X" in the upper corner of the window) and only hard-kill it if it is still around 10 seconds later. This will give the job a chance to unload DLLs etc.

  # Start on slot 1 if there has been no keyboard activity for 15 min
  START = KeyboardIdle > 900  && (whatever else) ....
  # When we see keyboard activity, try to nicely kill the job,
  # and if the job is still around 10 seconds later kill it hard.
  WANT_SUSPEND = False
  WANT_VACATE = True
  PREEMPT = KeyboardIdle < 60
  MachineMaxVacateTime = 10
  KILL = False

regards,
Todd