Skip to content

feat: parallel reading for vortex - #115096

Merged
alexey-milovidov merged 3 commits into
ClickHouse:vortex-formatfrom
m7kss1:feat-vortex-executor
Aug 19, 2026
Merged

alexey-milovidov merged 3 commits into
ClickHouse:vortex-formatfrom
m7kss1:feat-vortex-executor

Conversation

@m7kss1

@m7kss1 m7kss1 commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

The initial idea is close to ParquetV3 reader:

the format starts no threads of its own. we split the work of a file into small decode and read tasks and ClickHouse runs them on the same pools and thread limits

each decoded split is converted to columns on the thread that decoded it and ready chunks are handed to the query as soon as they appear or in file order on request

scan is not allowed to run far ahead of the query: new split starts only when the query has taken an older chunk and with one parsing thread everything runs inside the read call like in Parquet

note: image below is generated

image

Signed-off-by: Dergousov Maksim <[email protected]>
@m7kss1 m7kss1 changed the title WIP feat: vortex executor WIP feat: parallel reading for vortex Aug 17, 2026
m7kss1 and others added 2 commits August 18, 2026 04:42
`04907_vortex_parallel_read` covers the aggregates over a file with many row splits at 1, 4 and 16
parsing threads with and without `input_format_vortex_preserve_order`, the row order under
`preserve_order`, the filter pushdown with several threads, an early exit through `LIMIT`, and a
file with a single split.

The reference of `04893_vortex_schema_cache` is updated as well: `master` changed the default of
`schema_inference_make_columns_nullable` from 1 to 3 (nullability is taken from the file metadata),
so the two `DESC` queries that do not pin the setting now infer `UInt64`/`String` instead of the
nullable types recorded when the test was written. The number of schema cache entries the test
asserts is unchanged.

Signed-off-by: Dergousov Maksim <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
@m7kss1 m7kss1 changed the title WIP feat: parallel reading for vortex feat: parallel reading for vortex Aug 18, 2026
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Aug 19, 2026
@clickhouse-gh clickhouse-gh Bot closed this Aug 19, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Aug 19, 2026
@m7kss1

m7kss1 commented Aug 19, 2026 •

Copy link
Copy Markdown
Member Author

@alexey-milovidov

As measured on ClickBench:

Mean of 3 runs, 8 cores, 31 GB RAM, single NVMe root volume, Linux 6.8

Geomean: 1.82×

# Baseline Candidate Speedup
1 0.097 0.098 0.99×
2 0.365 0.146 2.50×
3 0.917 0.384 2.39×
4 1.466 0.981 1.49×
5 1.478 1.140 1.30×
6 3.952 2.121 1.86×
7 0.250 0.115 2.18×
8 0.339 0.127 2.66×
9 2.238 1.923 1.16×
10 2.780 2.134 1.30×
11 1.356 0.541 2.51×
12 1.646 0.601 2.74×
13 3.226 1.407 2.29×
14 4.559 2.102 2.17×
15 3.627 1.819 1.99×
16 1.364 1.046 1.30×
17 5.920 4.491 1.32×
18 4.751 3.562 1.33×
19 9.097 8.094 1.12×
20 0.341 0.197 1.74×
21 17.380 12.693 1.37×
22 17.850 4.289 4.16×
23 33.197 10.370 3.20×
24 240.300 59.990 4.01×
25 3.616 1.027 3.52×
26 2.985 0.753 3.97×
27 3.563 1.063 3.35×
28 18.087 4.404 4.11×
29 15.167 6.212 2.44×
30 0.584 0.254 2.30×
31 4.687 1.492 3.14×
32 5.689 2.050 2.78×
33 7.518 6.849 1.10×
34 13.916 8.411 1.65×
35 13.907 8.459 1.64×
36 0.954 0.818 1.17×
37 0.534 0.493 1.08×
38 0.291 0.308 0.94×
39 0.478 0.466 1.03×
40 1.030 0.972 1.06×
41 0.170 0.175 0.97×
42 0.149 0.147 1.01×
43 0.120 0.119 1.01×

p.s hits.vortex converted from hits.parquet with vx cli

@alexey-milovidov
alexey-milovidov merged commit 746c2d5 into ClickHouse:vortex-format Aug 19, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

Merged into #112950 (merge commit 746c2d5; the new test is renumbered to 04927_vortex_parallel_read since 04907 was taken). Benchmark results are in #112950 (comment) — the ClickBench read gap to Parquet collapsed from geomean ~26.8x to 1.21x, winning 9 of 43 queries, and the old >600 s Q24 now runs in 8.7 s. Thank you, this is beautiful work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants