diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-03-06 11:11:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-03-06 11:11:04 +0200 |
commit | e0805007423244218514b6dfec74b89067c7c468 (patch) | |
tree | 1e6ef6bc9897790dadeecf21f131279a141d369d /bbot/agent | |
parent | e98b7d27bc969762ec4952f82634bb6e6375b8c2 (diff) |
Rename --ram agent option to --build-ram, add --auxiliary-ram
Diffstat (limited to 'bbot/agent')
-rw-r--r-- | bbot/agent/agent.cli | 18 | ||||
-rw-r--r-- | bbot/agent/agent.cxx | 3 | ||||
-rw-r--r-- | bbot/agent/machine.cxx | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/bbot/agent/agent.cli b/bbot/agent/agent.cli index eb3553d..060cba0 100644 --- a/bbot/agent/agent.cli +++ b/bbot/agent/agent.cli @@ -189,10 +189,24 @@ namespace bbot "Number of CPUs (threads) to use, 1 by default." } - size_t --ram (1024 * 1024) // 1G + size_t --build-ram (4 * 1024 * 1024) // 4GiB { "<num>", - "Amount of RAM (in kB) to use, 1G by default." + "Amount of RAM (in KiB) to use for the build machine, 4GiB by default." + } + + size_t --auxiliary-ram + { + "<num>", + "Amount of RAM (in KiB) to use for auxiliary machines. To disable + running auxiliary machines, specify \cb{0}. If unspecified, then + currently the behavior is the same as specifying \cb{0} but this + may change in the future (for example, to support a more dynamic + allocation strategy)." + + // Note: it's not going to be easy to set it to unspecified in + // bbot-agent@.service so we may have to invent some special value, + // like `auto`. } string --bridge = "br1" diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx index 062fd68..74f461c 100644 --- a/bbot/agent/agent.cxx +++ b/bbot/agent/agent.cxx @@ -1863,7 +1863,8 @@ try dr << info << "cpu(s) " << ops.cpu () << - info << "ram(kB) " << ops.ram () << + info << "build ram(KiB) " << ops.build_ram () << + info << "auxil ram(KiB) " << ops.auxiliary_ram () << info << "bridge " << ops.bridge (); if (fingerprint) diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx index 84916f6..2d9ad4f 100644 --- a/bbot/agent/machine.cxx +++ b/bbot/agent/machine.cxx @@ -278,7 +278,7 @@ namespace bbot else ram += (ops.ram () - ram) / 2; #else - size_t ram (ops.ram ()); + size_t ram (ops.build_ram ()); #endif // If we have options, use that instead of the default network and |