tier1appteam

tier1appteam

Chaos Engineering – Deadlock

The article discusses deadlock in multi-threaded applications, defining it as a situation where processes are blocked, each waiting for a resource held by another. It provides an analogy using trains on a shared track that can't proceed due to overlapping resource needs. Sample Java code illustrates deadlock, while troubleshooting methods are described.

Shallow Heap vs Retained Heap

Eclipse MAT is a crucial tool for analyzing heap dumps, particularly useful in debugging OutOfMemoryError. It distinguishes between two object sizes: Shallow Heap and Retained Heap. A video is available that explains their differences and calculation methods. Watch it for more insights on using Eclipse MAT effectively.

Eclipse MAT – Titbits

Eclipse MAT is an effective JVM Memory Analysis tool, with a strong recommendation for its stand-alone version over the plugin. Key tips include allocating extra heap space, enabling 'keep unreachable objects' for better visibility, and adjusting data display settings to more readable formats like KB, MB, and GB for easier analysis.

Large or small heap size?

The video discusses strategies for running applications with either large or small heap sizes. It explores the implications of each approach in terms of performance and cost. Viewers can learn which heap size strategy might be optimal for their specific application needs.

Memory Leak in Java executor

The article discusses an unexpected memory leak issue caused by Java's ThreadPoolExecutor, which results in "java.lang.OutOfMemoryError". Despite executing 10 jobs with 5 worker threads, the threads remain in memory instead of being garbage collected. The solution is to call the executor's shutdown() method to properly terminate the threads after job execution.