Memory leaks in Java can lead to increased resource consumption, sluggish performance, and even system crashes if left unchecked. Identifying and fixing these leaks is crucial for ensuring stable and efficient applications.
Using this deck, our experts will explore the most common causes of memory ...
Memory leaks in Java can lead to increased resource consumption, sluggish performance, and even system crashes if left unchecked. Identifying and fixing these leaks is crucial for ensuring stable and efficient applications.
Using this deck, our experts will explore the most common causes of memory leaks, including static references, improper collection handling, and classloader leaks. You’ll learn practical techniques and tools to detect and resolve memory issues before they impact production.
Size: 19.14 MB
Language: en
Added: Apr 16, 2025
Slides: 27 pages
Slide Content
1
2 Forever Growing Object Pattern-1
3 Same Object Type Multiplying Pattern-2
4 Demo OutOfMemoryError
5 Not So Common Memory Leaks Thread Leaks Uncleared Thread Local Time Taking Finalizers Growing MetaData Objects Collection Objects with Unused References Listeners & Calls Not De-Registered
6 Memory Leak Symptoms 4 Symptoms
7 Memory Behavior of a Healthy Application - Full Garbage Collection Event
15 How to study GC Behavior? -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<file-path> Till Java 8 -Xlog:gc*:file=<file-path> From Java 9 Enable GC logs (always) Almost zero overhead
16 GCeasy GC Log Analysis Demo
17 3. Heap Dump Analysis Most Important
18 How to capture Heap Dumps? 8 options: https://blog.heaphero.io/2017/10/13/how-to-capture-java-heap-dumps-7-options/
21 Predict Memory Leaks in Performance Labs 2 Micro-Metrics https://blog.ycrash.io/9-micro-metrics-that-forecast-production-outages-in-performance-labs/
22 Application experiencing OutOfMemoryError in Production
23 Same Application Suffers Acute Memory Leak in Performance Lab, But We Don’t Notice It
24 2. Object Creation Rate Say, Previous Release: 100 mb/sec. New Release: 200 mb/sec 2x more objects to service the same workload. Indicates inefficient code has been committed in the new release It will manifest as high CPU consumption and degraded response time in the production.
25 Object Creation Rate
26
Thank you, my friends! Ram Lakshmanan @ycrash_rca This deck will be published in: https://blog.ycrash.io https://www.linkedin.com/company/ycrash