~/talk

Go Channels slow down with more CPUs

Talkat GopherCon UK 2024 · 2024-08-14..08-16· [go]
links:none on file
slides:none on file

Fastly finds a surprising 3–10x drop in Go channel throughput as CPU count rises: benchmarks on real aggregator hardware (up to 128 cores) show per-channel rates falling to ~1M msgs/sec from ~6–10M. Tests use Go benchmarks, benchstat and varying CPU caps; range vs select behavior and buffered batches are measured. Workarounds include lowering GOMAXPROCS (e.g. GOMAXPROCS=32), batching messages, sharding across multiple channels, timeouts, or more workers/containers.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26Speaker background Fastly edge
  3. 3:58Fastly caching shielding reduce load
  4. 5:47Logging bottlenecks
  5. 7:33Channel performance plateau
  6. 10:03Channel locks in Go runtime
  7. 11:30Single channel bottleneck logging
  8. 13:56Hardware specs benchmark setup
  9. 15:26Benchmarking tips Go tests
  10. 17:55Parallel benchmarks hardware
  11. 19:00Benchmark results slowdowns
  12. 21:26Contention in channel ops
  13. 22:48Buffered channels throughput
  14. 24:12Key findings throughput drops CPUs
  15. 24:34Solutions channel performance
  16. 25:14Solution adjust GOMAXPROCS
  17. 26:18Solution lock goroutines threads
  18. 27:20Solution timeouts channel sends
  19. 28:44Solution split load channels
  20. 29:28Solution buffer messages
  21. 31:13Containerized workloads
  22. 32:18Summary findings solutions
  23. 33:23Q&A CPUs worsen throughput
  24. 34:27Q&A Performance fluctuations
  25. 36:29Q&A Hyperthreading CPU pinning
  26. 38:19Closing remarks
~/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.