No GC coding techniques for low latency Java
summary
Claims that production systems treat any full GC as an incident and allow GC only during initialization, and that applying low‑GC patterns removes those pauses. Practical techniques shown: presize collections to avoid reallocations (example: a planet factory called 1,000,000 times creates 8 objects instead of 1,000,000), use primitive collections (Trove/fastutil) to avoid boxing, singletons/enums for reuse, object pools, thread‑locals, log‑guarding and reusable mutable objects. Trade‑offs: added complexity, testing and dependency risk.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:30Low latency
- 9:57Small discussion
- 15:17Questions
- 15:32Singleton
- 16:07Benefits
- 16:41Tradeoffs
- 17:47Enumeration
- 18:10Flyweight
- 19:40Precise and Collections
- 20:16Primitive Type Collections
- 21:36String Builder
- 21:59enumerate in constants
- 23:51clone guard
- 24:41reusable object
- 26:30QA
related talks
52mGC Tuning & Troubleshooting Crash Course
25mGarbage Collection Primer
50mUnderstanding Low Latency JVM GCs
52mUnderstanding Java Garbage Collection
50mTrash Talk - Exploring the JVM memory system
50mGarbage Collection in Java: The progress since JDK 8
59mKeynote: Industry GC Insights from OpenJDK
45mNew GC Algorithms in Java
