-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[enhancement](file-cache) limit the file cache handle num and init the file cache concurrently #22919
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
@@ -205,5 +207,21 @@ size_t IFileCache::file_reader_cache_size() { | |||
return s_file_name_to_reader.size(); | |||
} | |||
|
|||
void IFileCache::init() { | |||
struct rlimit limit; | |||
if (getrlimit(RLIMIT_NOFILE, &limit) != 0) { |
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.
So if failed to get the rlimit, config::file_cache_max_file_reader_cache_size
will be not used to set _max_file_reader_cache_size
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 fail, the LOG(FATAL)
will crash the BE.
cc6dba3
to
b9b76b1
Compare
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run external |
1 similar comment
run external |
run buildall |
run external |
1 similar comment
run external |
(From new machine)TeamCity pipeline, clickbench performance test result: |
b9b76b1
to
2506c5f
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
(From new machine)TeamCity pipeline, clickbench performance test result: |
LGTM |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
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
…e file cache concurrently (#22919) 1. the real value of BE config `file_cache_max_file_reader_cache_size` will be the 1/3 of process's max open file number. 2. use thread pool to create or init the file cache concurrently. To solve the issue that when there are lots of files in file cache dir, the starting time of BE will be very slow because it will traverse all file cache dirs sequentially.
…e file cache concurrently (apache#22919) 1. the real value of BE config `file_cache_max_file_reader_cache_size` will be the 1/3 of process's max open file number. 2. use thread pool to create or init the file cache concurrently. To solve the issue that when there are lots of files in file cache dir, the starting time of BE will be very slow because it will traverse all file cache dirs sequentially.
Proposed changes
file_cache_max_file_reader_cache_size
will be the 1/3 of process's max open file number.To solve the issue that when there are lots of files in file cache dir, the starting time of BE will be very slow because
it will traverse all file cache dirs sequentially.
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...