MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getMaxThreadsForAvailableMemory

Function getMaxThreadsForAvailableMemory

src/Common/MemoryTrackerUtils.cpp:90–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 return max_threads;
89}
90size_t getMaxThreadsForAvailableMemory(size_t max_threads, UInt64 min_free_per_thread)
91{
92 size_t effective_threads = getMaxThreadsForAvailableMemoryImpl(max_threads, min_free_per_thread);
93 if (effective_threads != max_threads)
94 LOG_DEBUG(getLogger("MemoryTrackerUtils"), "Lower number of threads for query to {} ({} requested)", effective_threads, max_threads);
95 return effective_threads;
96}

Callers 15

getAggregatorParamsFunction · 0.85
addAggregationStepFunction · 0.85
addMergingAggregatedStepFunction · 0.85
addWindowStepsFunction · 0.85
buildPlanForUnionNodeMethod · 0.85
buildQueryPlanMethod · 0.85
buildQueryPlanMethod · 0.85

Calls 2

getLoggerFunction · 0.70

Tested by

no test coverage detected