Archive for December, 2010

Jobs, claims and leases: Claim leases

December 20, 2010

Often people will think of Condor’s Negotiator as strictly matching a job to a resource. This is only conceptually true, and gives a 1:1 job:resource impression that is easy to reason about. In reality the match is N:1. The Negotiator actually creates matches between a job prototype (sometimes called a resource request or an auto cluster) with a resource. The difference may be subtle, but it is powerful. There are two obvious benefits: increased performance in generating matches; and, decreased latency in starting jobs.

The matchmaking algorithms the Negotiator uses to create matches are on the order of N*M in the worst case, where N is the number of jobs in the system and M is the number of resources in the system. N can be a very large number, often in the millions, and M is often not small, though it tends to be in the thousands to tens of thousands range. Drop me a note if you run a pool with >100K cores.

As you know, resources and jobs have requirements on each other. Those requirements (and preferences) reference only a subset of attributes that may be on a job. While there are N jobs in the system, when only looking at attributes that play a role in matchmaking policies, it is very rare for all N jobs to be unique.

For instance, submitting 1,000 jobs in a parameter sweep will result in 1,000 unique jobs when you consider all attributes on the jobs, but maybe only 1 job prototype when you throw out the Args attribute. And, if you don’t reference Args within requirements expressions, which you surely do not, it is safe to throw it out. All of a sudden the N=1000 becomes N=1.

It is often the case that in a system with millions of jobs there may only be thousands of job prototypes.

To take advantage of this compression, when a match is generated, the Negotiator gives a claim to a Schedd. That claim is for a resource and embodies the type of job that can be run on the resource. As we now know, there may be many such jobs at the Schedd. The Schedd is free to reuse the claim, within reason.

It is through the reuse that the second benefit becomes clear. A job on the Schedd does not have to wait for a negotiation cycle before it can be run. It only has to wait for a compatible claim to free up. Of course, if all the claims are used, then the job may wait for a negotiation cycle to provide more claims.

As a side note, claim reuse provides dramatic wins for very short running jobs.

Hold on, “within reason”? Yes, as for anything in a distributed system that provides ownership, a claim must have strong semantics. It would not be desirable to give a Schedd a claim and never get it back, which might happen if a Schedd was always busy or if it simply goes away (crashes, gets powered off, etc). Condor allows for an arbitrary number of Schedds to exist in the system. Sometimes one for each user. If all resources are claimed by existing Schedds and a new Schedd appears, well, you can imagine.

Enter the lease. To combat this issue, a claim comes with a lease, which specifies the amount of time the Schedd should expect to have exclusive access to the claimed resource. Ultimately, the the resource controls access. After any job completes, the resource can opt to terminate the lease, and certainly will if the lease has expired. Termination means the Schedd should not try to use the claim anymore. All attempts to use it will be rejected.

Update on Negotiation cycle statistics

December 5, 2010

Back in March 2010, I posted an AWK script that would process a NegotiatorLog and, on a per cycle basis, provide information on the number of matches, duration of cycle, match rate (matches per second), number of rejections, number of submitters and the total number of slots considered.

Now, with GT1458 in 7.5.4 and thanks to Dan Bradley, you can get these statistics right from the Negotiator’s ad. Run condor_status -negotiator -long and you’ll find:

LastNegotiationCycleTime0 = 446803200
LastNegotiationCycleMatches0 = 990
LastNegotiationCycleDuration0 = 5
LastNegotiationCycleRejections0 = 2
LastNegotiationCycleActiveSubmitterCount0 = 1

Soon, thanks to Erik Erlandson and Jon Thomas, when GT1393 gets merged, you will get access to a host of new statistics, including:

LastNegotiationCyclePeriod0 = 25
LastNegotiationCycleMatchRate0 = 198.000000
LastNegotiationCycleTotalSlots0 = 1100
LastNegotiationCycleMatchRateSustained0 = 39.599998
LastNegotiationCycleSubmittersShareLimit0 = ""

Get Wallaby – Condor Configuration Management

December 4, 2010

Will Benton has been busy enhancing Wallaby, a system for Condor configuration management. He presented it along with Rob Rati at Condor Week 2010. A lot has happened since then, recently including the addition of an HTTP transport for retrieving configuration and a means to extend the Wallaby shell.


%d bloggers like this: