mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 12:01:58 +00:00
Enable GlobalOvercommitTracker by default
This commit is contained in:
parent
a499a1e024
commit
ba028cc395
@ -165,17 +165,17 @@ void GlobalOvercommitTracker::pickQueryToExcludeImpl()
|
||||
for (auto const & query : process_list->processes)
|
||||
{
|
||||
if (query.isKilled())
|
||||
return;
|
||||
continue;
|
||||
|
||||
Int64 user_soft_limit = 0;
|
||||
if (auto const * user_process_list = query.getUserProcessList())
|
||||
user_soft_limit = user_process_list->user_memory_tracker.getSoftLimit();
|
||||
if (user_soft_limit == 0)
|
||||
return;
|
||||
continue;
|
||||
|
||||
auto * memory_tracker = query.getMemoryTracker();
|
||||
if (!memory_tracker)
|
||||
return;
|
||||
continue;
|
||||
auto ratio = memory_tracker->getOvercommitRatio(user_soft_limit);
|
||||
LOG_DEBUG(logger, "Query has ratio {}/{}", ratio.committed, ratio.soft_limit);
|
||||
if (current_ratio < ratio)
|
||||
|
@ -362,7 +362,7 @@ static constexpr UInt64 operator""_Gb(unsigned long long value)
|
||||
M(UInt64, max_memory_usage, 0, "Maximum memory usage for processing of single query. Zero means unlimited.", 0) \
|
||||
M(UInt64, max_guaranteed_memory_usage, 10_Gb, "Maximum guaranteed memory usage for processing of single query. It represents soft limit. Zero means unlimited.", 0) \
|
||||
M(UInt64, max_memory_usage_for_user, 0, "Maximum memory usage for processing all concurrently running queries for the user. Zero means unlimited.", 0) \
|
||||
M(UInt64, max_guaranteed_memory_usage_for_user, 0, "Maximum guaranteed memory usage for processing all concurrently running queries for the user. It represents soft limit. Zero means unlimited.", 0) \
|
||||
M(UInt64, max_guaranteed_memory_usage_for_user, 10_Gb, "Maximum guaranteed memory usage for processing all concurrently running queries for the user. It represents soft limit. Zero means unlimited.", 0) \
|
||||
M(UInt64, max_untracked_memory, (4 * 1024 * 1024), "Small allocations and deallocations are grouped in thread local variable and tracked or profiled only when amount (in absolute value) becomes larger than specified value. If the value is higher than 'memory_profiler_step' it will be effectively lowered to 'memory_profiler_step'.", 0) \
|
||||
M(UInt64, memory_profiler_step, (4 * 1024 * 1024), "Whenever query memory usage becomes larger than every next step in number of bytes the memory profiler will collect the allocating stack trace. Zero means disabled memory profiler. Values lower than a few megabytes will slow down query processing.", 0) \
|
||||
M(Float, memory_profiler_sample_probability, 0., "Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type. The probability is for every alloc/free regardless to the size of the allocation. Note that sampling happens only when the amount of untracked memory exceeds 'max_untracked_memory'. You may want to set 'max_untracked_memory' to 0 for extra fine grained sampling.", 0) \
|
||||
|
Loading…
Reference in New Issue
Block a user