Performance & eBPF
Memory fragmentation
Fragmentation and retained idle memory let RSS stay above live heap data without a leak.
What you will be able to do
- Explain why RSS can exceed live heap
- Use runtime memory statistics to separate live, fragmented and idle memory
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A command to try yourself
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Performance & eBPF
- Off CPU profilingBeginner · 4 min
Off-CPU analysis measures where and how long threads wait while blocked instead of running.
- Heap profilingBeginner · 4 min
A heap profile samples allocations by call stack; inuse_space shows live memory and alloc_space shows total churn.
- Garbage collectionBeginner · 4 min
Garbage collection cost depends on the live heap and the allocation rate, not only on heap size. GOGC and GOMEMLIMIT trade CPU for memory, and each setting moves the…
- Disk latencyBeginner · 4 min
Disk latency is queueing time plus service time, and iostat's await shows both. Utilization alone does not show how much more work a device can take.
- IOPS throughputBeginner · 4 min
IOPS and throughput are linked by I/O size, so the lower of the two caps decides the speed. Test with the workload's real I/O size, not a small-block benchmark at queue…
- Network buffer tuningBeginner · 4 min
TCP buffers cap how much data a connection can have in flight, so the window and the round-trip time set the rate. Size them from bandwidth times round-trip time, then…