Skip to content

Configure DuckDB native threads for benchmarking#6512

Merged
gatesn merged 1 commit intodevelopfrom
ngates/duckdb-threads
Feb 14, 2026
Merged

Configure DuckDB native threads for benchmarking#6512
gatesn merged 1 commit intodevelopfrom
ngates/duckdb-threads

Conversation

@gatesn
Copy link
Contributor

@gatesn gatesn commented Feb 14, 2026

Benchmarking takes a "threads" flag. We used to only set this on the Vortex table function, not the rest of DuckDB. This was different to how the same flag behaves in DataFusion which configures the entire Tokio runtime with n threads.

I can confirm it runs with a single thread when passed

Screenshot 2026-02-13 at 20 21 27

Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn added the changelog/fix A bug fix label Feb 14, 2026
@gatesn gatesn enabled auto-merge (squash) February 14, 2026 01:21
let client_context = init_input.client_context()?;
let object_cache = client_context.object_cache();

let num_workers = std::thread::available_parallelism()
Copy link
Contributor

Choose a reason for hiding this comment

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

For the extension, max_threads means up to how many threads are suppported by the extension, not how many should be used. That's why extensions use u64::MAX to signal that any thread count is supported.

So should DuckDB decide to use more threads than logical cores, they would mismatch.

@gatesn gatesn merged commit 6f10740 into develop Feb 14, 2026
51 of 52 checks passed
@gatesn gatesn deleted the ngates/duckdb-threads branch February 14, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants