[Swift-commit] cog r3862

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jan 22 17:10:03 CST 2014


------------------------------------------------------------------------
r3862 | hategan | 2014-01-22 17:07:38 -0600 (Wed, 22 Jan 2014) | 1 line

added code to regularly log memory usage of the coaster service process
------------------------------------------------------------------------
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 3861)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java	(working copy)
@@ -148,6 +148,16 @@
                 synchronized (incoming) {
                     incoming.wait(Math.min(planTimeMillis * 20, 10000) + 1000);
                 }
+                
+                if (logger.isInfoEnabled()) {
+                    Runtime r = Runtime.getRuntime();
+                    long maxHeap = r.maxMemory();
+                    long freeMemory = r.freeMemory();
+                    long totalMemory = r.totalMemory();
+                    long usedMemory = totalMemory - freeMemory;
+                
+                    logger.info("HeapMax: " + maxHeap + ", CrtHeap: " + totalMemory + ", UsedHeap: " + usedMemory);
+                }
             }
             if (shuttingDown) {
                 logger.info("Service shutting down. Exiting planning loop.");



More information about the Swift-commit mailing list