-
Notifications
You must be signed in to change notification settings - Fork 4
Update size test metrics stream implementation for otel-arrow encoding #214
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
Update size test metrics stream implementation for otel-arrow encoding #214
Conversation
|
Thanks for the PR @albertlockett It is good to see Otel/Arrow performing better when used correctly. I will take a more detailed look at the PR and will get back to you. I have briefly run the tests with your changes and one thing that is puzzling is that the ztd-compressed OTLP sizes have improved as well. Before: After: I may need to split this PR into 2 parts: 1) to update otlp/pdata dependencies to isolate and understand their impact first, 2) to apply the changes you made for Otel Arrow. I don't think anything is wrong with your change, but I want to do it just to have a clearer understanding of what's going on. |
|
I have isolated the changes in OTLP compressed size to pdata dependency change from v1.38 to v1.39 where they introduced new marshalers which seem to produce more zstd-friendly payloads. This is unrelated to your change, so nothing to worry about. |
tigrannajaryan
left a comment
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.
Blocking temporarily since I see performance degradation in seemingly unrelated parts. Can be another effect of newer dependencies. I will need to look into it.
pkg: github.com/splunk/stef/benchmarks
cpu: Apple M2 Pro
│ bench_base.txt │ bench_current.txt │
│ sec/op │ sec/op vs base │
DeserializeNative/STEF/deser-10 1.412m ± 0% 1.548m ± 0% +9.63% (p=0.000 n=15)
DeserializeNative/STEFU/deser-10 4.206m ± 0% 4.330m ± 0% +2.95% (p=0.000 n=15)
geomean 2.437m 2.589m +6.24%
│ bench_base.txt │ bench_current.txt │
│ sec/point │ sec/point vs base │
DeserializeNative/STEF/deser-10 21.12n ± 0% 23.15n ± 0% +9.61% (p=0.000 n=15)
DeserializeNative/STEFU/deser-10 62.91n ± 0% 64.77n ± 0% +2.96% (p=0.000 n=15)
geomean 36.45n 38.72n +6.23%
│ bench_base.txt │ bench_current.txt │
│ B/op │ B/op vs base │
DeserializeNative/STEF/deser-10 934.4Ki ± 0% 934.2Ki ± 0% -0.03% (p=0.000 n=15)
DeserializeNative/STEFU/deser-10 1.471Mi ± 0% 1.470Mi ± 0% -0.02% (p=0.000 n=15)
geomean 1.158Mi 1.158Mi -0.02%
│ bench_base.txt │ bench_current.txt │
│ allocs/op │ allocs/op vs base │
DeserializeNative/STEF/deser-10 465.0 ± 0% 465.0 ± 0% ~ (p=1.000 n=15) ¹
DeserializeNative/STEFU/deser-10 469.0 ± 0% 469.0 ± 0% ~ (p=1.000 n=15) ¹
geomean 467.0 467.0 +0.00%
OK, this is non-issue. It was because this PR is branched from an older commit and |
bedc334 to
dea89f8
Compare
Perf degradation fixed by rebasing.
|
I rebased, fixed go.mod and re-created benchmarks.html. Everything builds and runs correctly. |
tigrannajaryan
left a comment
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.
Thank you for the PR @albertlockett
LGTM.


An issue was identified where otel-arrow would perform worse than OTLP in the
TestMetricsMultipartsize test. This PR resolves the issue by changing how the results are compressed.otel-arrow can apply compression to telemetry batches in two places:
BatchArrowRecordmessageThis test was originally compressing just the IPC stream, but otel-arrow actually gets better compression ratio when compressing the proto messages.
This PR also upgrades otel-arrow to the latest version.
Results from the original
TestMetricsMultipartsize test:Interpretation of the results
The fact that STEF systematically achieves better compression than OTAP is expected. The tradeoffs between OTAP and STEF are radically different. OTAP seeks to optimize across multiple dimensions: zero deserialization, low memory allocations, data processing speed (SIMD support), compression rate, and better impedance with modern telemetry backends, all of which are columnar-oriented. By contrast, STEF is mainly optimized for compression rate (inter data center use case). The other dimensions mentioned above are not optimized.
We are considering a second round of optimization on the compression rate for OTAP (there are still some ideas left to explore), which should reduce the gap with STEF. However, for the reasons mentioned earlier, it is unlikely that OTAP will achieve a better compression rate than STEF, except perhaps for very large batches. These two protocols have complementary use cases.