From 5ca542f427169b4fa049ff832184d23670887c64 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 17 Feb 2021 10:17:14 +0200 Subject: Disable RAM dividing heuristics --- bbot/agent/machine.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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. -- cgit v1.1