-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[fix](filecache) dedup need_update_lru_block queue to reduce memory consumption #58903
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
base: master
Are you sure you want to change the base?
[fix](filecache) dedup need_update_lru_block queue to reduce memory consumption #58903
Conversation
this queue contains large amount of duplicated items dedup this queue to shrink memory. orders are updated in batch and ignore internal orders within a batch. Signed-off-by: zhengyu <[email protected]>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
| if (drained >= limit) { | ||
| break; | ||
| } | ||
| std::lock_guard lock(shard.mutex); |
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.
why not just "drain" the entire shard instead of draining one by one.
we dont actually care about the order here.
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.
because we want release the _mutex for a while if the for loop takes too long.
|
|
||
| struct Shard { | ||
| std::mutex mutex; | ||
| std::unordered_map<FileBlock*, FileBlockSPtr> entries; |
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.
do we need sharedptr to keep reference of file block?
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 we do for safety reasons
TPC-H: Total hot run time: 35373 ms |
TPC-DS: Total hot run time: 180912 ms |
ClickBench: Total hot run time: 27.17 s |
Signed-off-by: zhengyu <[email protected]>
Signed-off-by: freemandealer <[email protected]>
|
run buildall |
TPC-H: Total hot run time: 35346 ms |
TPC-DS: Total hot run time: 181016 ms |
ClickBench: Total hot run time: 27.71 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run cloud_p0 |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
this queue contains large amount of duplicated items dedup this queue to shrink memory. orders are updated in batch and ignore internal orders within a batch.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)