conv.

All stories
TechQuiet 11d · day 14

Pivot Lake's "Memory Latency, Stupid" post on GROUP BY hits HN front page

A technical breakdown of why 100%-CPU databases are often memory-bound, using a GROUP BY benchmark, gains traction across HN, Reddit and Mastodon.

What to know

  • The post argues that 100% CPU utilization can mask the fact that a CPU is idle while waiting on slow memory accesses rather than doing useful work.
  • A naive GROUP BY over 99 million rows with ~17 million unique keys takes 3.9 seconds on a single core because nearly every hash-table lookup misses CPU caches and hits RAM.
  • The same article circulated for three days with little attention before a later Hacker News submission broke through to the front page with 101 points and 32 comments.

Pivot Lake Database engine vendor and blog author

How it unfolded 5 developments, newest first · click a bar or a number to jump articlesposts

Peak 5 pieces in 4h at Oct 31, 3 PM; 21 pieces over 14 days (2 articles · 6 posts · 13 comments) Oct 29, 11 AM — 2 pieces · 2 posts — Hacker News 1, Reddit 1Oct 29, 3 PM — quietOct 29, 7 PM — quietOct 29, 11 PM — quietOct 30, 3 AM — quietOct 30, 7 AM — 1 piece · 1 post — Hacker News 1Oct 30, 11 AM — quietOct 30, 3 PM — quietOct 30, 7 PM — quietOct 30, 11 PM — quietOct 31, 3 AM — quietOct 31, 7 AM — quietOct 31, 11 AM — 4 pieces · 2 articles · 1 post · 1 comment — Newswires 2, Hacker News 2Oct 31, 3 PM — 5 pieces · 5 comments — Hacker News 5Oct 31, 7 PM — 3 pieces · 1 post · 2 comments — Hacker News 2, Mastodon 1Oct 31, 11 PM — quietNov 1, 2 AM — 3 pieces · 1 post · 2 comments — Hacker News 2, Mastodon 1Nov 1, 6 AM — quietNov 1, 10 AM — 1 piece · 1 comment — Hacker News 1Nov 1, 2 PM — 2 pieces · 2 comments — Hacker News 2Nov 1, 6 PM — quietNov 1, 10 PM — quietNov 2, 2 AM — quietNov 2, 6 AM — quietNov 2, 10 AM — quietNov 2, 2 PM — quietNov 2, 6 PM — quietNov 2, 10 PM — quietNov 3, 2 AM — quietNov 3, 6 AM — quietNov 3, 10 AM — quietNov 3, 2 PM — quietNov 3, 6 PM — quietNov 3, 10 PM — quietNov 4, 2 AM — quietNov 4, 6 AM — quietNov 4, 10 AM — quietNov 4, 2 PM — quietNov 4, 6 PM — quietNov 4, 10 PM — quietNov 5, 2 AM — quietNov 5, 6 AM — quietNov 5, 10 AM — quietNov 5, 2 PM — quietNov 5, 6 PM — quietNov 5, 10 PM — quietNov 6, 2 AM — quietNov 6, 6 AM — quietNov 6, 10 AM — quietNov 6, 2 PM — quietNov 6, 6 PM — quietNov 6, 10 PM — quietNov 7, 2 AM — quietNov 7, 6 AM — quietNov 7, 10 AM — quietNov 7, 2 PM — quietNov 7, 6 PM — quietNov 7, 10 PM — quietNov 8, 2 AM — quietNov 8, 6 AM — quietNov 8, 10 AM — quietNov 8, 2 PM — quietNov 8, 6 PM — quietNov 8, 10 PM — quietNov 9, 2 AM — quietNov 9, 6 AM — quietNov 9, 10 AM — quietNov 9, 2 PM — quietNov 9, 6 PM — quietNov 9, 10 PM — quietNov 10, 2 AM — quietNov 10, 6 AM — quietNov 10, 10 AM — quietNov 10, 2 PM — quietNov 10, 6 PM — quietNov 10, 10 PM — quietYesterday, 2 AM — quietYesterday, 6 AM — quietYesterday, 10 AM — quietYesterday, 2 PM — quietYesterday, 6 PM — quietYesterday, 10 PM — quietToday, 2 AM — quietToday, 6 AM — quietToday, 10 AM — quietToday, 2 PM — quietToday, 6 PM — quiet 1–234–5
Oct 30Nov 1Nov 3Nov 5Nov 7Nov 9now · 8:43 PM ET
  1. 5

    Post is shared on Mastodon

    An automated Mastodon account linking to Hacker News discussions reposts the article and its HN comment thread.

    • Modern CPUs have hundreds of megabytes of cache. That's more than the entire hard disk space required by Windows in the 1990s.You could install an entire Windows system, emulated in cache of a modern CPU, including the hard disk, and modern computers are still slow, partly because the CPU does nothing while waiting for RAM to fetch data, and…

      bugakeHacker News11d agoview on Hacker News ↗
    2 more of the top 3 · 12 posts in this stretch
    • hn100@social.lansky.name

      It's the Memory Latency, Stupid Link: https:// pivotlake.io/blog/its-the-memo ry-latency-stupid/ Discussion: https:// news.ycombinator.com/item?id=5 0318720

      hn100@social.lansky.nameMastodon12d agoview on Mastodon ↗
    • Hi, i just have 2 questions. Are your machines priorizing Space over Processing ? In terms to save a few bytes, cos "Rendering" (for example) is done by the clients machine as an example? Or have i missunderstood something? I am asking, cos the first answer in the posting seem to miss: "commenting the code good enough than anyone may 'understood…

      inoknowtoaskHacker News11d agoview on Hacker News ↗
    all of them →
  2. 4

    Post breaks through to HN front page

    A third Hacker News submission of the same article gains significant traction, reaching 101 points and 32 comments, and is also picked up by the HN Frontpage RSS feed.

    “This takes... a whopping 3.9 seconds.”
    — pivotlake.io blog post
    • I work with another team at work that uses lots of message passing, C++ virtual methods in deeply nested class hierarchies, large DOMs and off-the-shelf C++ STL containers... on a STM32MP1, which has an in-order Cortex-A7 and a pittance of cache.On the other hand, in my team I wrote my custom C++ STL containers that allocate inline, SAX-style…

      boricjHacker News12d agoview on Hacker News ↗
    2 more of the top 3 · 3 posts in this stretch
    • I’ve had code review pushback against reorganizing data structures to be more cache-friendly on the grounds that it was “premature optimization” even though I pre-emotively justified the decision with benchmark results indicating that the performance difference was large and business relevant, and addressed a real performance bottleneck that I…

      bunderbunderHacker News12d agoview on Hacker News ↗
    • I work in the games industry with exceptionally skilled system programmers that can do that too. They're getting on in age, and there's fewer programmers in the younger generations that are interested in any of it. Technology is sadly increasingly homogenising around Unreal Engine 5

      jordandHacker News12d agoview on Hacker News ↗
    all of them →
  3. 3

    Post resubmitted to HN under a new title

    The identical article is resubmitted to Hacker News as "Making GROUP BY faster by doing more (CPU) work," again with minimal traction.

  4. 2

    Post is cross-posted to Reddit

    The same article is shared on Reddit shortly after its first Hacker News appearance, drawing no measurable engagement.

  5. 1

    Pivot Lake publishes memory-latency explainer on GROUP BY performance

    The post explains CPU cache hierarchy and memory access latency, then benchmarks a naive single-core GROUP BY over 99 million rows with ~17 million unique keys, taking 3.9 seconds. It is first submitted to Hacker News with little initial traction.

    1. first by HN Best, 12d ago · also HN Frontpage

What people are saying 9 voices from 2 sites · best of 15 · verbatim