From 213f84580fc86662cfb7638bf9402e144eb1298b Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 2 Jan 2020 10:48:51 +0300 Subject: [PATCH] Lower number of threads. --- dbms/src/Core/SettingsCollection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbms/src/Core/SettingsCollection.cpp b/dbms/src/Core/SettingsCollection.cpp index 60c18a19fa7..aa5fbcd58ef 100644 --- a/dbms/src/Core/SettingsCollection.cpp +++ b/dbms/src/Core/SettingsCollection.cpp @@ -216,6 +216,10 @@ void SettingMaxThreads::setAuto() UInt64 SettingMaxThreads::getAutoValue() const { static auto res = getNumberOfPhysicalCPUCores(); + + if (res > 32) + res /= 2; + return res; }