Repository navigation
Speed up V2 scans and default datafusion-bench to V2 for TPC-DS and ClickBench - #10799
joseph-isaacs wants to merge 4 commits into
Conversation
Merging this PR will degrade performance by 16.7%3 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Polar Signals Profiling ResultsLatest Run
Previous Runs (56)
Powered by Polar Signals Cloud |
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals Profiling 📖Commits: PR datafusion / vortex-file-compressed / ns (0.998x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: FineWeb NVMe 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.019x ➖, 0↑ 1↓)
datafusion / parquet / ns (1.000x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.995x ➖, 0↑ 0↓)
duckdb / parquet / ns (1.033x ➖, 0↑ 1↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.881x ✅, 10↑ 0↓)
datafusion / parquet / ns (1.000x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.995x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.999x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=10 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.959x ➖, 1↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.998x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.995x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-DS SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.947x ➖, 23↑ 5↓)
datafusion / parquet / ns (1.002x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.993x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.993x ➖, 0↑ 1↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.136x ❌, 0↑ 12↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.995x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.994x ➖, 1↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on S3 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.123x ➖, 0↑ 3↓)
datafusion / parquet / ns (0.977x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (1.124x ➖, 0↑ 2↓)
duckdb / parquet / ns (1.055x ➖, 0↑ 0↓)
|
4960855 to
02d9b08
Compare
02d9b08 to
ba0fb42
Compare
ba0fb42 to
78afd60
Compare
78afd60 to
06c0701
Compare
06c0701 to
bef7c23
Compare
|
CodSpeed flags
So I'm treating it as noise, not a regression. Every other CodSpeed change in this run is faster. Generated by Claude Code |
|
On eedd5bf, CodSpeed reports two regressions:
CodSpeed also notes that base and head ran on different runner types for the changed benchmarks. I'm treating both as runner noise. Generated by Claude Code |
|
I don't think the three CodSpeed regressions on 9847c99 come from this commit, which only changes
CodSpeed also notes again that base and head ran on different runner types. The new Generated by Claude Code |
9847c99 to
d365fc8
Compare
|
On d365fc8, CodSpeed's two regressions are Generated by Claude Code |
A V2 scan reads each chunk through a session of its own, and the file's segment source shares a read only while it is in flight. A stored segment that spans a chunk boundary was therefore read again by every chunk that started after its neighbour had finished, and by every partition and every concurrent scan of the file. TPC-DS q28 on SF1 read 188 MB where V1 reads 114 MB, every segment V1 reads up to two and a half times as often. The file's ScanCache now retains up to 64 MiB of recently read host segments in least-recently-used order, and every scan of the file reads through it. ScanCache::with_retained_bytes sets the budget; zero disables it. q28 now reads 125 MB. TPC-DS SF1 on DataFusion, V2 vs V1 geomean: 1.052 -> 1.002. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYor8ydYMRcjUSh622VTEC Signed-off-by: Claude <noreply@anthropic.com>
TPC-H already defaults to the planner-driven V2 scan. Extend the default to TPC-DS and ClickBench so the SQL benchmarks measure V2 on them too. `--scan-v2 false` or `VORTEX_SCAN_V2=0` still selects V1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYor8ydYMRcjUSh622VTEC Signed-off-by: Claude <noreply@anthropic.com>
The V2 scan cache keyed filter and projection plans by `ExactBoundExpr`, which compares children by pointer. DataFusion opens each partition of a file separately and binds its predicate and projection anew, so no partition ever found the plans another had built: every partition lowered its own filter plans, optimized its own projection and re-evaluated the zone maps. The cost scales with the partition count, so TPC-DS q09 and q28 ran twice as long as V1 on the 32-core benchmark runners. Key the cache by structure instead. Hashing walks the scalar functions and skips dtypes, so a lookup does not walk a wide schema; equality still compares dtypes. Both walk the tree iteratively. Locally (4 cores, 32 partitions), q09/q13/q28/q44/q48 go from a 1.41x geomean of V1 to 1.15x, and q28 from 1.57x to 1.15x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYor8ydYMRcjUSh622VTEC Signed-off-by: Claude <noreply@anthropic.com>
A V2 scan cuts its rows on a fixed grid in the file's row domain, but DataFusion's partition edges fall off that grid. Every partition of a filtered scan then planned a sliver at its edge: TPC-DS q28 at 32 partitions cut each 90,112-row partition into chunks of 81,920 and 8,192 rows. The sliver costs a whole chunk's pipeline compile and conjunct setup, which dominates a selective filter over few rows. The chunk planner now joins an edge chunk under half a chunk to its neighbour; interior boundaries stay on the grid. Locally at 32 partitions, q28's V2 CPU time falls from 1.32x V1 to 1.10x and its wall time matches V1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYor8ydYMRcjUSh622VTEC Signed-off-by: Claude <noreply@anthropic.com>
d365fc8 to
65bf7e9
Compare
|
On 65bf7e9, CodSpeed's one regression is Generated by Claude Code |
Summary
Enable scan v2 for tpc-ds and clickbench