poor performance on duckdb s3 parquet reading #13255
Replies: 4 comments 6 replies
|
What happens when you change #1 to avoid having DuckDB make the ListObjectV2 API calls? I noticed that can be pretty slow with a lot of files. instead of: Great timing for your post. I'm also benchmarking various ways to gather a bunch of S3 parquet files in EC2 and found that eliminating predicate pushdown in favor of reading the entire file was ~25% faster. Look at all these roundtrips: 200 MB file.
#4 could be dask's read_parquet with these tips?
|
|
Did you ever figure this out? On our end we're noticing that DuckDB doesn't full saturate the network bandwidth. It's coming in at about 1/3 of that the machine is capable of transferring. |
|
+1 When using DuckDB-wasm to read a single .parque file, I don't see parallel reads to S3. I only see serial reads which makes performance slow. Is this expected? |
|
Hi, we wrote a duckdb extension called cache_httpfs, which does a few things you guys mentioned above:
The only thing you need to do is FORCE INSTALL cache_httpfs FROM community;
LOAD cache_httpfs;I would appreciate if you could have a try! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've been doing some benchmarks of reading large s3 parquet files from duckdb on AWS EC2 (r7iz.4xlarge [128GiB mem], r7iz.metal-32xl [1TiB mem]) using a couple of different approaches:
SELECT <columns> FROM 's3://..../*.parquet'SELECT <columns> FROM 's3://..../<n>.parquet'py_arrow.parquet.read_table(s3fs.S3FileSystem().open("s3://..../<n>.parquet", columns=columns))for 2b rows:
Approach 2 > Approach 3 > Approach 1
eg Approach 2 = 1.5min, Approach 3 = 2.5min, Approach 1 = 15min on 128Gib memory
for 100m rows + 250 files:
Approach 3 > Approach 2 > Approach 1
eg Approach 3 = 15s, Approach2 = 35s, Approach 1 > 2 min
for 100m rows + 50 files:
Approach 3 ~= Approach 2 > Approach 1
eg Approach 3 = 10s, Approach2 = 13s, Approach 1 > 2 min
In general, more parquet files = slower. more system memory = faster. selecting specific columns will take less time for all three approaches but the order of performance timing doesn't change.
But the common theme here is duckdb's native parquet reading from s3 is excruciatingly slow (up to 10x).
All reactions