[Swift-commit] cog r3746
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Mon Jul 22 15:10:03 CDT 2013
------------------------------------------------------------------------
r3746 | hategan | 2013-07-22 15:07:55 -0500 (Mon, 22 Jul 2013) | 1 line
made block shutdown delay configurable
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (revision 3745)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java (working copy)
@@ -442,7 +442,7 @@
for (Block b : sorted.values()) {
if (sum >= needed
&& !b.isSuspended()
- && (System.currentTimeMillis() - b.getLastUsed()) > Block.SUSPEND_SHUTDOWN_DELAY) {
+ && (System.currentTimeMillis() - b.getLastUsed()) > (1000 * settings.getMaxBlockIdleTime())) {
b.suspend();
}
sum += b.sizeLeft();
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (revision 3745)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (working copy)
@@ -50,6 +50,7 @@
"workerLoggingDirectory",
"ldLibraryPath", "workerCopies",
"directory", "useHashBang",
+ "maxBlockIdleTime",
"parallelism",
"coresPerNode"};
@@ -107,6 +108,8 @@
private int maxNodes = Integer.MAX_VALUE / 1024;
private int maxtime = Integer.MAX_VALUE;
+
+ private int maxBlockIdleTime = 30; //s
private final Set<URI> callbackURIs;
@@ -289,6 +292,14 @@
this.maxtime = maxtime;
}
+ public int getMaxBlockIdleTime() {
+ return maxBlockIdleTime;
+ }
+
+ public void setMaxBlockIdleTime(int maxBlockIdleTime) {
+ this.maxBlockIdleTime = maxBlockIdleTime;
+ }
+
public String getWorkerManager() {
return workerManager;
}
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java (revision 3745)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java (working copy)
@@ -32,9 +32,6 @@
/** milliseconds */
public static final long SHUTDOWN_WATCHDOG_DELAY = 2 * 60 * 1000;
- /** milliseconds */
- public static final long SUSPEND_SHUTDOWN_DELAY = 30 * 1000;
-
private static BlockTaskSubmitter submitter;
private synchronized static BlockTaskSubmitter getSubmitter() {
More information about the Swift-commit
mailing list