Is your feature request related to a problem or challenge?
When loading data into a DataFusion via SessionContext::read_parquet, DataFrame , only a single core is used even when there are many cores available.
This leads to slower performance, as reported by @mispp on #6908
Reproducer
Create data using
cd datafusion/benchmarks
./bench.sh data tpch10
Then lad the
use std::{io::Error, time::Instant};use datafusion::prelude::*;use chrono;constFILENAME:&str = "/Users/alamb/Software/arrow-datafusion/benchmarks/data/tpch_sf10/lineitem/part-0.parquet";#[tokio::main]asyncfnmain() -> Result<(),Error>{
env_logger::init();{let _ = _datafusion().await;}Ok(())}pubasyncfn_datafusion(){let _ctx = SessionContext::new();let _read_options = ParquetReadOptions{file_extension:".parquet",table_partition_cols:vec!(),parquet_pruning:None,skip_metadata:None};let _df = _ctx.read_parquet(FILENAME, _read_options).await.unwrap();let start = Instant::now();println!("datafusion start -> {:?}", chrono::offset::Local::now());let _cached = _df.cache().await;let elapsed = Instant::now() - start;println!("datafusion end -> {:?} {elapsed:?}", chrono::offset::Local::now());}Cargo.toml
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package]
name = "perf_test"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"parquet = "40.0.0"serde = "1.0.163"serde_json = "1.0.96"datafusion = "27.0.0"tokio = "1.0"chrono = "0.4.26"
Describe the solution you'd like
I would like datafusion to read the parquet file in parallel, using target_partitions config parameter
https://docs.rs/datafusion/latest/datafusion/config/struct.ExecutionOptions.html#structfield.target_partitions
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem or challenge?
When loading data into a DataFusion via SessionContext::read_parquet, DataFrame , only a single core is used even when there are many cores available.
This leads to slower performance, as reported by @mispp on #6908
Reproducer
Create data using
cd datafusion/benchmarks ./bench.sh data tpch10Then lad the
Cargo.toml
Describe the solution you'd like
I would like datafusion to read the parquet file in parallel, using target_partitions config parameter
https://docs.rs/datafusion/latest/datafusion/config/struct.ExecutionOptions.html#structfield.target_partitions
Describe alternatives you've considered
No response
Additional context
No response