Repository navigation
Conversation
There was a problem hiding this comment.
AI review by Claude - workflow run
Patch is correct, with 0 blocking findings. The reused zstd context still writes one independent frame for each request, and the column recompression gate only changes telemetry. The main follow-ups: zstd::bulk::Compressor already does what the new compressor type does, and the profiling switch has no documentation.
There was a problem hiding this comment.
More details
The zstd path preserves request-owned compressed bytes while reusing encoder state. Static review found no reportable defect; runtime verification was blocked by an uncached piecemeal dependency.
🤖 Bits Code Review · Commit 49e2a1c
Binary Size Analysis (Agent Data Plane)Baseline: 625e229 · Comparison: bbcc416 · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
49e2a1c to
a3a2e6b
Compare
There was a problem hiding this comment.
More details
Compression buffer reuse preserves ownership of queued request bodies, and disabling column profiling still records uncompressed column sizes. The completed static review identified no actionable regression.
🤖 Bits Code Review · Commit a3a2e6b
a3a2e6b to
75d9b8b
Compare
There was a problem hiding this comment.
More details
Releasing the zstd context between flushes addresses the low-traffic memory-retention concern documented in the human discussion. The completed static review identified no reportable defect.
🤖 Bits Code Review · Commit 75d9b8b
75d9b8b to
abd4bca
Compare
There was a problem hiding this comment.
More details
Per-flush compressor reuse preserves independent request bodies and releases zstd tables between flushes. Column recompression is confined to explicit trace profiling; the static reviewer identified no actionable regression.
🤖 Bits Code Review · Commit abd4bca
abd4bca to
bf33203
Compare
There was a problem hiding this comment.
More details
Compressed request bodies retain their bytes across buffer reuse, and uncompressed column telemetry remains active when profiling is disabled.
🤖 Bits Code Review · Commit bf33203
bf33203 to
2a38f92
Compare
c39384a to
b785dec
Compare
There was a problem hiding this comment.
More details
Flush-scoped compression reuse releases zstd tables before idle periods. The completed static review identified no actionable regression; runtime behavior remains unverified.
🤖 Bits Code Review · Commit b785dec
b785dec to
f7117b4
Compare
There was a problem hiding this comment.
More details
Each request owns its compressed output, so buffer reuse does not overwrite queued request bodies. Compression tables are released between V3 flushes.
🤖 Bits Code Review · Commit f7117b4
f7117b4 to
fd97708
Compare
There was a problem hiding this comment.
More details
Compression state is released between flushes, avoiding persistent retention of zstd tables. The static reviewer reported no remaining defect; runtime tests were not run.
🤖 Bits Code Review · Commit fd97708
fd97708 to
73bdc8f
Compare
There was a problem hiding this comment.
More details
Requests own their compressed bytes before the reusable output buffer is overwritten. Disabling column profiling preserves uncompressed-size telemetry.
🤖 Bits Code Review · Commit 73bdc8f
73bdc8f to
3286ab9
Compare
There was a problem hiding this comment.
More details
Request bodies retain independent compressed bytes across compressor reuse, and telemetry distinguishes unmeasured column sizes from measured zero sizes. The completed static review identified no reportable defect.
🤖 Bits Code Review · Commit 3286ab9
3286ab9 to
7803cee
Compare
There was a problem hiding this comment.
More details
Each request owns its compressed bytes before buffer reuse, preventing subsequent payloads from overwriting queued requests. Uncompressed column telemetry remains recorded when trace profiling is disabled.
🤖 Bits Code Review · Commit 7803cee
7803cee to
d656c72
Compare
There was a problem hiding this comment.
More details
Compression-buffer reuse preserves independently owned request bodies. Optional column sizes are handled consistently, so disabling profiling retains uncompressed telemetry without recording fictitious compressed measurements.
🤖 Bits Code Review · Commit d656c72
d656c72 to
495d921
Compare
There was a problem hiding this comment.
More details
Request bodies own their compressed bytes before buffers are reused, and per-column recompression is gated by the targeted trace filter. Runtime behavior remains unverified because a required Git dependency was unavailable offline.
🤖 Bits Code Review · Commit 495d921
495d921 to
d479ffb
Compare
There was a problem hiding this comment.
More details
Request-owned compressed bytes protect already-built payloads when the shared buffer is reused, while flush-scoped contexts release zstd tables between flushes. The completed static review returned no reportable findings.
🤖 Bits Code Review · Commit d479ffb
d479ffb to
f6e0ac2
Compare
There was a problem hiding this comment.
More details
Compression state is released between V3 flushes, and request bodies retain their compressed bytes before the workspace is reused. The completed static review identified no reportable correctness issue.
🤖 Bits Code Review · Commit f6e0ac2
…ssion ## Summary The metrics encoder creates a new `zstd` compression context for each request. Each context allocates its window and match tables before it compresses a byte, and the encoder frees them after the request. The V3 encoder also recompresses every column separately to report per-column sizes, even when serializer profiling is off. This change keeps one `zstd` context and its output storage per encoder. Each request still gets an independent frame that declares its exact uncompressed size. Per-column recompression runs only when serializer profiling is enabled, and telemetry otherwise reports uncompressed column sizes. Stripped `optimized-release` Tier 1 runs measure this change together with V3 arena reuse. Cgroup CPU falls 46.6% on 1M RUM and 90.5% on all-unique. Peak memory falls 9.8 MiB on 1M RUM and 165.1 MiB on all-unique. ## Change Type - [ ] Bug fix - [ ] New feature - [ ] Non-functional - [x] Performance ## How did you test this PR? - `cargo check --locked --workspace --tests` - `cargo test --locked -p saluki-io --lib reusable_compressor_emits_one_sized_frame_per_input` - Tier 1 runs use stripped `optimized-release` builds against base `18f587f5f6` in cgroup v2, in default unbounded mode. - 1M RUM holds 1,000,000 gauges that each carry one unique 51 B UUID tag and 4 to 10 shared tags. - All-unique holds 1,000,000 gauges that each carry eight unique tags of 32 B to 50 B. ## References - Requires: V3 arena column ranges. - Required by: none. - Release note: `releasenotes/notes/reuse-zstd-context-32cecc80878e1dc2.yaml` ### Series overview - Context & Tag Density: pack contexts into one allocation and drop unused cache overhead. - Dense Aggregation: replace 177 B buckets with per-kind typed pages. - Resumable Flush: shrink metric buffers and interleave bounded flush chunks. - Idle Pipeline Bypass: skip inactive transforms and borrow client telemetry. - **`300m` CPU:** cut encoder, codec and worker-pool hot-path cost. - PR TBD: reuse V3 dictionary arenas and frame payloads in one pass - PR TBD: map packed tag symbols directly to V3 payload IDs - **Current:** reuse the `zstd` context and gate per-column recompression - PR TBD: parse DogStatsD metrics in one pass and fast-path singleton scalars - PR TBD: classify and deduplicate metric tags on the stack - PR TBD: size the dedicated topology worker pool to available CPUs - Memory Admission: enforce opt-in configured memory limits with idle reclaim and counted drops.
f6e0ac2 to
bbcc416
Compare
There was a problem hiding this comment.
More details
Requests own their compressed bytes before the output buffer is reused, and the zstd context is released between flushes. Column telemetry explicitly represents unmeasured compressed sizes when profiling is disabled.
🤖 Bits Code Review · Commit bbcc416
Summary
The metrics encoder creates a new
zstdcompression context for each request. Each context allocates its window and match tables before it compresses a byte, and the encoder frees them after the request. The V3 encoder also recompresses every column separately to report per-column sizes, even when serializer profiling is off.This change keeps one
zstdcontext and its output storage per encoder. Each request still gets an independent frame that declares its exact uncompressed size. Per-column recompression runs only when serializer profiling is enabled, and telemetry otherwise reports uncompressed column sizes.Stripped
optimized-releaseTier 1 runs measure this change together with V3 arena reuse. Cgroup CPU falls 46.6% on 1M RUM and 90.5% on all-unique. Peak memory falls 9.8 MiB on 1M RUM and 165.1 MiB on all-unique.Change Type
How did you test this PR?
cargo check --locked --workspace --testscargo test --locked -p saluki-io --lib reusable_compressor_emits_one_sized_frame_per_inputoptimized-releasebuilds against base18f587f5f6in cgroup v2, in default unbounded mode.References
blt/1m-14-metrics-v3-symbol-ids)releasenotes/notes/reuse-zstd-context-32cecc80878e1dc2.yamlSeries overview
300mCPU: cut encoder, codec and worker-pool hot-path cost.