aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-02-17 10:17:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-02-17 10:17:14 +0200
commit5ca542f427169b4fa049ff832184d23670887c64 (patch)
tree6e839698a24bbc1f01540882fca7ab5b3a8e53c7
parent645450d27b340439878a073c67a477bb380c15af (diff)
Disable RAM dividing heuristics
-rw-r--r--bbot/agent/machine.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx
index 41d124c..c884f8c 100644
--- a/bbot/agent/machine.cxx
+++ b/bbot/agent/machine.cxx
@@ -266,12 +266,20 @@ namespace bbot
// heuristics that we will use is 4G or 1G per CPU, whichever is greater
// and the rest divide equally between the host and the VM.
//
+ // But the experience showed that we actually want to be able to precisely
+ // control the amount of RAM assigned to VMs (e.g., for tmpfs size) and
+ // without back-fudging for this heuristics.
+ //
+#if 0
size_t ram ((cpus < 4 ? 4 : cpus) * 1024 * 1024); // Kb.
if (ram > ops.ram ())
ram = ops.ram ();
else
ram += (ops.ram () - ram) / 2;
+#else
+ size_t ram (ops.ram ());
+#endif
// If we have options, use that instead of the default network and
// disk configuration.