def updateAdProperty(job, name, type=None,
value=None):
for i in range(len(job[1][0])):
if (job[1][0][i].name == name):
if type:
job[1][0][i].type = type
if value:
job[1][0][i].value = value
return True
return False
result =
condor_schedd.service.commitTransaction(transactionId)
condor_schedd.service.requestReschedule();
#res =
condor_schedd.service.closeSpool(transaction,
clusterId, jobId)
print result
############ end code #####################
The job is sent 150 times for the same
clusterID, however the submit
loop is quite slow, probably due to the HTTP
connections.
Please, Is this the correct way to send a
set of jobs?
Is there any way to speed up this submission
cycle, like "condor_submi"
do it?
Best Regards.
--
Javi Roman
The result from createJobTemplate() can be reused.
Call it once before the loop, update the ClusterId
on it, then update its ProcId for each newJob()
call.
Best,
matt
Many thanks, Matt.
Updating the ClusterId o even only the ProcId in
the job template from createJobTemplate() (before
the loop) enhances the execution time. From about
50 seconds to 12 seconds for 50 iterations.
It's a good solution, anyway I guess is slow if I
launch hundred of jobs. I'm afraid the SOAP API is
not suitable for this task, from a performance point
of view.
You may want to check out the alternate SOAP API in the
contrib space: Aviary. It goes pretty fast after the nominal
overhead of the HTTP connection. With Aviary, there is more
packing into the single submit RPC call as opposed to the 3
separate RPC calls used above in the original Birdbath SOAP
interface.
On my machine I get results like this for 150 "simple"
submits like yours:
real 0m7.922s
Another user obtained:
$ time PYTHONPATH=/usr/share/condor/aviary/module/ submit.py
| wc -l
150
real 0m2.453s
YMMV,
\Pete
--
Peter MacKinnon
Cloud BU/MRG Grid
Red Hat Inc.
Raleigh, NC
Many thanks Pete,
This SOAP interface alternative is great.
I'm trying to get the condor-aviary contrib from RPMs, but I
can not find it in the UW repositories. The stable and
development versions looks like they don't include the Aviary
contrib plugin:
condor-7.8.6-73238
condor-7.9.1-70216
Nevertheless, I've decided to include the Aviary plugin from
sources, I've run into a new problem. When I build the Condor
source code from condor_src-7.9.1-all-all.tar.gz (last version),
I'm not getting the AviaryScheddPlugin-plugin.so,
even with the command: