-
Notifications
You must be signed in to change notification settings - Fork 409
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
Tracking memory usage of PagePacket
and RemotePage
in RN fetching pages
#7667
Conversation
cd1a65b
to
1ab9fa9
Compare
PagePacket
and RemotePage
in RN fetching pages
a5fbf8d
to
4db3c7d
Compare
/run-all-tests |
dbms/src/Common/MemoryTracker.cpp
Outdated
@@ -155,6 +171,11 @@ void MemoryTracker::alloc(Int64 size, bool check_memory_limit) | |||
formatReadableSizeWithBinarySuffix(current_limit)); | |||
} | |||
|
|||
if (sub_root_of_query_storage_task_mem_trackers) |
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.
to achive a more detaied debug info, how about printing root_of_non_query
, sub_root_of_query_storage_task_mem_trackers
, fetch_pages_mem_tracker
in every case.
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.
Format memory usage of these three MemoryTrackers in storageMemoryUsageDetail
and add the message in every exception in MemoryTracker.
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.
Exception message example:
Code: 0, e.displayText() = DB::TiFlashException: Memory limit exceeded caused by 'out of memory quota for data computing' : would use 756.00 B for data computing (attempt to allocate chunk of 256 bytes), limit of memory for data computing: 512.00 B. Memory usage of storage: non-query: peak=0.00 B, amount=0.00 B; query-storage-task: peak=0.00 B, amount=0.00 B; fetch-pages: peak=0.00 B, amount=0.00 B.
dbms/src/Common/MemoryTracker.cpp
Outdated
@@ -65,6 +71,13 @@ static Poco::Logger * getLogger() | |||
return logger; | |||
} | |||
|
|||
static String memoryUsageDetail() |
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.
name is too generic
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.
Rename this function to storageMemoryUsageDetail
.
/run-unit-test |
/run-integration-test |
/run-unit-test |
/run-integration-test |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bestwoody, JaySon-Huang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/merge |
/approved |
/run-integration-test |
/run-unit-test |
What problem does this PR solve?
Issue Number: ref #7670 ref #7628
Problem Summary: Tracking memory usage of RN fetching pages.
What is changed and how it works?
sub_root_of_query_storage_task_mem_trackers
. If a memory tracker of storage tasks is driven by query, it should inheritsub_root_of_query_storage_task_mem_trackers
.fetch_pages_mem_tracker
for tracking memory usage of fetching pages. It inherit fromsub_root_of_query_storage_task_mem_trackers
.PagePacket
andRemotePage
in fetching pages.sub_root_of_query_storage_task_mem_trackers
andfetch_pages_mem_tracker
when memory usage exceeded.Check List
Tests
DeltaValueSpace
large.profiles.default.max_memory_usage_for_all_queries
to 0.2.select count(*) from t
.Side effects
Documentation
Release note