-
Notifications
You must be signed in to change notification settings - Fork 7
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(client): prealloc pkg/varlog.(*transmitter).transmitQueue #721
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 25, 2024
a66b30e
to
e1ef1ad
Compare
d406846
to
b6f2ad1
Compare
e1ef1ad
to
416e9f9
Compare
b6f2ad1
to
f4ffd0c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #721 +/- ##
==========================================
- Coverage 49.73% 49.65% -0.08%
==========================================
Files 235 235
Lines 20718 20723 +5
==========================================
- Hits 10304 10291 -13
- Misses 9775 9786 +11
- Partials 639 646 +7 ☔ View full report in Codecov by Sentry. |
416e9f9
to
e74d9c6
Compare
f4ffd0c
to
e44af3d
Compare
e74d9c6
to
43444d0
Compare
e44af3d
to
43cbfbf
Compare
43444d0
to
c43198f
Compare
43cbfbf
to
dc0cc0d
Compare
c43198f
to
a4f18ee
Compare
dc0cc0d
to
c3d0003
Compare
a4f18ee
to
48a2b26
Compare
c3d0003
to
ab52113
Compare
ab52113
to
1e93669
Compare
48a2b26
to
a58015b
Compare
hungryjang
approved these changes
Mar 5, 2024
a58015b
to
617bd9d
Compare
This PR preallocates `pkg/varlog.(*transmitter).transmitQueue`. Benchmark: ``` goos: darwin goarch: amd64 pkg: github.com/kakao/varlog/pkg/varlog cpu: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz │ out.NoAlloc │ out.PreAlloc │ │ sec/op │ sec/op vs base │ TransmitQueue/128-8 17.88µ ± 1% 16.57µ ± 0% -7.34% (p=0.000 n=20) TransmitQueue/1024-8 149.7µ ± 0% 136.3µ ± 0% -8.93% (p=0.000 n=20) TransmitQueue/8192-8 1.313m ± 1% 1.156m ± 0% -11.97% (p=0.000 n=20) geomean 152.0µ 137.7µ -9.43% │ out.NoAlloc │ out.PreAlloc │ │ B/op │ B/op vs base │ TransmitQueue/128-8 14.40Ki ± 0% 12.29Ki ± 0% -14.65% (p=0.000 n=20) TransmitQueue/1024-8 138.40Ki ± 0% 98.04Ki ± 0% -29.16% (p=0.000 n=20) TransmitQueue/8192-8 1114.4Ki ± 0% 768.0Ki ± 0% -31.08% (p=0.000 n=20) geomean 130.5Ki 97.45Ki -25.31% │ out.NoAlloc │ out.PreAlloc │ │ allocs/op │ allocs/op vs base │ TransmitQueue/128-8 138.0 ± 0% 131.0 ± 0% -5.07% (p=0.000 n=20) TransmitQueue/1024-8 1.038k ± 0% 1.027k ± 0% -1.06% (p=0.000 n=20) TransmitQueue/8192-8 8.211k ± 0% 8.195k ± 0% -0.19% (p=0.000 n=20) geomean 1.056k 1.033k -2.13% ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR preallocates
pkg/varlog.(*transmitter).transmitQueue
.Benchmark: