Skip to content

Route CUDA pruning io through host memory#8862

Merged
onursatici merged 1 commit into
developfrom
os/cuda-reads
Jul 21, 2026
Merged

Route CUDA pruning io through host memory#8862
onursatici merged 1 commit into
developfrom
os/cuda-reads

Conversation

@onursatici

@onursatici onursatici commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

For zonemap segments we should be using the host memory in cuda reads, but for the data segments we should be using the pinned buffer pool reader that ships segments to the gpu.

If we read every segment with the cuda reader then we would get the zonemap segments shipped to the device by default, and to use them in pruning we have to get them back to the host

What changes are included in this PR?

Cuda reads now use a routing vortex read at implementation that picks zonemap segments and routes them to the host reader, whereas data segments route to the gpu reader

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Polar Signals Profiling Results

Latest Run

Status Commit Job Attempt Link
🟢 Done 6e5baed 1 Explore Profiling Data
Previous Runs (3)
Status Commit Job Attempt Link
🟢 Done 9946560 1 Explore Profiling Data
🟢 Done 323aaaf 1 Explore Profiling Data
🟢 Done f7216f0 1 Explore Profiling Data

Powered by Polar Signals Cloud

@onursatici onursatici added the changelog/feature A new feature label Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Benchmarks: Vortex queries 📖

Verdict: No clear signal (low confidence)
Attributed Vortex impact: -6.8%
Engines: DataFusion No clear signal (-1.2%, low confidence) · DuckDB Likely improvement (-12.0%, medium confidence)
Vortex (geomean): 0.793x ✅
Parquet (geomean): 0.821x ✅
Shifts: Parquet (control) -17.9% · Median polish -23.0%

How to read Verdict and Engines
  • Verdict: Overall PR-level signal after subtracting baseline drift estimated from Parquet control rows. It can be Likely improvement, Likely regression, or No clear signal.
  • Engines: Per-engine attribution. DataFusion is compared against DataFusion/Parquet controls; DuckDB is compared against DuckDB/Parquet controls. This answers whether each engine improved or regressed independently.
  • Confidence: Based on directional consistency, share of rows above the noise floor, and control-run noise.

datafusion / vortex-file-compressed (0.759x ✅, 2↑ 0↓)
name PR 6e5baed (ns) base 6a79bcf (ns) ratio (PR/base)
vortex_q00/datafusion:vortex-file-compressed 🚀 10351446 12687167 0.82
vortex_q01/datafusion:vortex-file-compressed 🚀 6547423 9277786 0.71
datafusion / parquet (0.768x ✅, 2↑ 0↓)
name PR 6e5baed (ns) base 6a79bcf (ns) ratio (PR/base)
vortex_q00/datafusion:parquet 🚀 20928196 26417776 0.79
vortex_q01/datafusion:parquet 🚀 4756741 6382585 0.75
duckdb / vortex-file-compressed (0.772x ✅, 2↑ 0↓)
name PR 6e5baed (ns) base 6a79bcf (ns) ratio (PR/base)
vortex_q00/duckdb:vortex-file-compressed 🚀 10373032 13436387 0.77
vortex_q01/duckdb:vortex-file-compressed 🚀 6381794 8263765 0.77
duckdb / parquet (0.878x ✅, 1↑ 0↓)
name PR 6e5baed (ns) base 6a79bcf (ns) ratio (PR/base)
vortex_q00/duckdb:parquet 🚀 23810748 28024281 0.85
vortex_q01/duckdb:parquet 9537302 10522304 0.91

No file size changes detected.

@onursatici

Copy link
Copy Markdown
Contributor Author

will merge after #8876

Comment thread vortex-file/src/open.rs
Comment on lines +73 to +85
impl Clone for VortexOpenOptions {
fn clone(&self) -> Self {
Self {
session: self.session.clone(),
segment_cache: self.segment_cache.clone(),
initial_read_size: self.initial_read_size,
file_size: self.file_size,
dtype: self.dtype.clone(),
footer: self.footer.clone(),
initial_read_segments: RwLock::new(self.initial_read_segments.read().clone()),
metrics_registry: self.metrics_registry.clone(),
labels: self.labels.clone(),
cache_layout_reader: self.cache_layout_reader,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not default this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea I think this is not great, I will file a follow up, I have another idea

Signed-off-by: Onur Satici <onur@spiraldb.com>
@onursatici
onursatici merged commit ba4acb6 into develop Jul 21, 2026
79 of 80 checks passed
@onursatici
onursatici deleted the os/cuda-reads branch July 21, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants