Skip to content
StackDecode
System Design
16. Performance EngineeringAnimated

Memory Profiling

Finding what uses memory.

The idea

Heap profiles show which objects are allocated and retained.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

AppsCollectorMetrics (Promet…Logs (Loki)Traces (Tempo)Dashboards
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Apps emit metrics, logs and traces.

step:
1/4
at:
Apps
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Capture a heap snapshot
  2. 2Compare over time
  3. 3Find growing objects
  4. 4Fix the retention

Where it is used

Leaks and bloat.

Watch out for

Look for objects that should have been freed.

Related