~/talk

Go’s Trace Tooling and Concurrency

Talkat GopherCon 2025 · 2025-08-26..08-28· [go]
slides:none on file

A small Go program processes 4,000 RSS-like documents to count a topic and generates a detailed go tool trace (about 1.3 MB trace). The single-thread run takes ~1,000 ms; launching 4,000 goroutines drops to 289 ms but triggers a data race resolved with atomic.AddInt32 and per-goroutine local counters to avoid cache thrash. Switching to a 16-worker pool runs ~388 ms with heavy GC; raising GC budget (e.g. GOGC=1000 → 136 ms) or setting GOMEMLIMIT to 60 MiB restores speed while keeping memory stable.

AI-written summary · about

  1. 0:00Analyzing program performance
  2. 2:58Trace tool overview
  3. 6:48Implementing concurrency
  4. 11:44Fixing data races
  5. 15:31Performance comparison
  6. 21:27Implementing a worker pool
  7. 24:25Tuning garbage collection
  8. 28:47GOMEMLIMIT impact
  9. 30:53Conclusion
~/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.