1
0
mirror of https://github.com/DataDog/go-profiler-notes.git synced 2025-07-12 23:50:13 +02:00
Go to file
Felix Geisendörfer b31e9f2d88 add toc
2021-02-08 15:12:38 +01:00
2021-02-05 10:44:43 +01:00
2021-02-08 15:11:18 +01:00
2021-02-05 10:44:51 +01:00
2021-02-05 10:44:43 +01:00
2021-02-08 15:12:38 +01:00
2021-02-05 10:45:11 +01:00
2021-02-05 10:45:11 +01:00
2021-01-29 12:31:01 +01:00
2021-01-10 15:24:09 +01:00
2021-01-10 15:24:09 +01:00
2021-01-17 19:21:02 +01:00
2021-02-05 10:45:16 +01:00
2021-02-08 15:10:43 +01:00
2021-02-08 15:11:08 +01:00
2021-01-17 19:33:55 +01:00
2021-01-09 16:12:23 +01:00
2021-02-05 10:45:11 +01:00

go-profiler-notes

I've just started a new job at Datadog to work on Continuous Profiling for Go. To make sure that I know what I'm talking about, I'm planning to do an in-depth study of the existing profilers and how they work. I'll try to summarize what I learned in this repository as it might be useful to others.

Todo

  • CPU Profiling
  • Heap Profiling
  • Mutex Profiling
  • Block Profiling
  • Wallclock Profiling (fgprof)
  • Go Docs
    • Diagnostics: Has a very good overview over the available profiling and tracing facilities but doesn't go into a lot of depth.
    • runtime/pprof: Lists the available profiles and has a little more explanation about what kind of data they produce.
    • runtime: Has documentation on the various control knobs and pprof facilities, e.g. MemProfileRate.
    • net/http/pprof: Not a lot of docs, but diving into the code from there shows how the various profilers can be started/stopped on demand.
  • JDB
    • Profiler labels in Go: An introduction to using pprof labels and how they allow you to add additional context to your profiles.
    • Custom pprof profiles: Example for using custom profiles, shows tracking open/close events of a blob store and how to figure out how many blobs are open at a given time.
    • Mutex profile: Brief intro to the mutex profile.
    • Using Instruments to profile Go programs: How to use the macOS Instruments app (I think it's built on dtrace) to profile Go programs. Not clear what the benfits are, if any.
  • Profiling Go programs with pprof by Julia Evans: A nice tour with a focus on heap profiling and the pprof output format.

Got great links to recommend? Open an issue or PR, I'd happy to add your suggestions : ).

Disclaimers

I work at Datadog on Continuous Profiling for Go (you should check it out) and they generously allowed me to do all this research and publish it.

The information on this page is believed to be correct, but no warranty is provided. Feedback is welcome!

Description
felixge's notes on the various go profiling methods that are available.
Readme 12 MiB
Languages
Jupyter Notebook 95.5%
Go 3.3%
Starlark 1%
Shell 0.1%