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

Re: [HTCondor-users] [PATCH] Speeding up condor_dagman submission



On 07/07/2015 14:49, Brian Candler wrote:
But the caller has already multiplied precision_range by TIME_UNITS_PER_SECOND, so they are passing in whole seconds' worth of jiffies! I can't see any reason why they should be doing that. And if that was really what was intended, why not just pass in seconds in the first place?

If that's the logic error, then the fix is simple:

--- src/condor_procapi/procapi.cpp.orig 2015-04-07 16:10:11.000000000 +0100
+++ src/condor_procapi/procapi.cpp    2015-07-07 14:07:20.583286037 +0100
@@ -3276,10 +3276,6 @@
         precision_range = &DEFAULT_PRECISION_RANGE;
     }

-        // convert to the same time units as the rest of
-        // the process id
- *precision_range = (int)ceil( ((double)*precision_range) * TIME_UNITS_PER_SEC);
-
         /* Initialize the Process Id
            This WILL ALWAYS create memory the caller is responsible for.
         */

This reduces the sleep time to the minimum 1 second[^3], and has the nice side-effect of also fixing another bug described in [^2] below.

Hmm, deathly silence. Would anyone in the Condor core team care to take a look at this, and/or explain the logic behind the sleeps in the algorithm for assigning process ids?

References:
https://www-auth.cs.wisc.edu/lists/htcondor-users/2015-July/msg00021.shtml
https://www-auth.cs.wisc.edu/lists/htcondor-users/2014-December/msg00053.shtml

It's amazing how much pain a 12-second delay can cause when it's repeated over and over again :-(

Regards,

Brian.