Benefits of setting initial and maximum memory size to the same value

When we launch applications, we specify the initial memory size and maximum memory size. For the applications that run on JVM (Java Virtual Machine), initial and maximum memory size is specified through ‘-Xms’ and ‘-Xmx’ arguments. If Java applications are running on containers, it's specified through ‘-XX: InitialRAMPercentage’ and ‘-XX: MaxRAMPercentage’ arguments. Most enterprises set... Continue Reading →

Memory leak due to improper exception handling

In this post let's discuss an interesting memory problem we confronted in the production environment and how we went about solving it. This application would take traffic for a few hours after that it would become unresponsive. It wasn't clear what was causing the unresponsiveness in the application. Technology stack This application was running on... Continue Reading →

Interesting Garbage Collection Patterns

As the author of GCeasy - Garbage collection log analysis tool, I get to see few interesting Garbage Collection Patterns again & again. Based on the Garbage collection pattern, you can detect the health and performance characteristics of the application instantly. In this post, let me share few interesting Garbage collection patterns that have intrigued... Continue Reading →

Memory Leak in Java executor

I was surprised to witness the Java Executor behavior - which caused "java.lang.OutOfMemoryError: unable to create new native thread" in our application. I would like to share my surprise (i.e. problem) and resolution to it. In order to explain the problem better, I created the following example: import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class ThreadLeaker... Continue Reading →

Java threads – may not be memory efficient?

Java applications tend to contain hundreds (sometimes thousands) of threads. The majority of these threads are in WAITING, TIMED_WAITING (i.e., dormant) state, while only a small portion of the threads are actively executing lines of code. So, we were curious to know whether dormant threads consume less memory than active threads. To figure out an... Continue Reading →

Powered by

Up ↑