[haizea-commit] r544 - branches/TP1.3-scheduler-refactoring/haizea/common trunk/src/haizea/resourcemanager/frontends

haizea-commit at mailman.cs.uchicago.edu haizea-commit at mailman.cs.uchicago.edu
Wed Nov 19 18:30:50 CST 2008


Author: borja
Date: 2008-11-19 18:30:48 -0600 (Wed, 19 Nov 2008)
New Revision: 544

Modified:
   branches/TP1.3-scheduler-refactoring/haizea/common/constants.py
   trunk/src/haizea/resourcemanager/frontends/tracefile.py
Log:
Previous revision was missing some code for this:

* Added an "override-memory" option to the config file to override the memory requested in a trace file. This is useful when running simulations where the memory is one of the variables. This should be replaced with a more general mechanism eventually.

Modified: branches/TP1.3-scheduler-refactoring/haizea/common/constants.py
===================================================================
--- branches/TP1.3-scheduler-refactoring/haizea/common/constants.py	2008-11-20 00:29:39 UTC (rev 543)
+++ branches/TP1.3-scheduler-refactoring/haizea/common/constants.py	2008-11-20 00:30:48 UTC (rev 544)
@@ -99,7 +99,8 @@
 COUNTER_BESTEFFORTCOMPLETED="Best-effort completed"
 COUNTER_QUEUESIZE="Queue size"
 COUNTER_DISKUSAGE="Disk usage"
-COUNTER_CPUUTILIZATION="CPU utilization"
+COUNTER_CPUUTILIZATION="VM CPU utilization"
+COUNTER_UTILIZATION="Resource utilization"
 
 AVERAGE_NONE=0
 AVERAGE_NORMAL=1
@@ -110,3 +111,4 @@
 LOGLEVEL_VDEBUG = 5
 LOGLEVEL_STATUS = 25
 
+NO_MEMORY_OVERRIDE = -1
\ No newline at end of file

Modified: trunk/src/haizea/resourcemanager/frontends/tracefile.py
===================================================================
--- trunk/src/haizea/resourcemanager/frontends/tracefile.py	2008-11-20 00:29:39 UTC (rev 543)
+++ trunk/src/haizea/resourcemanager/frontends/tracefile.py	2008-11-20 00:30:48 UTC (rev 544)
@@ -55,7 +55,7 @@
             for r, i in zip(self.requests, images):
                 r.vmimage = i
                 r.vmimagesize = imagesizes[i]
-                r.resreq.setByType(constants.RES_DISK, imagesizes[i] + r.resreq.getByType(constants.RES_MEM))
+                r.requested_resources.set_by_type(constants.RES_DISK, imagesizes[i] + r.resreq.getByType(constants.RES_MEM))
         
         # Add runtime overhead, if necessary
         add_overhead = config.get("add-overhead")
@@ -68,6 +68,12 @@
                    if slowdown_overhead != 0:
                        r.add_runtime_overhead(slowdown_overhead)
                    r.add_boot_overhead(boot_overhead)
+
+        # Override requested memory, if necessary
+        memory = config.get("override-memory")
+        if memory != constants.NO_MEMORY_OVERRIDE:
+            for r in self.requests:
+                r.requested_resources.set_by_type(constants.RES_MEM, memory)            
             
         num_besteffort = len([x for x in self.requests if isinstance(x,BestEffortLease)])
         num_ar = len([x for x in self.requests if isinstance(x,ARLease)])



More information about the Haizea-commit mailing list