Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement](spill) improve spill log printing #34729

Merged
merged 2 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
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
15 changes: 8 additions & 7 deletions be/src/pipeline/pipeline_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ bool PipelineTask::should_revoke_memory(RuntimeState* state, int64_t revocable_m
wg->check_mem_used(&is_wg_mem_low_water_mark, &is_wg_mem_high_water_mark);
if (is_wg_mem_high_water_mark) {
if (revocable_mem_bytes > min_revocable_mem_bytes) {
LOG_EVERY_N(INFO, 10) << "revoke memory, hight water mark";
VLOG_DEBUG << "query " << print_id(state->query_id())
<< " revoke memory, hight water mark";
return true;
}
return false;
Expand All @@ -335,12 +336,12 @@ bool PipelineTask::should_revoke_memory(RuntimeState* state, int64_t revocable_m
mem_limit_of_op = query_weighted_limit / big_memory_operator_num;
}

LOG_EVERY_N(INFO, 10) << "revoke memory, low water mark, revocable_mem_bytes: "
<< PrettyPrinter::print_bytes(revocable_mem_bytes)
<< ", mem_limit_of_op: "
<< PrettyPrinter::print_bytes(mem_limit_of_op)
<< ", min_revocable_mem_bytes: "
<< PrettyPrinter::print_bytes(min_revocable_mem_bytes);
LOG_EVERY_T(INFO, 1) << "query " << print_id(state->query_id())
<< " revoke memory, low water mark, revocable_mem_bytes: "
<< PrettyPrinter::print_bytes(revocable_mem_bytes)
<< ", mem_limit_of_op: " << PrettyPrinter::print_bytes(mem_limit_of_op)
<< ", min_revocable_mem_bytes: "
<< PrettyPrinter::print_bytes(min_revocable_mem_bytes);
return (revocable_mem_bytes > mem_limit_of_op ||
revocable_mem_bytes > min_revocable_mem_bytes);
} else {
Expand Down
4 changes: 2 additions & 2 deletions be/src/runtime/workload_group/workload_group_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void WorkloadGroupMgr::refresh_wg_memory_info() {
PrettyPrinter::print(process_mem_used, TUnit::BYTES),
PrettyPrinter::print(sys_mem_available, TUnit::BYTES),
PrettyPrinter::print(all_queries_mem_used, TUnit::BYTES));
VLOG_EVERY_N(1, 10) << debug_msg;
LOG_EVERY_T(INFO, 10) << debug_msg;
}

for (auto& wg : _workload_groups) {
Expand Down Expand Up @@ -264,7 +264,7 @@ void WorkloadGroupMgr::refresh_wg_memory_info() {
}
}
if (wg_mem_info.is_high_wartermark || wg_mem_info.is_low_wartermark) {
VLOG_EVERY_N(1, 10) << debug_msg;
LOG_EVERY_T(INFO, 1) << debug_msg;
}
}
}
Expand Down
Loading