~/talk

Go Profiling and Observability from Scratch

Talkat GopherCon 2021 · 2021-12-05..12-08· [go, observability]
slides:none on file

Simple Go runtime model plus hands-on tools: CPU, memory, block, mutex, goroutine profilers and the runtime tracer, plus eBPF (bpftrace), Linux perf, Delve and a small ftprof prototype. Claims: heap allocations and GC can cost ~20% CPU; CPU profiler samples at 100Hz (setcpuprofilerate), Go 1.18 fixes a 250-signal limiter; block profiler and tracer can add large overhead on heavy channel/mutex workloads while cpu/mem/mutex are usually safe in production. Concrete knobs: block rate ≈10000, mutex rate ≈10.

AI-written summary · about

  1. 0:00Intro
  2. 0:15Target audience
  3. 0:26Agenda
  4. 1:26Scheduling & Memory Management
  5. 5:32Memory Management: Stack
  6. 6:59Memory Management: Heap
  7. 11:06CPU Profiler: SIGPROF for every 10ms of CPU Time
  8. 11:51CPU Profiler: Add Stacktrace to Profile
  9. 12:02CPU Profiler: Waiting for Go 1.18
  10. 13:28Block Profiler: Channels
  11. 14:19Block Profiler: Mutexes
  12. 14:52Mutex Profiler
  13. 15:17Block vs Mutex
  14. 16:34Quick Note on Time: 1 Request - 3 Goroutines
  15. 18:41Memory Profiling
  16. 20:32Goroutine Profiling
  17. 22:18Tracing Manually
  18. 24:33Runtime Tracer
  19. 26:18Profiling and Tracing: A Faustian Bargain?
  20. 26:50Profiling and Tracing Overhead Analysis
  21. 27:34Overhead Analysis: SQL Workload
  22. 29:03Overhead Analysis: HTTP Workload
  23. 30:02Overhead Analysis: JSON Workload
  24. 30:51JsoN Workload (Concurrency = 8)
  25. 33:47Overhead Analysis: Chan Workload
  26. 34:53Overhead Analysis: Error Sources
  27. 36:16Metrics
  28. 38:01Linux perf
  29. 38:36bpftrace
  30. 41:34Scheduling / Execution Observability
  31. 42:12Memory Management Observability
  32. 42:42Recap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.