~/talk

Lesson's Learned Optimizing Performance of Go Code

Talkat Craft Conference 2023 · 2023-05-18..05-19· [go]
slides:none on file

Polar Signals runs weekly live optimizations against Kubernetes, Prometheus, Cilium and containerd using an always-on profiler built on eBPF and the open source parca project, plus Go benchmarks and escape analysis. A concrete fix replaces reading an entire file with a 64-byte stack buffer, removing an allocation and cutting that function’s latency ~17% and shaving ~4% off containerd’s CPU (the function was ~20% of process CPU). Systematic use of buffer reuse, sync.Pool, PGO and SIMD yields routine 25–50% CPU reductions.

AI-written summary · about

  1. 0:00Introduction
  2. 1:12Moore's Law implications
  3. 5:11Three rules for performance
  4. 7:16Why continuous profiling
  5. 10:48Parca architecture
  6. 12:34Parca demo
  7. 14:02Memory reporting in containerd
  8. 16:31Writing benchmarks
  9. 19:46Avoiding memory allocations
  10. 24:25Stack vs heap
  11. 25:30Fixing escape analysis
  12. 30:34Benchmarking optimized code
  13. 31:58Batch operations and reuse
  14. 34:31Compiler optimizations
  15. 37:46Profile guided optimizations
  16. 39:14SIMD and CPU instructions
  17. 41:01Beating Moore's Law
~/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.