Repository navigation
Load marks asynchronously by default - #118477
Conversation
The setting `load_marks_asynchronously` was `false` by default (ClickHouse Cloud has `true`). With the synchronous mode, the marks of every substream are loaded in the reading thread one after another, which is one network round trip per substream on object storage. Reading one row of a `JSON` column with ~250 paths (~500 substreams per part) from a public S3 bucket took minutes; with the asynchronous mode the marks of all streams are loaded in parallel by the marks loading thread pool. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Workflow [PR], commit [5a771e4] Summary: ✅
AI ReviewSummaryThis PR flips the default of Final VerdictStatus: ✅ Approve LLVM Coverage ReportMeasured on commit 5a771e4.
Changed lines: Changed C/C++ lines covered: 15/15 (100.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units8 translation units recompiled, 19 s compile time in total, 8 of them have a recent master baseline. |
|
📊 Cloud Performance Report 🟢 AI verdict: 1 improved query(s). K_source=6 K_base=30 flagged=1/65 clickbench🟢 1 improved · Flagged queries (3 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_official🟢 No significant changes Debug info
|
Related: #118475
The setting
load_marks_asynchronouslywasfalseby default (ClickHouse Cloud already usestrue). In the synchronous mode, the marks of every substream are loaded in the reading thread one after another, which is one network round trip per substream on object storage. Reading one row of aJSONcolumn with about 250 paths (about 500 substreams per part) from a public S3 bucket took minutes, and almost all of that time wasWaitMarksLoadMicroseconds. With the asynchronous mode, the marks of all streams of a part are loaded in parallel by the marks loading thread pool.Controlled benchmark from the issue (one Wide part with 1104 substreams behind a 30 ms per request HTTP server,
SELECT * ... ORDER BY t DESC LIMIT 1): 64 to 67 s with the synchronous mode, 2.5 s with the asynchronous mode.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Load marks of
MergeTreeparts asynchronously by default (settingload_marks_asynchronously), so the marks of all streams are loaded in parallel. This makes reading columns with many substreams (such asJSON) from object storage much faster.Workflow [PR]
Sync PR [sync-upstream/pr/118477]
Version info
26.9.1.914(included in26.9and later)