-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Make running profile clearer and more intuitive to improve usability (#3365) #3383
Conversation
…3365) This CL mainly made the following modifications: 1. Delete Invalid method in Running Profile Class. 2. Move Memlimit Counter from blockmgr to frgment and add PeakMemUsage Counter 3. Fix the bug of buffer pool memlimit counter 4. Call compute_time_in_profile() before pretty_print() to show the _local_time_percent without child running profile 5. Add TransferThread ThreadToken count in AveThreadToken Counter
@@ -1038,6 +1038,7 @@ Status OlapScanNode::normalize_binary_predicate(SlotDescriptor* slot, ColumnValu | |||
|
|||
void OlapScanNode::transfer_thread(RuntimeState* state) { | |||
// scanner open pushdown to scanThread | |||
state->resource_pool()->acquire_thread_token(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell the side effect of this operation? Will this thread hang if there is not enough thread resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this operation just to Make AverageThreadTokens more accurate
- AverageThreadTokens: 1.00
Do not warry thread hang on this operation。
acquire_thread_token() just do a lightweight add operation without doing the really thread assignment
inline void ThreadResourceMgr::ResourcePool::acquire_thread_token() {
__sync_fetch_and_add(&_num_threads, 1);
}
be/src/runtime/runtime_state.cpp
Outdated
_query_mem_tracker.reset( | ||
new MemTracker(bytes_limit, runtime_profile()->name(), _exec_env->process_mem_tracker())); | ||
new MemTracker(&_profile, bytes_limit, runtime_profile()->name(), _exec_env->process_mem_tracker())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add profile for this memory tracker, why not _instance_mem_tracker
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,I check code。the _instance_mem_tracker
is more appropriate
change profile counter to _instance_mem_tracker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…usability (apache#3365) (apache#3383) This CL mainly made the following modifications: 1. Delete Invalid method in Running Profile Class. 2. Move Memlimit Counter from blockmgr to fragment and add PeakMemUsage Counter 3. Fix the bug of buffer pool memlimit counter 4. Call compute_time_in_profile() before pretty_print() to show the _local_time_percent without child running profile 5. Add TransferThread ThreadToken count in AveThreadToken Counter
This CL mainly made the following modifications:
ISSUE: #3365