From 6052579445c31903aee02a205ef8b66adb6098c6 Mon Sep 17 00:00:00 2001 From: Zou Xinyi Date: Thu, 23 Jan 2025 17:46:44 +0800 Subject: [PATCH 1/3] 1 --- be/src/runtime/workload_group/workload_group.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/be/src/runtime/workload_group/workload_group.cpp b/be/src/runtime/workload_group/workload_group.cpp index d68a69cc98135d..6e115fdb6aa07a 100644 --- a/be/src/runtime/workload_group/workload_group.cpp +++ b/be/src/runtime/workload_group/workload_group.cpp @@ -219,20 +219,22 @@ int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile* profile, std::string cancel_str = ""; if (is_minor_gc) { cancel_str = fmt::format( - "MinorGC kill overcommit query, wg id:{}, name:{}, used:{}, limit:{}, " + "Process memory not enough, in WorkloadGroup[id:{}, name:{}, used:{}, limit:{}, " + "enable_memory_overcommit:true], " "backend:{}.", _id, _name, MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); } else { if (_enable_memory_overcommit) { cancel_str = fmt::format( - "FullGC release wg overcommit mem, wg id:{}, name:{}, " - "used:{},limit:{},backend:{}.", + "Process memory not enough, in WorkloadGroup[id:{}, name:{}, used:{}, " + "limit:{}, enable_memory_overcommit:true]. backend:{}.", _id, _name, MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); } else { cancel_str = fmt::format( - "GC wg for hard limit, wg id:{}, name:{}, used:{}, limit:{}, " + "WorkloadGroup memory exceed limit, in WorkloadGroup[id:{}, name:{}, used:{}, " + "limit:{}, enable_memory_overcommit:false]. " "backend:{}.", _id, _name, MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); @@ -245,7 +247,7 @@ int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile* profile, "Execute " "again after enough memory, details see be.INFO.", cancel_str, label, MemCounter::print_bytes(mem_consumption), - GlobalMemoryArbitrator::process_limit_exceeded_errmsg_str()); + GlobalMemoryArbitrator::process_mem_log_str()); }; auto cancel_top_usage_str = [cancel_str](int64_t mem_consumption, const std::string& label) { return fmt::format( @@ -253,7 +255,7 @@ int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile* profile, "again " "after enough memory, details see be.INFO.", cancel_str, label, MemCounter::print_bytes(mem_consumption), - GlobalMemoryArbitrator::process_soft_limit_exceeded_errmsg_str()); + GlobalMemoryArbitrator::process_mem_log_str()); }; LOG(INFO) << fmt::format( From cd05f916e79fea9f3cfa19780566c5a9bf222df9 Mon Sep 17 00:00:00 2001 From: Zou Xinyi Date: Thu, 23 Jan 2025 18:38:12 +0800 Subject: [PATCH 2/3] 2 --- .../runtime/workload_group/workload_group.cpp | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/be/src/runtime/workload_group/workload_group.cpp b/be/src/runtime/workload_group/workload_group.cpp index 6e115fdb6aa07a..888bdcbb17950f 100644 --- a/be/src/runtime/workload_group/workload_group.cpp +++ b/be/src/runtime/workload_group/workload_group.cpp @@ -219,43 +219,42 @@ int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile* profile, std::string cancel_str = ""; if (is_minor_gc) { cancel_str = fmt::format( - "Process memory not enough, in WorkloadGroup[id:{}, name:{}, used:{}, limit:{}, " - "enable_memory_overcommit:true], " - "backend:{}.", - _id, _name, MemCounter::print_bytes(used_memory), - MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); + "Process memory not enough, {}, Memory GC in WorkloadGroup[id:{}, name:{}, " + "used:{}, limit:{}, enable_memory_overcommit:true], backend:{}.", + GlobalMemoryArbitrator::process_mem_log_str(), _id, _name, + MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit), + BackendOptions::get_localhost()); } else { if (_enable_memory_overcommit) { cancel_str = fmt::format( - "Process memory not enough, in WorkloadGroup[id:{}, name:{}, used:{}, " - "limit:{}, enable_memory_overcommit:true]. backend:{}.", - _id, _name, MemCounter::print_bytes(used_memory), - MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); + "Process memory not enough, {}, Memory GC in WorkloadGroup[id:{}, name:{}, " + "used:{}, limit:{}, enable_memory_overcommit:true], backend:{}.", + GlobalMemoryArbitrator::process_mem_log_str(), _id, _name, + MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit), + BackendOptions::get_localhost()); } else { cancel_str = fmt::format( "WorkloadGroup memory exceed limit, in WorkloadGroup[id:{}, name:{}, used:{}, " - "limit:{}, enable_memory_overcommit:false]. " - "backend:{}.", + "limit:{}, enable_memory_overcommit:false], {}, backend:{}.", _id, _name, MemCounter::print_bytes(used_memory), - MemCounter::print_bytes(_memory_limit), BackendOptions::get_localhost()); + MemCounter::print_bytes(_memory_limit), + GlobalMemoryArbitrator::process_mem_log_str(), BackendOptions::get_localhost()); } } auto cancel_top_overcommit_str = [cancel_str](int64_t mem_consumption, const std::string& label) { return fmt::format( - "{} cancel top memory overcommit tracker <{}> consumption {}. details:{}, " + "{} cancel top memory overcommit tracker <{}> consumption {}. " "Execute " "again after enough memory, details see be.INFO.", - cancel_str, label, MemCounter::print_bytes(mem_consumption), - GlobalMemoryArbitrator::process_mem_log_str()); + cancel_str, label, MemCounter::print_bytes(mem_consumption)); }; auto cancel_top_usage_str = [cancel_str](int64_t mem_consumption, const std::string& label) { return fmt::format( - "{} cancel top memory used tracker <{}> consumption {}. details:{}, Execute " + "{} cancel top memory used tracker <{}> consumption {}. Execute " "again " "after enough memory, details see be.INFO.", - cancel_str, label, MemCounter::print_bytes(mem_consumption), - GlobalMemoryArbitrator::process_mem_log_str()); + cancel_str, label, MemCounter::print_bytes(mem_consumption)); }; LOG(INFO) << fmt::format( From 588221f012f9d223329c1223ade21ca7427f6e58 Mon Sep 17 00:00:00 2001 From: Zou Xinyi Date: Thu, 23 Jan 2025 18:39:27 +0800 Subject: [PATCH 3/3] 3 --- be/src/runtime/workload_group/workload_group.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/runtime/workload_group/workload_group.cpp b/be/src/runtime/workload_group/workload_group.cpp index 888bdcbb17950f..3574f9268e5aad 100644 --- a/be/src/runtime/workload_group/workload_group.cpp +++ b/be/src/runtime/workload_group/workload_group.cpp @@ -234,7 +234,8 @@ int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile* profile, BackendOptions::get_localhost()); } else { cancel_str = fmt::format( - "WorkloadGroup memory exceed limit, in WorkloadGroup[id:{}, name:{}, used:{}, " + "WorkloadGroup memory exceed limit, Memory GC in in WorkloadGroup[id:{}, " + "name:{}, used:{}, " "limit:{}, enable_memory_overcommit:false], {}, backend:{}.", _id, _name, MemCounter::print_bytes(used_memory), MemCounter::print_bytes(_memory_limit),