Tracing Java Performance Bottlenecks
summary
Reproduces a slow API under load (23 threads for 8s) then traces it with OpenTelemetry, inspects flame graphs and JVM recordings using Java Flight Recorder, Glowroot and Gatling, and escalates to async profiler when native code is suspected. Finds a HashSet removeAll quirk at 100,000 items that jumps to ~11s (O(n²)), a GDPR aspect issuing blocking HTTP calls that eats ~16% (1,800 samples), transactional methods holding Hikari’s default 10 connections, and string concatenation triggering lazy loads. Workflow: reproduce, trace, check metrics, then profile.
AI-written summary · about
chapters (10)
- 0:00Introduction and context
- 2:30Analyzing code performance
- 8:50Profiling methodology
- 12:31Flame graphs and contention
- 19:12Load testing and real-world fixes
- 24:10Database and transaction issues
- 30:51Common performance traps
- 34:10Performance war stories
- 37:22Profiling tools and VTs
- 39:42Tracing and conclusion
