Skip to content Skip to content
Vladimir Chavkov

Go Performance & Optimization Training

Unlock the full performance potential of Go with this intensive 2-day training. Learn to profile, benchmark, and optimize Go applications using the tools built into the Go ecosystem, from CPU and memory profiling to garbage collector tuning and compiler optimizations.

Duration2 days (16 hours)
LevelAdvanced
DeliveryIn-person, Live online, Hybrid
CertificationN/A
  • Senior Go developers optimizing production services
  • Performance engineers working with Go applications
  • Backend engineers troubleshooting latency and memory issues
  • Technical leads setting performance standards for Go projects

After completing this training, participants will be able to:

  • Profile Go applications using pprof (CPU, memory, goroutine, block)
  • Write and interpret benchmarks with testing.B
  • Optimize memory allocations and reduce GC pressure
  • Tune the garbage collector for specific workloads
  • Apply escape analysis to understand heap vs stack allocation
  • Identify and eliminate performance bottlenecks in production code

Module 1: Benchmarking with testing.B

  • Writing benchmarks and sub-benchmarks
  • Benchmark flags (-benchtime, -benchmem, -count)
  • Comparing benchmarks with benchstat
  • Avoiding common benchmarking pitfalls
  • Hands-on: Benchmark a data processing library

Module 2: CPU Profiling

  • pprof CPU profiling (runtime/pprof and net/http/pprof)
  • Reading flame graphs and call graphs
  • Identifying hot paths and CPU-bound bottlenecks
  • go tool pprof interactive analysis
  • Hands-on: Profile and optimize a CPU-bound service

Module 3: Memory Profiling

  • Heap profiling and allocation tracking
  • Inuse vs alloc memory profiles
  • Identifying memory leaks
  • Object allocation patterns
  • Hands-on: Find and fix memory leaks in a long-running service

Module 4: Escape Analysis and Allocation

  • Stack vs heap allocation in Go
  • Escape analysis with -gcflags=“-m”
  • Reducing allocations with sync.Pool
  • Value vs pointer semantics for performance
  • Hands-on: Optimize allocation-heavy code paths

Module 5: Garbage Collector Tuning

  • Go GC internals (tri-color mark and sweep)
  • GOGC and GOMEMLIMIT settings
  • GC pacer and latency impact
  • Monitoring GC with runtime/metrics
  • Hands-on: Tune GC for a latency-sensitive service

Module 6: Advanced Optimization

  • String and byte slice optimization
  • Map and slice pre-allocation
  • Interface call overhead and devirtualization
  • Compiler optimizations and inlining
  • Concurrent data structure design
  • Hands-on: Capstone — optimize a real-world Go service for throughput and latency
  • Strong Go development experience
  • Understanding of Go concurrency (goroutines, channels)
  • Familiarity with Go toolchain and testing
  • Basic understanding of computer architecture (CPU cache, memory hierarchy) is helpful
FormatDescription
In-PersonOn-site at your company’s location, hands-on with direct interaction
Live OnlineInteractive virtual sessions with screen sharing and real-time labs
HybridCombination of on-site and remote sessions, flexible scheduling

All formats include hands-on labs, course materials, profiling cheat sheets, and post-training support.