Calibrate Garbage Collection on the Ground and Run Your Java App
summary
Two small Java 21 apps (a CPU‑bound big‑factorial and an IO‑bound continuous‑file editor) run in Docker on Kubernetes, load‑tested with k6 and instrumented via Prometheus + Micrometer; default G1 is reasonable but tuning -Xmx/-Xms and -XX:MaxGCPauseMillis matters. Parallel GC gives best throughput and lowest latency for the CPU workload (≈7,700 requests per 2‑min run), ZGC (generational ZGC) yields higher throughput and better long‑run latency for the IO workload under stress (100 users) at the cost of larger heap use, and flags like GC time ratio and large pages change tradeoffs.
AI-written summary · about
chapters (12)
- 0:00Introduction to talk
- 1:23Why garbage collector matters
- 6:45Garbage collection performance
- 9:42Test setup overview
- 17:02Default JVM ergonomics
- 21:01Serial garbage collector
- 23:30G1 GC default results
- 26:01Tuning G1 GC for latency
- 29:53Parallel garbage collector
- 34:31Generational ZGC introduction
- 39:10Stress testing results
- 41:17Q&A session
related talks
53mCalibrate Garbage Collection on the Ground and Run Your Java App
25mGarbage Collection Primer
47mSecrets of Performance Tuning Java on Kubernetes
44mGarbage Collector: How to Tame the Beast and Make It Your Best Ally
46mMastering GC: tame the beast and make it your best ally
52mGC Tuning & Troubleshooting Crash Course
48mZGC: A Decade of Redefining Java Performance
23mJava in the Green Cloud: Eco-Friendly Development with Kubernetes
