# Your CPU at 100% Is Mostly Waiting on Memory

Original title: It's the Memory Latency, Stupid

> Hacker News story 50318720 · language: en · submitted 2026-10-31
> Web version: https://zeli.app/story/50318720
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 251 · by [ntur1337](<https://news.ycombinator.com/user?id=ntur1337>) · 💬 89
[original](<https://pivotlake.io/blog/its-the-memory-latency-stupid/>) · [HN discussion](<https://news.ycombinator.com/item?id=50318720>)

## Summary

A 100% CPU reading doesn't mean the processor is busy computing—often it's stalled on memory. A modern core can execute 4–8 instructions per nanosecond, while a DRAM access takes 50–100ns, so a single RAM fetch can cost 400–800 instructions of waiting. The Pivot team demonstrates this with a naive GROUP BY on ClickBench's 99M-row hits dataset: 50% of CPU time was spent stalled on memory and only 16% retiring operations. Radix partitioning into 4,096 pieces shrinks the working hash tables to fit in cache, cutting DRAM traffic from 4.5GB to 1.5GB and runtime from 3.6s to 2.7s.

## Key quote

> This tells us that 50.1% of the time, the CPU couldn't do anything because it was stalling on memory! And only 16.1% of the time the CPU was actually retiring (aka doing) operations.

## HN discussion (89 comments)

### [boricj](<https://news.ycombinator.com/item?id=50319344>)

> 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 processing libraries and an object pool with links that use index+generations like 2000s video games... on a STM32H5 with less than a megabyte of RAM.
>
> Mechanical sympathy feels like a lost art to people I demonstrate it to... and I had to demonstrate to the first team with benchmark numbers that I would not be the bottleneck between us by orders of magnitudes.

### [happyPersonR](<https://news.ycombinator.com/item?id=50321476>)

> Shout out to the author, it seems coherent.
>
> I like flamegraphs
>
> I know folks use perf to help generate them
>
> But in the future, now that Llm is here, get and agent to check assembly, PMUs and also see what you’re doing in assembly.
>
> My 2c and happy coding to everyone :)

### [drivebyhooting](<https://news.ycombinator.com/item?id=50320981>)

> I feel like the solution presented is just a clustered hashmap or “locality sensitive” if you’d like it.
>
> Still not orders of magnitude better.

### [brcmthrowaway](<https://news.ycombinator.com/item?id=50320505>)

> https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
>
> Has anyone rewritten this for 2026?

---

## Cite

- Page: https://zeli.app/story/50318720
- Date: 2026-10-31
- Source: pivotlake.io (https://pivotlake.io/blog/its-the-memory-latency-stupid/)
- Hacker News: https://news.ycombinator.com/item?id=50318720

## Other languages

- zh: https://zeli.app/zh/story/50318720 · markdown: https://zeli.app/zh/story/50318720.md
- ja: https://zeli.app/ja/story/50318720 · markdown: https://zeli.app/ja/story/50318720.md
- ko: https://zeli.app/ko/story/50318720 · markdown: https://zeli.app/ko/story/50318720.md
- de: https://zeli.app/de/story/50318720 · markdown: https://zeli.app/de/story/50318720.md
- es: https://zeli.app/es/story/50318720 · markdown: https://zeli.app/es/story/50318720.md
- ru: https://zeli.app/ru/story/50318720 · markdown: https://zeli.app/ru/story/50318720.md
