[HN Gopher] Coz: Causal Profiling
___________________________________________________________________
Coz: Causal Profiling
Author : keepamovin
Score : 53 points
Date : 2024-04-19 06:09 UTC (1 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| efferifick wrote:
| I've been a big fan of Emery's research. Coz is one tool that I
| am always wanting to use, but I haven't had the chance to do so.
|
| Check his other research. Some of it is highly accessible via
| youtube videos. I recommend watching / reading: *
| Stabilizer * Mesh * Scalene
| brunoqc wrote:
| I remember seeing the video 8 years ago but I never heard about
| it again.
|
| I was wondering if the project was stuck or just a PoC.
|
| I wonder if it evolved and how useful it has been since.
| nestorD wrote:
| I have seen Rust people use it, it has a library:
|
| https://crates.io/crates/coz
| IshKebab wrote:
| I looked into this years ago but it was very complex to set up,
| and I believe it only really has benefit if you have a lot of
| threads waiting for a long time for other threads, which is
| pretty rare in my experience.
|
| Neat idea though.
| j-pb wrote:
| Complex?
|
| You include the library, put some "progress" markers into your
| benchmarks, and run them.
|
| It took me minutes in both Rust and Zig to set up.
|
| I've seen huge improvements with it for a single threaded
| embedded database I'm building.
|
| The only downside is that it doesn't track some things like
| memcpy well so you also need a flamegraph.
| IshKebab wrote:
| Yes it was very complex. Maybe it has improved since I tried
| it.
|
| Compare to running with a traditional profiler which only
| requires setting an environment variable (for gperftools at
| least which is my preference). I don't even need to recompile
| my program.
|
| > I've seen huge improvements with it for a single threaded
| embedded database I'm building.
|
| How would this make any difference for a single threaded
| program?
| j-pb wrote:
| > How would this make any difference for a single threaded
| program?
|
| Coz can slow down individual sections, not only threads.
| This will show you how your program behaves with specific
| lines sped up regardless of threads. A modern computer is
| also a distributed system, so it has the same counter-
| intuitive performance behaviours, even when just looking at
| the memory hierarchy.
| jcalabro wrote:
| There's a great talk that explains how/why this works for those
| looking for more info.
|
| Also, Go UMass!
|
| https://www.youtube.com/watch?v=r-TLSBdHe1A
| junon wrote:
| I've tried a number of times to integrate Coz into projects and
| the developer experience for it is pretty bad. I think of all the
| times I've tried it it linked correctly _maybe_ once, and even
| then didn 't really give me any data.
|
| I really want to love this research because having read into it I
| think it's really valuable, but not ever getting it working is so
| discouraging.
___________________________________________________________________
(page generated 2024-04-20 23:00 UTC)