Search

GC easy – Universal Java GC Log Analyser

Tag

heap dump

What is Java Heap Fragmentation?

Java Heap fragmentation is an interesting problem, which triggers long pausing full garbage collection cycles. In this article we would like to attempt to explain the heap fragmentation. 

Let’s say developer write a code ‘new BMW()’. This will create a new BMW object in the heap memory space. Example:

Continue reading “What is Java Heap Fragmentation?”

LARGE OR SMALL MEMORY SIZE FOR MY APP?

Should I be running my application with few instances (i.e. machines) with large memory size or a lot of instances with small memory size? Which strategy is optimal? This question might be confronted often. After building applications for 2 decades, after building JVM performance engineering/troubleshooting tools (GCeasy, FastThread, HeapHero), I still don’t know the right answer to this question. At the same time, I believe there is no binary answer to this question as well. In this article, I would like to share my observations and experiences on this topic.

Continue reading “LARGE OR SMALL MEMORY SIZE FOR MY APP?”

OUTOFMEMORYERROR RELATED JVM ARGUMENTS

JVM has provided helpful arguments to deal with OutOfMemoryError. In this article, we would like to highlight those JVM arguments. It might come handy for you when you are troubleshooting OutOfMemoryError. Those JVM arguments are:

Continue reading “OUTOFMEMORYERROR RELATED JVM ARGUMENTS”

AUTOMATING – OUTOFMEMORYERROR TROUBLESHOOTING

Troubleshooting OutOfMemoryError or any memory related problem is done manually even in 2019. Troubleshooting and identifying the root cause of OutOfMemoryError can even be automated, by following below mentioned 3 steps: 

Continue reading “AUTOMATING – OUTOFMEMORYERROR TROUBLESHOOTING”

SHALLOW HEAP, RETAINED HEAP

Eclipse MAT (Memory Analyzer Tool) is a powerful tool to analyze heap dumps. It comes quite handy when you are trying to debug memory related problems. In Eclipse MAT two types of object sizes are reported:

Continue reading “SHALLOW HEAP, RETAINED HEAP”

HOW MUCH MEMORY IS MY APPLICATION WASTING?

In early 1970s 1 MB was costing 1 million $. Now 1 mb is costing fraction of that cost. There is no comparison. This is one of the reasons why engineers and enterprises don’t worry about memory any more. 1 million $ in 1970s might be equivalent of several millions of dollars’ worth today. Thus, back in the day’s memory was treated so preciously. This preciousness has been vividly described in the book ‘Idea Man’ – autobiography of Paul Allen (Microsoft Co-founder). Paul Allen talks about the challenge he and Bill Gates faced in writing BASIC programming language (Microsoft’s very first product) under 4 KB.

Continue reading “HOW MUCH MEMORY IS MY APPLICATION WASTING?”

JHAT – HEAP DUMP ANALYSIS

In the earlier article, we saw how to generate Heap Dump from the JVM. In this article, we will see how to analyze a heap dump in detail using ‘jhat’ tool. It’s easier to explain Heap analysis process with an example Memory leak program.

Continue reading “JHAT – HEAP DUMP ANALYSIS”

HOW TO CAPTURE HEAP DUMP? – JMAP, – XX:+HEAPDUMPONOUTOFMEMORYERROR

Heap dump is a snapshot of the Java memory. It contains information about the Java objects and classes in the heap at the moment the snapshot is triggered. It’s vital artifact to diagnose any Java memory related problems.

Continue reading “HOW TO CAPTURE HEAP DUMP? – JMAP, – XX:+HEAPDUMPONOUTOFMEMORYERROR”

Powered by WordPress.com.

Up ↑