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

Re: [Condor-users] license management

On Tuesday, 22 November, 2011 at 8:52 PM, Tiago Macarios wrote:


I have a peculiar problem. We use a commercial software which is license controlled, is there some way I can have condor to check the license before submitting the job?
I found this thread (https://www-auth.cs.wisc.edu/lists/condor-users/2008-October/msg00086.shtml) in which the same problem was exposed and the solution was setting the total number of licenses, but I can not do that because the total number of license available to the condor pool is variable.
In other words, if someone outside the pool is using the software one license less will be available.

I can use this command to get the number of licenses being used: "lmstat -c <port>@<licenseserver> -f <feature>"
Is there some way I could set a limit using this, like:
LICENSELIMIT=`lmstat -c <port>@<licenseserver> -f <feature>`

and put it in the job requirement?

But you can look at concurrency limits and counters in Condor:


Though it's not a perfect solution to your problem. You can periodically adjust a limit counter with a script that checks FlexLM and then calls condor_config_val to reset the total available counter for a resource. If you lower it below the current number of jobs using that resource, no new jobs will start, but Condor won't preempt any existing jobs using that resource either.

License management is an art really, not a science. Every site differs in how they want to do it, what they want to achieve in terms of license access for interactive and batch jobs. And, of course, every tool differs in *how* it consumes licenses. Some tools use tokens in such complex manners it's really impossible to model in any kind of job scheduling system.

You can also look at exploiting Condor's ability to requeue a job here. Have your FlexLM instance set up so that license requests cause the tool to pause and wait for a period of time if they request a license but can't get it. Then, if that time expires, have Condor put the job back in the queue. Something like 5 minutes of lost CPU time waiting for a license to become available may be worthwhile if we're talking expensive licenses that are used for an order or magnitude of time or longer once the job runs. The CPU wasted is far less than the cost of the license in that case.

It all comes down to experimentation to figure out what approach is going to work best for your batch and interactive users.

- Ian

Ian Chesal

Cycle Computing, LLC
Leader in Open Compute Solutions for Clouds, Servers, and Desktops
Enterprise Condor Support and Management Tools