Repository navigation
Conversation
Use `NONE` below the 128-byte `network_compression_min_bytes` default when both peers advertise protocol revision 54493. Keep compression framing, checksums, and frame boundaries, and retain the configured codec for older peers and larger frames. Document the mixed-frame contract and cover both sending directions, compatibility, exact thresholds, logs, chunked transport, and block continuations in a functional test. The default follows isolated codec measurements; a matched full-server ThinLTO comparison remains pending. Publish as a draft for CI validation.
|
Workflow [PR], commit [0b48565] Summary: ❌
|
The compatibility proxy lowered both `Hello` revisions to 54492 but left the query's `ClientInfo` at 54493. Fast test enables `validate_tcp_client_information`, so the server correctly rejected the inconsistent revision with `CLIENT_INFO_DOES_NOT_MATCH`. Forward the client handshake and query prefix while rewriting the `ClientInfo` revision to match. Keep strict server validation enabled. Reproduced the original failure and passed all 11 corrected functional groups and the reference comparison on the same optimized ThinLTO server. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120191&sha=ceef15f1b27a45a39bc92df469c29b9da1cb3a20&name_0=PR&name_1=Fast%20test Related: ClickHouse#120191
Fast test's server requires `notchunked`, so forcing `chunked` rejected the connection before the final compression check. Prefer chunking with `chunked_optional` and assert mixed `NONE`/ZSTD frames after negotiation. Reproduced the exact CI failure, then passed all 11 groups and reference checks with strict client-information validation under both mandatory unchunked and optional-chunked server configurations. Wire captures confirmed each selected send/receive transport and mixed codec frames. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120191&sha=ce0244451735921260e0a00edd95caa69aef0f8f&name_0=PR&name_1=Fast%20test Related: ClickHouse#120191
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes82 object files changed (+47.12 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units802 translation units recompiled, 8792 s compile time in total, 802 of them have a recent master baseline. |
The merged release version is now 26.10. Move the new setting out of the 26.9 history block so `compatibility=26.9` restores the pre-feature behavior, and update the wire test to exercise that boundary. The exact settings-history CI check failed before the change and passes afterward against the complete PR diff. Shell and embedded Python syntax checks also pass. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120191&sha=893f667805079874480a8d98daeffc0c2fc8b092&name_0=PR&name_1=Style%20check PR: ClickHouse#120191
|
📊 Cloud Performance Report ✅ AI verdict: This PR sends native-protocol frames smaller than 128 bytes uncompressed, saving at most microseconds of compression per frame on the client/server path. It does not change query execution, aggregation or joins. All five flagged improvements (ClickBench Q18 -11.6%, Q33 -14.7%, Q34 -15.7%; TPC-H Q1 -21.5%, Q7 -25.9%) are downgraded to not_sure: the savings run from tens to hundreds of milliseconds, with seconds less CPU on heavy GROUP BY queries that return about 10 rows. For TPC-H Q1 and Q7, the PR timings fall inside master's recent range and the baseline sits above it, so the gap comes from a slow baseline, not from this change. clickbenchFlagged queries (4 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_officialFlagged queries (2 of 22)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. Debug info
|
…frame-compression Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…frame-compression Resolve the conflict with the move of the settings changes history into the setting declarations (ee6b44f): the history records this PR added to `SettingsChangesHistory.cpp` now live as trailing arguments of the `DECLARE` of each setting. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Preserve the `uniq` state revision 54493 added on master. Move the small-frame capability and `DBMS_TCP_PROTOCOL_VERSION` to 54494, update the legacy test proxy to advertise 54493, and retain the specifications at their new documentation paths. Validated the actual legacy proxy functions with synthetic `Hello` and `ClientInfo` bytes, Bash/Python syntax, and the current CI inline settings-history parser. Full server validation is left to fresh CI. PR: ClickHouse#120191
Preserve the shared compression output path and master protocol revisions; move the small-frame capability to 54496 and compatibility history to 26.11. Clarify that precompressed asynchronous `Distributed` queue replay keeps its stored codec. Includes the Azure sequential job split that addresses the 9000-second timeout seen on this branch. Related: ClickHouse#123849 PR: ClickHouse#120191 CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120191&sha=c0d9b692de33d123b65dce59bf47ed5b28704ee5&name_0=PR&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20azure%2C%20sequential%29
Include `network_compression_min_bytes` in `networkCompressionSettings` so autocomplete and metadata queries honor explicit zero and custom thresholds. Add regression coverage for explicit overrides and compatibility-derived values, including which values are serialized. Addresses the helper-query propagation finding in the review of ClickHouse#120191.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Keep `network_compression_min_bytes` at zero by default until measurements cover the current pooled `ZSTD` path on warmed persistent connections. The preserved codec microbenchmarks predate this implementation and do not justify enabling the bypass for every connection. Enable the threshold explicitly in functional tests, cover the unchanged default, and remove the test of the superseded compatibility-derived threshold. Align the setting history and protocol documentation. Review: ClickHouse#120191 (comment)
Use a 128-byte threshold by default with `network_compression_min_bytes=0` retained as the explicit opt-out. Restore the matching compatibility history, functional assertions and helper-query regression coverage. Current pooled `ZSTD` performance revalidation remains outstanding; the earlier allocation measurements are not evidence for the current path. Related: ClickHouse#120191 (comment)
Preserve master revision 54496 for secondary-insert `ProfileEvents` and move small-frame compression support to revision 54497. Update both protocol specs, setting documentation, and the legacy proxy boundary. Keep the bypass enabled by default at 128 bytes. Related: ClickHouse#120191
Retain the per-stream state introduced for adaptive compression in `CompressedWriteBuffer`. Pass that state to the configured codec and `nullptr` to bypassed `NONE` frames, preserving state between larger frames. Keep the 128-byte network default and protocol revision 54497. Related: ClickHouse#120191 Related: ClickHouse#124882
Keep upstream `CompressedWriteBuffer` block/byte counters and compression timing around both configured-codec and `NONE` frames. Preserve codec state, the 128-byte default, framing and checksums. Related: ClickHouse#120191 Review: ClickHouse#120191 (comment)
Retain the previous codec in `CompressedReadBufferBase` when alternating with `NONE`, so `LZ4` and `LZ4HC` streams keep adaptive decoder history after small tails. Share selection between header and decompression paths and retain strict mixed-codec validation. Add a regression covering repeated 1 MiB frames and 29-byte tails at thresholds 0 and 128, for buffered and direct reads. A SQL round trip cannot detect this state loss because decoded values remain correct. Related: ClickHouse#120191 Review: ClickHouse#120191 (comment)
Preserve the upstream aggregation boundary at revision 54497 and move `SMALL_FRAME_COMPRESSION` to revision 54498. Update the `Native` spec, setting documentation, and compatibility proxy together. Retain the `LZ4` decoder-history fix and the enabled-by-default threshold of 128 bytes. Related: ClickHouse#120191
Bypass compression for frames below 128 bytes produced by
Nativeconnection writers when both peers support revision 54498. The bypass is enabled by default;network_compression_min_bytes=0restores compression of every frame. Older peers retain their configured codec. Framing, checksums and buffer sizing are unchanged; precompressed asynchronousDistributedqueue frames retain their stored codec.Measurements on 2026-11-10 compared thresholds
0and128on the pooledZSTDimplementation at PR head6f2ffce8b7af0dcc40160f39fd1dd97982b0ce36(verified CI mergea2a62d91e9c2a40905c9446ec28bbf9c03e3b2c8). For warmed trivial queries at 64/128 clients, four balanced pairs per case measured throughput +1.48–1.65%, server CPU/query −1.48–1.66%, and client CPU/query −1.91–2.26%. The earlier 1/32-client experiment also found modest CPU savings. Detailed measurements, methodology, and reproduction settings.There is no supported allocation-saving claim: server allocation traffic was noisy, and client allocation traffic increased slightly. For a compressible 95-byte repeated-string result, total application traffic increased by 57.4 bytes/query (+3.05%). Short-window RSS differences do not establish long-term memory savings. The 128-byte cutoff remains a bounded policy choice, not a demonstrated optimum;
0remains available when the wire-cost tradeoff is undesirable.Upstream per-frame compression profiling was incorporated in merge
de80da23db9fd89731e990ec79193283e84746a4. The measurements above predate that addition and do not measure the current head. New-head performance validation, broader compressible/incompressible payload coverage, and cutoff comparison remain open.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Bypass compression by default for frames below 128 bytes produced by
Nativeconnection writers with compatible peers. Setnetwork_compression_min_bytes=0to restore compression of every frame.Workflow [PR]
Sync PR [sync-upstream/pr/120191]