Skip to contentSkip to conversation

rteval: Don't run hackbench by default on low memory systems

PATCH New John Kacur 1 participant 1 message Jan 13, 2022

lore
Share & tools
lore

John Kacur

author
#0 lore raw

PATCH 1/1 rteval: Don't run hackbench by default on low memory systems

commit cb8263770e4f5834a43db6be8ffb55ffd7f876c9
Changed rteval to allow running on low memory systems by default because on some machines, such as certain Arm boards, it isn't a problem.

However, on our automated testing systems it is causing problems.

This patch disables running hackbench by default on a low memory system. In order to allow people to run on a lowmem system where this isn't a problem, this patch also creates the option --hackbench-runlowmem=True|False

A user who wants hackbench to run in rteval on a low memory system, only needs to specify

--hackbench-runlowmem=True

---
 rteval/modules/loads/hackbench.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
rteval/modules/loads/hackbench.py +9 -1
index 21a803b8a3cd..ddd1378bac75 100644
@@ -39,6 +39,7 @@ from rteval.systopology import SysTopology
 
 class Hackbench(CommandLineLoad):
     def __init__(self, config, logger):
+        self.__cfg = config
         CommandLineLoad.__init__(self, "hackbench", config, logger)
 
     def _WorkloadSetup(self):
@@ -56,7 +57,11 @@ class Hackbench(CommandLineLoad):
 
         ratio = float(mem) / float(self.num_cpus)
         if ratio < 0.75:
-            self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio)
+            if self.__cfg.runlowmem:
+                self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio)
+            else:
+                self._log(Log.WARN, "Low memory system (%f GB/core)! Not running hackbench" % ratio)
+                self._donotrun = True
 
         sysTop = SysTopology()
         # get the number of nodes
@@ -198,6 +203,9 @@ def ModuleParameters():
     return {"jobspercore": {"descr": "Number of working threads per CPU core",
                             "default": 5,
                             "metavar": "NUM"},
+            "runlowmem": {"descr": "Run hackbench on machines where low memory is detected",
+                            "default": False,
+                            "metavar": "True|False"}
             }
 
 
Signature · 1 line
2.31.1