Performance & eBPF
Garbage collection: failure analysis
Explains the Go heap goal and the cost of each collection cycle, and how GOGC and the live heap set the trade between memory and CPU.
What you will be able to do
- Explain how GOGC and the live heap set collection frequency and cost.
- Read gctrace output and choose between a higher GOGC and a memory limit.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Performance & eBPF
- Heap profiling: failure analysisAdvanced · 4 min
Explains heap profile views, in-use and allocation, and how to tell a real leak from heavy allocation that the collector frees. Shows how to compare two profiles taken…
- Memory fragmentation: operational verificationAdvanced · 4 min
Explains memory fragmentation, where free memory exists but no contiguous block of the needed size is free, and how buddyinfo and compaction show it. Shows when to…
- Disk latency: operational verificationAdvanced · 4 min
Explains how block device counters give mean read and write latency and queue time, and why low device utilization can hide slow reads. Shows how to derive latency from…
- IOPS throughput: failure analysisAdvanced · 4 min
Explains how IOPS, bandwidth, block size and queue depth relate, and why a bandwidth quote alone does not describe a random workload. Shows how to choose a test block…
- Network buffer tuning: operational verificationAdvanced · 5 min
Explain how socket buffer sizes cap TCP throughput on long links, and check the buffers a live connection uses before changing sysctl values on any host.
- TCP backlog: failure analysisAdvanced · 5 min
Explain how the TCP accept queue fills under load, why the listen backlog alone does not raise the limit, and how to read the queue and counters on a listening socket.