diff options
-rw-r--r-- | bbot/agent/machine.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx index 16f0525..84916f6 100644 --- a/bbot/agent/machine.cxx +++ b/bbot/agent/machine.cxx @@ -244,20 +244,21 @@ namespace bbot // log = path ("/tmp/" + path::traits_type::temp_name (name) + ".log"); - // Map logical CPUs to sockets/cores/threads keeping the number of and - // cores even. Failed that, QEMU just makes it a machine with that number - // of sockets and some operating systems (like Windows) can only do two. + // Map logical CPUs to sockets/cores/threads keeping the number of sockets + // and cores even. Failed that, QEMU just makes it a machine with that + // number of sockets and some operating systems (like Windows) can only do + // two. // // Note that for best results you may want to adjust (e.g., by over- // committing) the number of CPUs to be power of 2. // size_t cpus (bcpus ? *bcpus : ops.cpu ()), cores (cpus); - size_t sockets (cores >= 16 && cores % 4 == 0 ? 2 : - cores >= 64 && cores % 8 == 0 ? 4 : 1); + size_t sockets (cores >= 256 && cores % 8 == 0 ? 4 : + cores >= 128 && cores % 4 == 0 ? 2 : 1); cores /= sockets; - size_t threads (cores >= 8 && cores % 4 == 0 ? 2 : 1); + size_t threads (cores >= 16 && cores % 4 == 0 ? 2 : 1); cores /= threads; // We probably don't want to commit all the available RAM to the VM since |