Commit 9e55ec4
authored
Update size test metrics stream implementation for otel-arrow encoding (#214)
An issue was identified where otel-arrow would perform worse than OTLP in the `TestMetricsMultipart` size test. This PR resolves the issue by changing how the results are compressed.
otel-arrow can apply compression to telemetry batches in two places:
- the record within the Arrow IPC stream
- the protobuf serialized `BatchArrowRecord` message
This 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 `TestMetricsMultipart` size test:
```
go test -timeout 90s -count=1 -v -run ^TestMetricsMultipart$ github.com/splunk/stef/benchmarks
=== RUN TestMetricsMultipart
hostandcollector-otelmetrics Comp Bytes Ratio
OTLP none 22219873 x 1.00
STEF none 1493558 x 14.88
STEFU none 1559921 x 14.24
Otel ARROW none 13571951 x 1.64
astronomy-otelmetrics Comp Bytes Ratio
OTLP none 145844039 x 1.00
STEF none 10343709 x 14.10
STEFU none 10793486 x 13.51
Otel ARROW none 92128187 x 1.58
hostandcollector-otelmetrics Comp Bytes Ratio
OTLP zstd 2675305 x 1.00
STEF zstd 246609 x 10.85
STEFU zstd 371536 x 7.20
Otel ARROW zstd 1316311 x 2.03
astronomy-otelmetrics Comp Bytes Ratio
OTLP zstd 19596366 x 1.00
STEF zstd 3381914 x 5.79
STEFU zstd 4171492 x 4.70
Otel ARROW zstd 11690516 x 1.68
--- PASS: TestMetricsMultipart (10.18s)
PASS
ok github.com/splunk/stef/benchmarks 10.562s
```
**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.1 parent d2ec70e commit 9e55ec4
File tree
4 files changed
+187
-148
lines changed- benchmarks
- encodings/otelarrow
- docs
4 files changed
+187
-148
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 110 | + | |
114 | 111 | | |
115 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
132 | 137 | | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | | - | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
0 commit comments