-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[fix](cloud) release fd after clear file cache #50555
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
[fix](cloud) release fd after clear file cache #50555
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
originally, fd is still hold by FDCache after clear file cache (sync) will cause disk space never reaching zero Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
6fdf686
to
f4ccae6
Compare
run buildall |
TPC-H: Total hot run time: 34183 ms
|
TPC-DS: Total hot run time: 192162 ms
|
ClickBench: Total hot run time: 28.59 s
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression P0 && UT Coverage ReportIncrement line coverage Increment coverage report
|
be/src/io/cache/block_file_cache.cpp
Outdated
@@ -2077,6 +2077,17 @@ std::string BlockFileCache::clear_file_cache_directly() { | |||
int64_t normal_queue_size = _normal_queue.get_elements_num(cache_lock); | |||
int64_t disposible_queue_size = _disposable_queue.get_elements_num(cache_lock); | |||
int64_t ttl_queue_size = _ttl_queue.get_elements_num(cache_lock); | |||
|
|||
if (config::clear_fd_after_clear_file_cache) { |
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.
no need an extra config, just release them directly after files are deleted.
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.
in case of performance and robust regression. we can remove this config if it's stable.
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.
it seems there is no performance problem, line 2069 auto s = _storage->clear(clear_msg);
is blocking and time-consuming job before removing FDs.
to avoid too many knobs, keep it simple if the behavior is determined.
we have too many knobs for file cache, too many.
run buildall |
TPC-H: Total hot run time: 33926 ms
|
TPC-DS: Total hot run time: 184650 ms
|
ClickBench: Total hot run time: 29.28 s
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
run cloud_p0 |
Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 34534 ms
|
TPC-DS: Total hot run time: 192804 ms
|
ClickBench: Total hot run time: 29.14 s
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
run buildall |
TPC-H: Total hot run time: 34153 ms
|
TPC-DS: Total hot run time: 186465 ms
|
ClickBench: Total hot run time: 28.88 s
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
run external |
run p0 |
run external |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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
originally, fd is still hold by FDCache after clear file cache (sync) will cause disk space never reaching zero Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
originally, fd is still hold by FDCache after clear file cache (sync) will cause disk space never reaching zero Signed-off-by: zhengyu <zhangzhengyu@selectdb.com>
originally, fd is still hold by FDCache after clear file cache (sync) will cause disk space never reaching zero
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)