26 comments

  • l_c_m2 minutes ago
    This is most misrepresented article on two fronts<p>1. tested column pruning and the dataset you access would have been 2 columns + metadata for the parquet files so probably fit in memory even without streaming.<p>2. Most of the processing time would be IO bound on S3 and the access patterns&#x2F;simultaneous connection limits etc. would have more of an impact than any processing code.<p>Love that you went through the pain of trying the different systems but I&#x27;d like to see an actual larger than memory query.
  • andy9910 hours ago
    Awk? <a href="https:&#x2F;&#x2F;adamdrake.com&#x2F;command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html" rel="nofollow">https:&#x2F;&#x2F;adamdrake.com&#x2F;command-line-tools-can-be-235x-faster-...</a>
  • srilman6 hours ago
    Hey everyone, I&#x27;m a software engineer at Eventual, the team behind Daft! Huge thanks to the op for the benchmark, we&#x27;re a huge fan of your blog posts and this gave us some really useful insights. For context, Daft is a high-performance data processing engine for AI workloads that works both on single-node and distributed setups.<p>We&#x27;re actively looking into the results of the benchmark and hope to share some of our findings soon. From initial results, we found a lot of potential optimizations we could make to our deltalake reader to improve parallelism and our groupby operator to improve pipelining for count aggregations. We&#x27;re hoping to roll our these improvements over the next couple of releases.<p>If you&#x27;re interested to learn more about our findings, check out our GitHub (<a href="https:&#x2F;&#x2F;github.com&#x2F;Eventual-Inc&#x2F;Daft" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Eventual-Inc&#x2F;Daft</a>) or follow us on Twitter (<a href="https:&#x2F;&#x2F;x.com&#x2F;daftengine" rel="nofollow">https:&#x2F;&#x2F;x.com&#x2F;daftengine</a>) and LinkedIn (<a href="https:&#x2F;&#x2F;www.linkedin.com&#x2F;showcase&#x2F;daftengine" rel="nofollow">https:&#x2F;&#x2F;www.linkedin.com&#x2F;showcase&#x2F;daftengine</a>) for updates. Also if Daft sounds interesting to you, give us a try via pip install daft!
  • throwaway-aws95 hours ago
    650GB? Your data is small, fits on my phone. Dump the hyped tooling and just use gnu tools.<p>Here&#x27;s an oldie on the topic: <a href="https:&#x2F;&#x2F;adamdrake.com&#x2F;command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html" rel="nofollow">https:&#x2F;&#x2F;adamdrake.com&#x2F;command-line-tools-can-be-235x-faster-...</a>
    • Demiurge5 hours ago
      What if it was 650TB? This article is obviously a microbenchmark. I work with much larger datasets, and neither awk nor DBD would make a difference to the overall architecture. You need a data catalog, and you need a clusters of jobs at scale, regardless of a data format library, or libraries.
      • CraigJPerry3 hours ago
        At 650tb it&#x27;s not a memory bound problem:<p>working memory requirements<p><pre><code> 1. Assume date is 8 bytes 2. Assume 64bit counters </code></pre> So for each date in the dataset we need 16 bytes to accumulate the result.<p>That&#x27;s ~180 years worth of daily post counts per gb ram - but the dataset in the post was just 1 year.<p>This problem should be mostly network limited in the OP&#x27;s context, decompressing snappy compressed parquet should be circa 1gb&#x2F;sec. The &quot;work&quot; of parsing a string to a date and accumulating isn&#x27;t expensive compared to snappy decompression.<p>I don&#x27;t have a handle on the 33% longer runtime difference between duckdb and polars here.
  • willvarfar4 hours ago
    I often crunch &#x27;biggish data&#x27; on a single node using duckdb (because I love using the modern style of painless and efficient SQL engines).<p>I don&#x27;t use delta or iceberg (because I haven&#x27;t needed to; I&#x27;m describing what I do, not what you can do :)), but rather just iterate over the underlying parquet files using filename listing or wildcarding. I often run queries on BigQuery and suck down the results to a bunch of ~1GB local parquet files - way bigger than RAM - that I can then mine in duckdb using wildcarding. Works great!<p>I&#x27;m in a world where I get into the weeds of &#x27;this kind of aggregation works much faster on Bigquery than duckdb, or vice versa, so I&#x27;ll split my job into this part of sql running on Bigquery then feeding into this part running in duckdb&#x27;. It&#x27;s the fun end of data engineering.
    • miohtama3 hours ago
      650GB is something one could handle using a local filesystem, no need for complex tooling.
  • luizfelberti10 hours ago
    Honestly this benchmark feels completely dominated by the instance&#x27;s NIC capacity.<p>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!)<p>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.<p>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.
    • amluto10 hours ago
      It would be amusing to run this on a regular desktop computer or even a moderately nice laptop (with a fan - give it a chance!) and see how it does. 650GB will stream in quite quickly from any decent NVMe device, and those 8-16 cores might well be considerably faster than whatever cores the cloud machines are giving you.<p>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.
      • switchbak9 hours ago
        Absolutely. I recently reworked a bunch of tests and found my desktop to outcompete our (larger, custom) Github Action runner by roughly 5x. And I expect this delta to increase a lot as you lean on the local I&#x2F;O harder.<p>It really is shocking how much you&#x27;re paying given how little you get. I certainly don&#x27;t want to run a data center and handle all the scaling and complexity of such an endeavour. But wow, the tax you pay to have someone manage all that is staggering.
      • tempest_10 hours ago
        Everyone wants a data lake when what they have a is a data pond.
        • baq3 hours ago
          I think you meant puddle.<p><i>cue Peppa Pig laughter sounds</i>
      • layoric5 hours ago
        Totally true. I have a trusty old (like 2016 era) X99 setup that I use for 1.2TB of time series data hosted in a timescaledb PostGIS database. I can fetch all the data I need quickly to crunch on another local machine, and max out my aging network gear to experiment with different model training scenarios. It cost me ~$500 to build the machine, and it stays off when I&#x27;m not using it.<p>Much easier obviously dealing with a dataset that doesn&#x27;t change, but doing the same in the cloud would just be throwing money away.
    • mrlongroots7 hours ago
      Yep I think the value of the experiment is not clear.<p>You want to use Spark for a large dataset with multiple stages. In this case, their I&#x2F;O bandwidth is 1GB&#x2F;s from S3. CPU memory bandwidth is 100-200GB&#x2F;s for a multi-stage job. Spark is a way to pool memory for a large dataset with multiple stages, and use cluster-internal network bandwidth to do shuffling instead of storage.<p>Maybe when you have S3 as your backend, the storage bandwidth bottleneck doesn&#x27;t show up in perf, but it sure does show up in the bill. A crude rule of thumb: network bandwidth is 20X storage, main memory bandwidth is 20X network bandwidth, accelerator&#x2F;GPU memory is 10X CPU. It&#x27;s great that single-node DuckDB&#x2F;Polars are that good, but this is like racing a taxiing aircraft against motorbikes.
      • justincormack2 hours ago
        Network bandwidth is not 20x storage ant more. An SSD is around 10GB&#x2F;s now, so similar to 100Gb ethernet.
    • mrbungie7 hours ago
      &gt; 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!)<p>The query being tested wouldn&#x27;t scan the full files and in reality the query in most sane engines would be processing much less than 650GB of data (exploiting S3 byte-range reads): i.e. just 1 column: a timestamp, which is also correlated with the partition keys. Nowadays what I would mostly be worried about the distribution of file size, due to API calls + skew; or if the query is totally different to the common query access patterns that skips the metadata&#x2F;columnar nature of the underlying parquet (i.e. doing an effective &quot;full scan&quot; over all row groups and&#x2F;or columns).<p>&gt; 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.<p>That&#x27;s absolutely right.
    • kccqzy9 hours ago
      10Gbps only? At Google where this type of processing would automatically be distributed, machines had 400Gbps NICs, not to mention other innovations like better TCP congestion control algorithms. No wonder people are tired of distributed computing.
      • otterley4 hours ago
        You can get a 600Gbps interface on an Amazon EC2 instance (c8gn.48xlarge), if you’re willing to pay for it.
      • basilgohar9 hours ago
        &quot;At Google&quot; is doing all the heavy lifting in your comment here, with all due respect. There is but one Google but remain millions of us who are not &quot;At Google&quot;.
        • kccqzy8 hours ago
          I’m merely describing the infrastructure that at least partially led to the success of distributed data processing. Also 400Gbps NIC isn’t a Google exclusive. Other clouds and on-premise DCs could buy them from Broadcom or other vendors.
          • degamad8 hours ago
            The infra might have a 400Gbps NIC, but if you&#x27;re buying a small compute slice on that infra, you don&#x27;t get all the capability.
    • bushbaba9 hours ago
      I&#x27;m kind of suprised they didn&#x27;t choose an ec2 instance with higher throughput. S3 can totally eek out 100s of Gibps with the right setup.<p>BUT the author did say this is the simple stupid naive take, in which case DuckDB and Polars really shined.
    • dukodk8 hours ago
      c5 is such a bad instance type, m6a would be so much better and even cheaper, I would love to see this on an m8a.2xlarge (7th and 8th generations don’t use SMT) and that is even cheaper and has up to 15 Gbps
      • luizfelberti7 hours ago
        Actually for this kind of workload 15Gbps is still mediocre. What you actually want is the `n` variant of the instance types, which have higher NIC capacity.<p>In the c6n and m6n and maybe the upper-end 5th gens you can get 100Gbps NICs, and if you look at the 8th gen instances like the c8gn family, you can even get instances with 600Gbps of bandwidth.
  • benrutter2 hours ago
    I love this article! But I think this insight shouldn&#x27;t be surprising. Distribution <i>always</i> has overheads, so if you can do things on a single machine it will almost always be faster.<p>I think a lot of engineers expect 100 computers to be faster than 1, because of the size comparison. But we&#x27;re really looking at a process here, and a process shifting data between machines will almost always have to do more stuff, and therefore be slower.<p>Where spark&#x2F;daft are needed is if you have 1tb of data or something crazy were a single machine isn&#x27;t viable. If I&#x27;m honest though, I&#x27;ve seen a lot of occasions where someone <i>thinks</i> they have that happening, and none so far where they actually do.
  • blmarket10 hours ago
    Presto (a.k.a. AWS Athena) might be a faster&#x2F;better alternative? Also would like to see if 650GB data is available locally.
    • fifilura3 hours ago
      Presto is renamed to Trino now.<p>But I concur with what you say. It is also very cheap in both maintenance and running cost. It is just an amazing tool and you pay (RIP) pennies.
  • pu_pe3 hours ago
    In places I have worked at that used Databricks, I feel they chose it for the same reasons big orgs use Microsoft: it comes out of a box and has a big company behind it. Technical benchmarks or even cost considerations would be a distant second.
  • esafak11 hours ago
    If I understand correctly, polars relies on delta-rs for Delta Lake support, and <i>that</i> is what does not support Deletion vectors: <a href="https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta-rs&#x2F;issues&#x2F;1094" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta-rs&#x2F;issues&#x2F;1094</a><p>It seems like these single-node libraries can process a terabyte on a typical machine, and you&#x27;d have have over 10TB before moving to Spark.
    • mynameisash10 hours ago
      &gt; It seems like these single-node libraries can process a terabyte on a typical machine, and you&#x27;d have have over 10TB before moving to Spark.<p>I&#x27;m surprised by how often people jump to Spark because &quot;it&#x27;s (highly) parallelizable!&quot; and &quot;you can throw more nodes at it easy-peasy!&quot; And yet, there are <i>so many</i> cases where you can just do things with better tools.<p>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&#x27;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&#x27;s multiprocessing tackle it dropped the time to like 35 minutes.<p>Right cool for the right job, people.
      • rgblambda2 hours ago
        I think Spark was the best tool out there when data engineering started taking off, and it just works (provided you don&#x27;t have to deal with jar dependency hell) so there&#x27;s not a huge incentive to move away from it.
      • esafak10 hours ago
        I used pySpark some time ago when it was introduced to my company at the time and I realized that it was slow when you used python libraries in the UDFs rather than pySpark&#x27;s own functions.
  • jdnier10 hours ago
    DuckDb has a new &quot;DuckLake&quot; catalog format that would be another candidate to test. <a href="https:&#x2F;&#x2F;ducklake.select&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ducklake.select&#x2F;</a>
    • garganzol8 hours ago
      DuckLake format has an unresolved built-in chicken and egg conflict: it requires SQL database to represent its catalog. But this is what some people are running away from when they choose Parquet format in the first place. Parquet = easy, SQL = hard, adding SQL to Parquet makes the resulting format hard. I would expect a catalog to be in Parquet format as well, then it becomes something self-bootstrapping and usable.
      • datacynic19 minutes ago
        DuckLake is more comparable to Iceberg and Delta than to raw parquet files. Iceberg requires a catalog layer too, a file system based one at its simplest. For DuckLake any RDBMS will do, including fs-based ones like DuckDB and SQLite. The difference is that DuckLake will use that database with all its ACID goodness for all metadata operations and there is no need to implement transactional semantics over a REST or object storage API.
      • matt1234567898 hours ago
        It is not a chicken and egg problem, it is just a requirement to have an RDBMS available for systems like DuckLake and Hive to store their catalogs in. Metadata is relatively small and needs to provide ACID r&#x2F;w =&gt; great RDBMS use case.
        • dsp_person6 hours ago
          What about file-based catalogs with Iceberg? Found one that puts it in a single json file: <a href="https:&#x2F;&#x2F;github.com&#x2F;boringdata&#x2F;boring-catalog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;boringdata&#x2F;boring-catalog</a>
          • saxenaabhi5 hours ago
            Then concurrency suffers since you have to have locks when you update files.<p>That&#x27;s also why ducklake performs better than others.<p>For many use cases this trade-off is worth it.
  • ayhanfuat1 hour ago
    What is the point of simulating 650GB data with ~40 columns if you are going to use a single column for testing? Is that even 16GB?
  • zkmon4 hours ago
    There are other factors as well, that drive the decision makers to clusters and big-data tech, even when the benchmarks do not justify that. At the root, the reasons are organizational, not technical. Risk aversion seeks to avoid single point of failure, needs accountability, favors outsourcing to specialists etc. Performance alone is not going to beat all of that.
    • willvarfar3 hours ago
      Often, at the medium and large sized companies its not &#x27;risk aversion&#x27;, its resume padding.<p>Architects want to build big impressive systems that justify their position and managers want that too because success is judged by size of systems and number of staff under management, not its efficiency; its all about perverse incentives.<p>This is just a tax the scientists trying to use whatever the company settles on have to pay every time they wait for queries to run.<p>These days scientists can just suck down a copy of a bunch of data to their laptop or a cheap cloud VM and do their crunching &#x27;locally&#x27; there. The company data swamp is just something they have to interface with occasionally.<p>Of course things go pear-shaped if they get detected, so don&#x27;t tell anyone :D
      • zkmon3 hours ago
        Quite true. There are hardly any technical justifications for this madness, other than seeking a bloat of work and team size at the expense of huge spend.
  • mettamage3 hours ago
    &gt; Truly, we have not been thinking outside the box with the Modern Lake House architecture. Just because Pandas failed us doesn’t mean distributed computing is our only option.<p>Well yea, I would have picked polars as well. To be fair , I didn’t know about some of these.
  • nikita22062 hours ago
    I am not in data eng, but I do occasionally query data lake at my company. Where does Snowflake stand in this? (specially looking at that Modern Data Stack image)
    • roeja2 hours ago
      Snowflake has their own sql engine and is more of a serverless option. Databricks started off with spark but now also has a sql engine(optional serverless) as well, they are using spark in the article.<p>The delta format is Databricks lakehouse file format, snowflake uses iceberg I believe.<p>Both Snowflake and Databricks also provide a ton of other features like ML, Orchestration and governance. Motherduck would be the direct competitor here.<p>Saying that there are now extensions to query snowflake or databricks data from duckdb for simple ad hoc querying.<p>Duckdb is fantastic and has saved me so many times strongly recommended.
      • prpl1 hour ago
        &quot;but now also has a sql engine&quot;<p>it has had a combined SQL and dataframe engine since March 2015...
    • benrutter2 hours ago
      I beleive snowflake has its own distributed query engine, similar to say, big query.<p>It&#x27;s a bit of a tricky comparison because snowflake, and a lot of other tools that get referred to as &quot;modern data stack&quot; are very vendor based. If you&#x27;re using snowflake, you&#x27;re probaby using it on snowflake provided architecture with a whole load of proprietary stuff. You can&#x27;t &quot;swap in&quot; snowflake on the same hardware like you can with spark, daft, duckdb, polars etc.<p>That said, iirc benchmarks normally place it very similar to spark. It&#x27;s distributed, so I&#x27;d be very surprised if it wasn&#x27;t in the spark&#x2F;daft ballpark rather than polars&#x2F;duckdb.
    • throwaw122 hours ago
      I am curious as well about this, we use Snowflake, but as a software engineer I want to understand how Spark&#x2F;Databricks is different, what are we missing out?<p>How we work with data is simple, if SQL+dashboard solves the problem then we do it in Snowflake, if we need something more advanced, then code + bunch of SQL.<p>Pretty sure ML engineers work in different ways, but I don&#x27;t know that side well
  • nevi-me4 hours ago
    The main reason why clusters still make sense is because you&#x27;ll have a bunch of people accessing subsets of much larger data regularly, or competing processes that need to have their output ready at around the same time. You distribute not only compute, but also I&#x2F;O, which others are pointing out to likely dominate the runtime of the benchmarks.<p>Beyond Spark (one shouldn&#x27;t really be using vanilla Spark anyways, see Apache Comet or Databricks Photon), distributing my compute makes sense because if a job takes an hour to run, (ignoring overnight jobs) there will be a bunch of people waiting for that data for an hour.<p>If I run a 6 node cluster that makes the data available in 10 minutes, then I save in waiting time. And if I have 10 of those jobs that need to run at the same time, then I need a burst of compute to handle that.<p>That 6 node cluster might not make sense on-prem unless I can use the compute for something else, which is where PAYG on some cloud vendor makes sense.
  • co0lster10 hours ago
    650GB relates to size of parquet files which are compressed in reality it’s way more.<p>32 GB of parquet cannot fit in 32GB of RAM
    • m00x5 hours ago
      You don&#x27;t need it to if you just need specific columns. This is the advantage of columnar storage.
    • barrkel9 hours ago
      This would speed things up since it looks like the bottleneck here is I&#x2F;O.
  • jiehong4 hours ago
    This is somewhat real world, except real world would probably index some parquet columns to avoid a full scan like that.
  • baq3 hours ago
    650GB would’ve fit in a not-exotic-at-all basically off the shelf server ram a decade ago
  • dogman1238 hours ago
    One thing that I never really see mentioned in these types of articles is that a lot of DuckDB’s functionality does not work if you need to spill to disk. iirc, percentiles&#x2F;quartiles (among other aggregate functions) caused DuckDB to crash out when it spilled to disk.
    • jtbaker8 hours ago
      I’m pretty sure I’ve done this and not had any issues. Can you share a minimum reproducible example?
  • zigzag3121 hour ago
    DataFusion is another option I would be interested to see in a comparison like this.
  • abofh9 hours ago
    6$ of data does not a compelling story make. This is not 1998
  • gdevenyi8 hours ago
    I hate this screenshots for commands and outputs everywhere
    • tacker20002 hours ago
      I also hate it. Cant read it properly on mobile and cant copy it if needed.<p>But the worst thing is that these are not even real screenshots, the author pasted the text into some terminal window screenshot generator tool.
  • hnidiots38 hours ago
    650GB? We have 72PB IN S3, know people who have multiple EB in S3.
    • 0cf8612b2e1e8 hours ago
      This is not a game of, “mine is bigger than yours”. Many many workloads in the wild are smaller than this.<p>Motherduck have a few posts about how few people have “big data”. <a href="https:&#x2F;&#x2F;motherduck.com&#x2F;blog&#x2F;redshift-files-hunt-for-big-data&#x2F;" rel="nofollow">https:&#x2F;&#x2F;motherduck.com&#x2F;blog&#x2F;redshift-files-hunt-for-big-data...</a>
    • esafak8 hours ago
      That has to be multiple data sets. How big are your individual nightly jobs, and what are you processing them with?