Skip to content
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

support parallel directory summary #3340

Merged
merged 5 commits into from
Mar 16, 2023
Merged

support parallel directory summary #3340

merged 5 commits into from
Mar 16, 2023

Conversation

Hexilee
Copy link
Contributor

@Hexilee Hexilee commented Mar 16, 2023

Both of strict summary and fast summary should run readdir parallelly.

Performance improvement

In engines that support high concurrency, such as TiKV, the parallel summary feature has become 20 times faster than before.

image

@Hexilee Hexilee requested review from davies and zhijian-pro March 16, 2023 08:38
summary.Dirs++
if recursive {
if st := fastGetSummary(r, ctx, e.Inode, summary, recursive); st != 0 {
const concurrency = 1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's too high, may DOS the database, 20-50 should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Patch coverage: 38.29% and project coverage change: +0.06 🎉

Comparison is base (f8cb07d) 55.13% compared to head (4684594) 55.20%.

❗ Current head 4684594 differs from pull request most recent head 2168110. Consider uploading reports for the commit 2168110 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3340      +/-   ##
==========================================
+ Coverage   55.13%   55.20%   +0.06%     
==========================================
  Files         142      142              
  Lines       34256    34286      +30     
==========================================
+ Hits        18888    18926      +38     
+ Misses      13369    13363       -6     
+ Partials     1999     1997       -2     
Impacted Files Coverage Δ
pkg/meta/utils.go 54.48% <38.29%> (+0.56%) ⬆️

... and 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@davies davies merged commit 747e567 into main Mar 16, 2023
@davies davies deleted the parallel-summary branch March 16, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants