Comments (8)
It may be easier if you just run db-benchmark script having data source replaced and compare timings.
Caching data in memory,the performance of csv and parquet is indeed similar in db-benchmark's scense.
from db-benchmark.
Do you mean that Spark is not dealing well with CSV data?
It loads the data into memory so CSV is just a source for data. Later on spark operates on an in-memory object and not the CSV.
from db-benchmark.
Do you mean that Spark is not dealing well with CSV data? It loads the data into memory so CSV is just a source for data. Later on spark operates on an in-memory object and not the CSV.
Spark has specifically optimized parquet files. Take q1 of 5G data groupby operation as an example,spark processing csv dataset takes 8.42s on average. but spark processing parquet dataset takes 555ms on average.
csv data:
parquet data:
from db-benchmark.
Thanks for investigation. You should try to cache data in memory before running first query, as we do in benchmark script. As of now your code is probably including time to load data from csv in the time of query.
from db-benchmark.
Thanks for investigation. You should try to cache data in memory before running first query, as we do in benchmark script. As of now your code is probably including time to load data from csv in the time of query.
Refer to the suggestions above,I try to cache data in memory before running first query,but the result is basically the same.
from db-benchmark.
I don't think that your code caches data in memory. Spark interface is lazy and AFAIR calling persist alone does not force computation.
from db-benchmark.
I don't think that your code caches data in memory. Spark interface is lazy and AFAIR calling persist alone does not force computation.
See my code in the attachment, you can take a look at it as a whole.
spark_csv_vs_parquet.ipynb.zip
from db-benchmark.
It may be easier if you just run db-benchmark script having data source replaced and compare timings.
from db-benchmark.
Related Issues (20)
- data.table uses keyby in place of by
- developer's script location is accidentally left in the source code HOT 1
- de-serialization cost? HOT 1
- Consider renaming "Arrow" case? HOT 12
- Mind re-running with DuckDB 0.2.8? Thanks! HOT 1
- allow solutions to load data on demand for joining task HOT 2
- Steps of running benchmarks in Windows HOT 1
- pyarrow supports groupby operations now.
- Join Data generation script gets stuck with e9 rows HOT 3
- Add q/shakti HOT 2
- Make datasets more accessible HOT 4
- Get DataFusion added to H2O AI DB-Benchmark HOT 1
- Add Pyspark.pandas to benchmark HOT 1
- Has anyone following this created a dockerfile to run this?
- update the benchmarks? HOT 6
- CUDF Package Issue: Merging on categorical variables with mismatched ordering is ambiguous HOT 1
- Ruby Dataframes
- Where I can download duckdb-latest 0.8.0 for test HOT 1
- h2oai Database-like OPS Benchmark Foster Innovation and Competition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db-benchmark.