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

perf(metarepos): add mrpb.StorageNodeUncommitReport pool #425

Closed
wants to merge 1 commit into from

Conversation

ijsong
Copy link
Member

@ijsong ijsong commented Apr 23, 2023

What this PR does

This patch adds an mrpb.StorageNodeUncommitReport pool, which is
proto/mrpb.storageNodeUncommitReportPool. It reduces heap objects allocated repeatedly whenever
processing reports received from storage nodes.

Below heap profiling is the previous result.

      flat  flat%   sum%        cum   cum%
  70865580  8.38% 44.73%   71293773  8.43%  github.com/kakao/varlog/internal/metarepos.(*reportCollectExecutor).processReport

Now here it is after applying this patch.

      flat  flat%   sum%        cum   cum%
  20734504  2.10% 75.92%   42122814  4.26%  github.com/kakao/varlog/internal/metarepos.(*reportCollectExecutor).processReport

@ijsong
Copy link
Member Author

ijsong commented Apr 23, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@ijsong ijsong self-assigned this Apr 23, 2023
@ijsong ijsong marked this pull request as draft April 23, 2023 17:00
@codecov-commenter
Copy link

codecov-commenter commented Apr 23, 2023

Codecov Report

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

Comparison is base (9e00509) 63.68% compared to head (fd4dd81) 63.74%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@              Coverage Diff               @@
##           otel_label     #425      +/-   ##
==============================================
+ Coverage       63.68%   63.74%   +0.06%     
==============================================
  Files             131      131              
  Lines           17894    17894              
==============================================
+ Hits            11395    11406      +11     
+ Misses           5954     5945       -9     
+ Partials          545      543       -2     
Impacted Files Coverage Δ
internal/metarepos/report_collector.go 78.19% <100.00%> (+0.86%) ⬆️

... and 4 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.

This patch adds an `mrpb.StorageNodeUncommitReport` pool, which is
`proto/mrpb.storageNodeUncommitReportPool`. It reduces heap objects allocated repeatedly whenever
processing reports received from storage nodes.

Below heap profiling is the previous result.

```
      flat  flat%   sum%        cum   cum%
  70865580  8.38% 44.73%   71293773  8.43%  github.com/kakao/varlog/internal/metarepos.(*reportCollectExecutor).processReport
```

Now here it is after applying this patch.

```
      flat  flat%   sum%        cum   cum%
  20734504  2.10% 75.92%   42122814  4.26%  github.com/kakao/varlog/internal/metarepos.(*reportCollectExecutor).processReport
```
@ijsong ijsong force-pushed the reuse_uncommit_report branch from 87e2352 to fd4dd81 Compare April 24, 2023 03:17
@ijsong ijsong marked this pull request as ready for review April 24, 2023 03:18
@ijsong
Copy link
Member Author

ijsong commented May 16, 2023

To stack multiple PRs linearly, I close this PR, duplicated to #446.

@ijsong ijsong closed this May 16, 2023
@ijsong ijsong deleted the reuse_uncommit_report branch March 5, 2024 06:29
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.

2 participants