System Design
16. Performance EngineeringAnimated
Garbage Collection
Automatic reclaiming of unused memory.
The idea
The runtime finds unreachable objects and frees them, sometimes pausing the program.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- 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
- 1Mark reachable objects
- 2Sweep the unreachable
- 3Compact if needed
- 4Resume
Where it is used
Java, Go, JavaScript.
Watch out for
Long pauses hurt latency. Tune or reduce allocations.