Repository navigation
perf(scan): announce every chunk's reads when a V2 scan starts - #10847
joseph-isaacs wants to merge 1 commit into
Conversation
Each chunk of a V2 scan runs on a driver of its own, so a chunk's announcements only let its reads coalesce with its own segments. The chunk planner now announces the filter's and the projection's segments over every chunk still to plan on its first compute, and the prepared scan holds those announcements for its lifetime, so the IO service can widen each read with the segments around it. On TPC-H SF1 with DataFusion over local files this cuts physical reads from 2199 to 447 (v1: 882). Setting VORTEX_SCAN_EARLY_ANNOUNCE=0 restores per-chunk announcements, for comparisons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4PmceDHg8rFe5bgkhGFU9 Signed-off-by: Claude <noreply@anthropic.com>
Merging this PR will improve performance by 12.11%3 warnings, 1 note
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Summary
Stacked on #10527. Ports the cross-split early announcements from the earlier segment IO branch onto develop's planner-chain V2 executor.
Each chunk of a V2 scan runs on a driver of its own, so per-chunk announcements only let a chunk's reads coalesce with that chunk's own segments. On TPC-H SF1 that left #10527 at 2199 physical reads, against 882 for v1.
Changes
ChunkPlannerannounces the filter's and the projection's segments for every chunk still to plan.selected_rowsthatplan_selectionuses, so pruned and unselected rows are skipped.PreparedScan::announcesubmitsIoIntent::Announcerequests through the scan's IO service.Arc<PreparedScan>.VORTEX_SCAN_EARLY_ANNOUNCE=0falls back to per-chunk announcements, for A/B comparisons. This knob could be dropped before merge.a_scan_announces_every_chunk_before_planning_one.Known trade-off: the projection segments of chunks that the filter later empties are also announced. Coalescing may therefore read some bytes that are never used.
Local TPC-H SF1, DataFusion + Vortex, NVMe (develop a59294e)
VORTEX_SCAN_EARLY_ANNOUNCE=0)Physical reads =
io.requests.coalesced + io.requests.individual.CI
pr-bench-sql.yml(dispatched; one run each)Geomean of per-query time against the develop base
ji/bench-base-a59294e. DataFusion on Parquet and DuckDB on Vortex (V1 scan) are controls, since neither PR touches them. Each control cell gives DuckDB:vortex / DF:parquet.In CI, wall time does not move beyond the noise shown by the controls; on S3 the untouched DuckDB:vortex control moves by up to 16%. The cut in physical reads does not yet turn into time on these runners.
#10527's S3 result comes from a bot rerun (attempt 2) after a spot interruption. The dispatched runs report as failed only because their "Comment PR" step needs a PR context. The benchmark and compare steps succeed.
Checks
cargo nextest run -p vortex-layout: pass, including the new test.cargo clippy -p vortex-layout --all-targets --all-features -- -D warnings: clean.cargo +nightly-2026-09-10 fmt --check: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01N4PmceDHg8rFe5bgkhGFU9