Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions be/src/runtime/workload_group/workload_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,41 +216,43 @@ 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:{}, "
"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(
"FullGC release wg overcommit mem, wg id:{}, name:{}, "
"used:{},limit:{},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(
"GC wg for hard limit, wg id:{}, name:{}, used:{}, limit:{}, "
"backend:{}.",
"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), 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_limit_exceeded_errmsg_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_soft_limit_exceeded_errmsg_str());
cancel_str, label, MemCounter::print_bytes(mem_consumption));
};

LOG(INFO) << fmt::format(
Expand Down
Loading