mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Removed logging code
This commit is contained in:
parent
159ea14739
commit
7cc63f3eed
@ -1119,16 +1119,12 @@ int Server::main(const std::vector<std::string> & /*args*/)
|
||||
global_context->setMaxPartitionSizeToDrop(config->getUInt64("max_partition_size_to_drop"));
|
||||
|
||||
if (config->has("total_max_threads")) {
|
||||
auto adqm_log = &Poco::Logger::get("ADQM");
|
||||
auto total_max_threads = config->getInt("total_max_threads", 0);
|
||||
LOG_DEBUG(adqm_log,"From config.xml total_max_threads: {}", total_max_threads);
|
||||
if (total_max_threads == -1) {
|
||||
// Based on tests total_max_threads has an optimal value when it's about two times of logical CPU cores
|
||||
constexpr size_t thread_factor = 2;
|
||||
LOG_DEBUG(adqm_log,"number of logical cores: {}", std::thread::hardware_concurrency());
|
||||
total_max_threads = std::thread::hardware_concurrency() * thread_factor;
|
||||
}
|
||||
LOG_DEBUG(adqm_log,"Finally total_max_threads: {}", total_max_threads);
|
||||
global_context->getProcessList().setGlobalMaxThreads(total_max_threads);
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <Common/logger_useful.h>
|
||||
#include <chrono>
|
||||
#include <Poco/Logger.h>
|
||||
#include <Loggers/Loggers.h>
|
||||
|
||||
namespace CurrentMetrics
|
||||
{
|
||||
@ -72,10 +70,6 @@ static bool isUnlimitedQuery(const IAST * ast)
|
||||
ProcessList::EntryPtr ProcessList::insert(const String & query_, const IAST * ast, ContextPtr query_context)
|
||||
{
|
||||
EntryPtr res;
|
||||
auto adqm_log = &Poco::Logger::get("ADQM");
|
||||
LOG_DEBUG(adqm_log,"Inserting query into process list: {}", query_);
|
||||
LOG_DEBUG(adqm_log,"Num of concurrent queries: {}", processes.size());
|
||||
LOG_DEBUG(adqm_log,"Global Num Threads: {}", getTotalNumThreads());
|
||||
|
||||
const ClientInfo & client_info = query_context->getClientInfo();
|
||||
const Settings & settings = query_context->getSettingsRef();
|
||||
|
@ -502,30 +502,19 @@ size_t QueryPipelineBuilder::getNumThreads() const
|
||||
{
|
||||
auto num_threads = pipe.maxParallelStreams();
|
||||
|
||||
auto adqm_log = &Poco::Logger::get("ADQM");
|
||||
LOG_DEBUG(adqm_log,"maxParallelStreams: {}", num_threads);
|
||||
LOG_DEBUG(adqm_log,"max_threads: {}", max_threads);
|
||||
|
||||
if (max_threads) //-V1051
|
||||
num_threads = std::min(num_threads, max_threads);
|
||||
|
||||
LOG_DEBUG(adqm_log,"Recommended num threads: {}", num_threads);
|
||||
auto total_max_threads = process_list_element->getContext()->getProcessList().getTotalMaxThreads();
|
||||
if (total_max_threads && process_list_element) {
|
||||
LOG_DEBUG(adqm_log,"Total number of threads from config: {}", total_max_threads);
|
||||
LOG_DEBUG(adqm_log,"Current total num threads: {}",
|
||||
process_list_element->getContext()->getProcessList().getTotalNumThreads());
|
||||
size_t current_total_num_threads = process_list_element->getContext()->getProcessList().getTotalNumThreads();
|
||||
size_t total_available_threads = 0;
|
||||
if (total_max_threads > current_total_num_threads)
|
||||
total_available_threads = total_max_threads - current_total_num_threads;
|
||||
LOG_DEBUG(adqm_log,"Total available threads: {}", total_available_threads);
|
||||
num_threads = std::min(num_threads, total_available_threads);
|
||||
LOG_DEBUG(adqm_log,"Recommended num threads: {}", num_threads);
|
||||
}
|
||||
|
||||
num_threads = std::max<size_t>(1, num_threads);
|
||||
LOG_DEBUG(adqm_log,"Finally num threads: {}", num_threads);
|
||||
return num_threads;
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
#include <Storages/TableLockHolder.h>
|
||||
#include <Interpreters/Context_fwd.h>
|
||||
#include <Interpreters/ProcessList.h>
|
||||
#include <Poco/Logger.h>
|
||||
#include <Loggers/Loggers.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
|
Loading…
Reference in New Issue
Block a user