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
op-batcher: stateful span batches & blind compressor #9954
Conversation
3378614
to
8b8765e
Compare
Semgrep found 1 Do not use |
c83b0fb
to
e22d5da
Compare
fc5220b
to
421ad18
Compare
4fe15e2
to
8eeaca5
Compare
e8af2c8
to
b5c334d
Compare
1620294
to
afe03e3
Compare
afe03e3
to
d1b87db
Compare
d1b87db
to
fd8ea1b
Compare
15ca49f
to
f8f2263
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9954 +/- ##
===========================================
- Coverage 28.27% 0.60% -27.67%
===========================================
Files 165 92 -73
Lines 7297 2481 -4816
Branches 1335 576 -759
===========================================
- Hits 2063 15 -2048
+ Misses 5128 2466 -2662
+ Partials 106 0 -106
Flags with carried forward coverage won't be shown. Click here to find out more. |
WalkthroughWalkthroughThe system update introduces the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
f53fae0
to
477e7aa
Compare
474ad01
to
01f3741
Compare
* Add Benchmark for AddSingularBatch * update compressor configs ; address PR comments * Add b.N * Export RandomSingularBatch through batch_test_util.go * measure only the final batch ; other organizational improvements * Add Benchmark for ToRawSpanBatch * update tests * minor fixup * Add Benchmark for adding *All* Span Batches * comment fixups * narrow tests to only test span batches that won't exceed RLP limit * Stateful Span Batches * Blind Compressor * final fixes * add peek helper function * Address PR Comments
Two Changes are included in order to optimize Span Batch Performance
Stateful Span Batches
Span Batches now build themselves iteratively instead of building from scratch every time
toRawSpanBatch
is called. This removes time spent building and rebuilding bit maps and lists.Blind Compressor
Blind compressor is added to serve the Span Channel Out. Blind Compressor is like the Ratio Compressor, but without estimations. Callers must
Flush
the compressor to know if the compressor is full.Comparison
Before Changes:
After Changes
These benchmarks test the time it takes to add The FINAL batch to a Span Batch, after already adding N-1 batches. You can draw the following conclusions from this data:
Shadow Compressor
to the newBlind Compressor
shows a 2x speed improvement:As the size of the compressing structure grows, gains from the Stateful Span Batch fall off. This is because of the unavoidable cost of re-compressing this non-streaming structure from scratch every time. While we discussed avoiding compression to help the average case, the compression must be done when the channel is finished, and you must compress to know if the channel is full. Therefore, we currently aren't targeting compression avoidance