Worshipping at the altar of Brendan Gregg
kqr
230 points
45 comments
November 24, 2026
Related Discussions
Found 5 related stories in 37.8ms across 4,072 title embeddings via pgvector HNSW
- Four Months of Zig ibobev · 101 pts · October 27, 2026 · 38% similar
- The Claude Delusion janvdberg · 146 pts · November 14, 2026 · 37% similar
- The Fossils That Haunted Lovecraft BigTTYGothGF · 68 pts · November 16, 2026 · 35% similar
- A Love Letter to the Super Dimension Fortress jruohonen · 98 pts · October 24, 2026 · 35% similar
- Report from the Vatican chmaynard · 17 pts · October 31, 2026 · 35% similar
Discussion Highlights (12 comments)
zinc_chest63
Flame graphs alone justify the worship, found a hot regex in our billing service in ten minutes
perdy
Determinism is the underrated part of all this. For a Python framework I maintain we moved the CI benchmarks to Callgrind: instruction counts instead of time, with the cache geometry pinned so it doesn't matter which runner you land on. The numbers basically stopped moving between runs, which wall-clock never gave us on shared runners. The catch is that you lose everything off-CPU, which is exactly what this post is about, so the critical path view is a bit enviable.
sightlinemac
On a live machine you have to start tracing before the slow run happens, and tracing has a cost, so you only get a few attempts. Here every recording already logs every context switch because the VM needs them to replay, so the off-CPU and wakeup analysis can be done afterwards, on any run. The hrtime test is a useful distinction too: it accounts for 3.38s of the critical path, but the sleep is intentional, so the drag you can actually remove is zero.
despacito
Disappointed it doesn’t involve more screaming
aidanhs
I really like the idea of a deterministic VM (I like Antithesis for a similar reason!), though I saw on another post that your VM is single threaded which I feel like must compromise a lot of performance analyses? E.g. when you have very high throughput multithreaded pipelines. Personally I've really cooled on flamegraphs for the purpose of doing multithreaded performance analysis - it's so hard to infer cross-thread dependencies. I'd encourage people interested in performance analysis to read https://thume.ca/2023/12/02/tracing-methods/ (and I'd love to hear if there's something more recent than end of 2023 that has an updated census of tools) which makes a decent case for perfetto, though in my own use-cases I've just ended up creating low latency language-specific trace output library that I can aggregate and load into jaeger-ui, as you can actually add metadata indicating spans you follow from etc. For the author: your product looks very cool, but I encourage you (or someone you pay!) to do an extensive proof reading pass to remove LLM-isms, reading stuff like "process, with what it started" as a column header of ps-like output is like nails on a chalkboard.
uvdn7
Does this type of analysis and deterministic VM help async workloads (e.g. c++ coroutine, fiber, future, etc.)? My understanding is that they don't. I would love to know how to find the critical path for async code. It feels very hard (maybe impossible) to do without changing the framework code (e.g. embedding something like a request context so we know a later task on thread A is actually a continuation for request R).
adsharma
Things like this could be done via sleep profiling or CPU stall profiling. But they involve a trade-off in the Linux kernel or spending more transistors in CPU design.
mixmastamyk
Weird title. Also, the post just ends with identifying but not solving the problem?
disperso
Seems very interesting. Is there some parallel to make with RR (record and replay) in terms of features, limitations, etc.? https://github.com/rr-debugger/rr
jiveturkey
sadly the answer to the investigation was just a footnote. > 4 Turns out that the test sleeps on purpose: it is checking how far uv_hrtime moves across a sleep. There is nothing to optimize in this case. also, no explanation of why he didn't look into the epoll_wait(). i guess because this is a blocking call, not intentionally asleep, and also the intentional sleep is magnified 600 times? epoll_wait() shows up as consuming 3x of the wall time but in the shortening analysis the nanosleeps are shown to add up to more time asleep. i'm a little confused on that. good article, would have been great with more editing. and it would be great to also see an example where a problem is fixed.
hungryhobbit
A co-worker (formally of Nvidia) recently explained to us (his new company) Nvidia's cultural "speed of light" idea. The core idea is you don't ask "is our GPU (or whatever is being built) as fast as the last one?" You don't even ask "is it as good as any GPU ever made?" You instead ask "is it as fast as the speed of light?" In other words, if you just waved away everything slowing you down, what's the absolute fastest you could complete your task? ONLY once you know that can you start putting back the other factors that slow you down: first you must start by comparing to the fastest possible way things could be ("speed of light"). Similar idea here.
mikey_p
Can't see his name without thinking of "Don't yell at your JBODs! They don't like it! https://www.youtube.com/watch?v=tDacjrSCeq4