From f3a9d040da66f9bf583e3183998cb3a8525596bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 5 Oct 2020 21:04:50 +0200 Subject: [PATCH] Cap the global thread pool at 16 threads. --- Core/Config.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 0efc72f014..95daf8a869 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -396,7 +396,9 @@ std::string CreateRandMAC() { } static int DefaultNumWorkers() { - return cpu_info.num_cores; + // Let's cap the global thread pool at 16 threads. Nothing we do really should have much + // use for more... + return std::min(16, cpu_info.num_cores); } static int DefaultCpuCore() {