The Dark Arts of Performance Tuning
summary
A demo-driven walkthrough uses free JVM tools (jps, jinfo, jstack, JVisualVM with plugins, NetBeans profiler, Eclipse Memory Analyzer, GC logs) to find a dominating consumer: a synchronized cache that serializes threads. The unoptimized run takes ~2,900 ms with ~3,960,000 short-lived String allocations; switching to ConcurrentHashMap and a lightweight PersonKey drops allocations to ~25,000 and cuts CPU/sys lock contention, moving toward the 700 ms target.
AI-written summary · about
chapters (12)
- 0:00Introduction and setup
- 13:15Performance tuning fundamentals
- 15:51Identifying CPU bottlenecks
- 20:09Analyzing thread dumps
- 23:09Fixing synchronization issues
- 27:53Enabling GC logging
- 29:02Profiling memory allocations
- 38:56Optimizing string allocations
- 41:03Heap dump analysis basics
- 44:56WeakHashMap memory leaks
- 47:30APM tools for production
- 51:13Q&A on performance tuning
related talks
48mFantastic Performance and Where to Find It
39mMemory Efficient Java
52mGC Tuning & Troubleshooting Crash Course
21mMemory Efficient Java
38mPractical Performance Analysis
40mLudicrous Speed: Designing For Performance on the JVM
06mSimple Tweaks to Get the Most Out of your JVM
50mJPoint 2023 TechRadar: Performance Tools
