650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
dataengineeringcentral.substack.com
650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
1–10 of 112 posts
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#2It seems like these single-node libraries can process a terabyte on a typical machine, and you'd have have over 10TB before moving to Spark.
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#3Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#4Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#532 GB of parquet cannot fit in 32GB of RAM
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#6They used a c5.4xlarge that has peak 10Gbps bandwidth, which at a constant 100% saturation would take in the ballpark of 9 minutes to load those 650GB from S3, making those 9 minutes your best case scenario for pulling the data (without even considering writing it back!)
Minute differences in how these query engines schedule IO would have drastic effects in the benchmark outcomes, and I doubt the query engine itself was constantly fed during this workload, especially when evaluating DuckDB and Polars.
The irony of workloads like this is that it might be cheaper to pay for a gigantic instance to run the query and finish it quicker, than to pay for a cheaper instance taking several times longer.
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#7Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#8If I understand correctly, polars relies on delta-rs for Delta Lake support, and that is what does not support Deletion vectors: https://github.com/delta-io/delta-rs/issues/1094 It seems like these single-node libraries can process a terabyte on a typical machine, and you'd have have over 10TB before moving to Spark.
I'm surprised by how often people jump to Spark because "it's (highly) parallelizable!" and "you can throw more nodes at it easy-peasy!" And yet, there are so many cases where you can just do things with better tools.
Like the time a junior engineer asked for help processing 100s of ~5GB files of JSON data which turned out to be doing crazy amounts of string concatenation in Python (don't ask). It was taking something like 18 hours to run, IIRC, and writing a simple console tool to do the heavy lifting and letting Python's multiprocessing tackle it dropped the time to like 35 minutes.
Right cool for the right job, people.
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#9If I understand correctly, polars relies on delta-rs for Delta Lake support, and that is what does not support Deletion vectors: https://github.com/delta-io/delta-rs/issues/1094 It seems like these single-node libraries can process a terabyte on a typical machine, and you'd have have over 10TB before moving to Spark.
> It seems like these single-node libraries can process a terabyte on a typical machine, and you'd have have over 10TB before moving to Spark. I'm surprised by how often people jump to Spark because "it's (highly) parallelizable!" and "you can throw more nodes at it easy-peasy!" And yet, there are so many cases where you can just do things with better tools. Like the time a junior engineer asked for help processing 1…
Re: 650GB of Data (Delta Lake on S3). Polars vs. DuckDB vs. Daft vs. Spark
#10Honestly this benchmark feels completely dominated by the instance's NIC capacity. They used a c5.4xlarge that has peak 10Gbps bandwidth, which at a constant 100% saturation would take in the ballpark of 9 minutes to load those 650GB from S3, making those 9 minutes your best case scenario for pulling the data (without even considering writing it back!) Minute differences in how these query engines schedule IO would h…
S3 is an amazingly engineered product, operates at truly impressive scale, is quite reasonably priced if you think of it as warm-to-very-cold storage with excellent durability properties, and has performance that barely holds a candle to any decent modern local storage device.